:root {
  --navy: #11105c;
  --navy-hover: #222170;
  --blue: #087eae;
  --blue-soft: #e9f5fb;
  --canvas: #f3f5fa;
  --panel: #ffffff;
  --panel-soft: #f8f9fc;
  --line: #d9deea;
  --line-strong: #c4ccdc;
  --ink: #161a2d;
  --muted: #6c7488;
  --green: #16845c;
  --green-soft: #e9f8f0;
  --amber: #a86500;
  --amber-soft: #fff5df;
  --red: #b93f4b;
  --red-soft: #fdecef;
  --coral: #e86f61;
  --yellow: #f5bf35;
  --teal: #2d9ca4;
  --shadow: 0 8px 24px rgba(30, 37, 70, 0.08);
  --sidebar-width: 224px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  color-scheme: light;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(8, 126, 174, 0.18);
  outline-offset: 1px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(280px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 12px rgba(20, 27, 61, 0.04);
  backdrop-filter: blur(12px);
}

.brand,
.topbar-actions,
.topbar-context,
.user-block,
.context-item {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.brand-copy {
  min-width: 0;
}

.brand-copy p {
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.brand-copy h1 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.3;
}

.topbar-context {
  justify-content: center;
  gap: 8px;
}

.context-item {
  min-height: 30px;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.context-item.connected {
  border-color: #afe0c8;
  background: var(--green-soft);
  color: var(--green);
}

.context-item.syncing {
  border-color: #ead19b;
  background: var(--amber-soft);
  color: var(--amber);
}

.context-item.syncing svg {
  animation: agent-spin 1.1s linear infinite;
}

.context-item.error {
  border-color: #efbec4;
  background: var(--red-soft);
  color: var(--red);
}

.context-item.readonly-status {
  border-color: #b8c6dc;
  background: #eef3f9;
  color: #405a7d;
}

.context-item svg,
.button svg,
.icon-button svg,
.nav-item svg,
.inline-icon svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 2;
}

.topbar-actions {
  justify-content: flex-end;
  gap: 8px;
}

.user-block {
  gap: 8px;
  padding-left: 4px;
}

.user-switcher {
  min-height: 44px;
  padding: 4px 7px 4px 4px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.user-switcher:hover {
  border-color: var(--line);
  background: var(--panel-soft);
}

.user-switcher > svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.user-switcher.is-locked,
.user-switcher.is-locked:hover {
  cursor: default;
  border-color: var(--line);
  background: var(--panel-soft);
  opacity: 1;
}

.user-switcher.is-locked > svg {
  display: none;
}

.user-block div {
  display: grid;
  gap: 1px;
}

.user-block strong {
  font-size: 12px;
}

.user-block span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.avatar-teacher {
  background: var(--blue);
}

.app-body {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 10px;
  background: transparent;
  color: #454c61;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.nav-item:hover {
  background: #f5f7fb;
  color: var(--ink);
}

.nav-item.active {
  border-color: #c7cfea;
  background: #eeeffa;
  color: var(--navy);
}

.nav-item b {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 10px;
}

.agent-status {
  margin-top: auto;
  width: 100%;
  padding: 12px;
  border: 1px solid #cfd7e8;
  border-radius: 8px;
  background: #f8f9fd;
  color: var(--ink);
  text-align: left;
}

.agent-status:hover {
  border-color: #9eabca;
  background: #f2f4fb;
}

.agent-status-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 132, 92, 0.12);
}

.agent-status p {
  margin: 9px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.agent-status-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.agent-status-meta strong {
  color: var(--green);
}

.agent-panel {
  position: fixed;
  z-index: 45;
  top: 68px;
  right: 0;
  bottom: 0;
  width: min(400px, calc(100vw - 76px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  border-left: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: -14px 0 30px rgba(27, 34, 67, 0.13);
}

.agent-panel[hidden] {
  display: none;
}

@media (min-width: 761px) {
  body.agent-panel-open .app-body {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 400px;
  }

  body.agent-panel-open .agent-panel {
    position: sticky;
    top: 68px;
    right: auto;
    bottom: auto;
    grid-column: 3;
    width: 400px;
    height: calc(100vh - 68px);
    align-self: start;
  }
}

.agent-panel-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.agent-panel-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-panel-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
}

.agent-panel-mark svg {
  width: 17px;
  height: 17px;
}

.agent-panel-identity div {
  min-width: 0;
}

.agent-panel-identity p {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.agent-panel-identity h2 {
  margin-bottom: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-context-card {
  margin: 10px 12px 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.agent-context-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agent-context-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.agent-context-card strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-context-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.agent-messages {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px 12px 12px;
  overflow-y: auto;
}

.agent-empty {
  display: grid;
  gap: 9px;
  padding: 12px 2px;
  color: var(--muted);
}

.agent-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.agent-empty p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

.agent-message {
  max-width: 88%;
  display: grid;
  gap: 5px;
}

.agent-message.is-user {
  justify-self: end;
}

.agent-message.is-assistant {
  justify-self: start;
}

.agent-message-bubble {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.agent-message.is-user .agent-message-bubble {
  border-color: #c8d4ef;
  background: #edf2fb;
}

.agent-message-meta {
  color: var(--muted);
  font-size: 9px;
}

.agent-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.agent-feedback-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #536075;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 4px 7px;
}

.agent-feedback-button:hover:not(:disabled) {
  border-color: #9bafd5;
  background: #f3f6fc;
}

.agent-feedback-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.agent-feedback.is-recorded span {
  color: #41745b;
}

.agent-message.is-user .agent-message-meta {
  text-align: right;
}

.agent-thinking .agent-message-bubble {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.agent-thinking svg {
  width: 14px;
  height: 14px;
  animation: agent-spin 1.1s linear infinite;
}

@keyframes agent-spin {
  to {
    transform: rotate(360deg);
  }
}

.agent-action-card {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding: 10px;
  border: 1px solid #d6c28e;
  border-radius: 7px;
  background: #fffaf0;
}

.agent-action-card.is-complete {
  border-color: #afe0c8;
  background: var(--green-soft);
}

.agent-action-card.is-executing {
  opacity: 0.72;
}

.agent-action-card.is-cancelled {
  border-color: var(--line);
  background: var(--panel-soft);
}

.agent-action-card > span {
  color: var(--amber);
  font-size: 9px;
  font-weight: 800;
}

.agent-action-card strong {
  font-size: 12px;
}

.agent-action-card p {
  margin: 0;
  color: #5f5848;
  font-size: 11px;
  line-height: 1.55;
}

.agent-tool-form-card {
  display: grid;
  gap: 7px;
  margin-top: 2px;
  padding: 10px;
  border: 1px solid #a8c8db;
  border-left: 3px solid var(--blue);
  border-radius: 7px;
  background: #f5faff;
}

.agent-tool-form-card.is-prepared {
  border-color: #d6c28e;
  border-left-color: var(--amber);
  background: #fffaf0;
}

.agent-tool-form-card > span {
  color: #397194;
  font-size: 9px;
  font-weight: 800;
}

.agent-tool-form-card strong {
  font-size: 12px;
}

.agent-tool-form-card p,
.agent-tool-form-card small {
  margin: 0;
  color: #4a6170;
  font-size: 11px;
  line-height: 1.55;
}

.agent-tool-form {
  display: grid;
  gap: 14px;
}

.agent-action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.agent-action-buttons .button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 10px;
}

.agent-suggestions {
  display: flex;
  gap: 6px;
  padding: 0 12px 9px;
  overflow-x: auto;
}

.agent-suggestions:empty {
  display: none;
}

.agent-suggestion {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #42495c;
  font-size: 10px;
  white-space: nowrap;
}

.agent-suggestion:hover {
  border-color: #9eabca;
  background: var(--panel-soft);
}

.agent-composer {
  position: relative;
  margin: 0 12px;
}

.agent-composer textarea {
  width: 100%;
  min-height: 68px;
  max-height: 150px;
  resize: vertical;
  padding: 10px 44px 10px 48px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

.agent-voice-button {
  position: absolute;
  left: 7px;
  bottom: 7px;
  color: var(--muted);
}

.agent-voice-button:hover {
  color: var(--ink);
}

.agent-voice-button.is-listening {
  border-color: #e5aeb4;
  background: var(--red-soft);
  color: var(--red);
  animation: voice-pulse 1.2s ease-in-out infinite;
}

.agent-voice-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.agent-send-button {
  position: absolute;
  right: 7px;
  bottom: 7px;
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.agent-send-button:hover {
  background: var(--navy-hover);
}

.agent-send-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.agent-boundary-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 12px 12px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.agent-boundary-note svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  color: var(--green);
}

.agent-launcher {
  position: fixed;
  z-index: 42;
  right: 18px;
  bottom: 18px;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #2b2a75;
  border-radius: 7px;
  background: var(--navy);
  box-shadow: 0 9px 24px rgba(17, 16, 92, 0.24);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.agent-launcher svg {
  width: 17px;
  height: 17px;
}

body.agent-panel-open .agent-launcher {
  display: none;
}

.role-choice-list {
  display: grid;
  gap: 8px;
}

.role-choice {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.role-choice:hover,
.role-choice.is-active {
  border-color: #aab7d5;
  background: #f4f6fc;
}

.role-choice .avatar {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.role-choice div {
  display: grid;
  gap: 2px;
}

.role-choice strong {
  font-size: 12px;
}

.role-choice small {
  color: var(--muted);
  font-size: 10px;
}

.role-choice > svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.workspace {
  min-width: 0;
  padding: 20px;
}

.page {
  display: grid;
  gap: 16px;
  max-width: 1680px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-header-main {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.page-header h2,
.modal-header h2 {
  margin-bottom: 5px;
  font-size: 24px;
  line-height: 1.25;
}

.page-description {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.page-actions,
.toolbar,
.toolbar-group,
.button-row,
.filter-row,
.status-legend,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-actions,
.toolbar,
.filter-row {
  flex-wrap: wrap;
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 7px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.button-primary {
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
}

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

.button-blue {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}

.button-secondary {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.button-secondary:hover {
  border-color: #9ba8c4;
  background: #f8f9fd;
}

.button-danger {
  border: 1px solid #edbbc0;
  background: var(--red-soft);
  color: var(--red);
}

.button-compact {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 11px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.workbench-readonly [data-readonly-control="true"] {
  cursor: not-allowed;
  opacity: 0.48;
}

.workbench-readonly input:disabled,
.workbench-readonly select:disabled,
.workbench-readonly textarea:disabled {
  border-color: var(--line);
  background: #f1f3f6;
  color: #737b89;
  -webkit-text-fill-color: #737b89;
  opacity: 1;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.icon-button:hover {
  background: #f5f7fb;
}

.voice-input-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.workflow-strip article {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.workflow-strip article:last-child {
  border-right: 0;
}

.workflow-strip span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.workflow-strip p {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.45;
}

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

.stat-card {
  min-height: 108px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(30, 37, 70, 0.04);
}

.stat-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.stat-copy strong {
  display: block;
  margin: 7px 0 3px;
  font-size: 25px;
  line-height: 1;
}

.stat-copy small {
  color: var(--muted);
  font-size: 10px;
}

.stat-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--blue);
  background: var(--blue-soft);
}

.stat-icon svg {
  width: 19px;
  height: 19px;
}

.stat-card.warning .stat-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.stat-card.success .stat-icon {
  color: var(--green);
  background: var(--green-soft);
}

.stat-card.danger .stat-icon {
  color: var(--red);
  background: var(--red-soft);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(30, 37, 70, 0.035);
  overflow: hidden;
}

.panel-header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-header h3 {
  margin-bottom: 2px;
  font-size: 14px;
}

.panel-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 10px;
}

.panel-actions,
.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.danger-link {
  color: var(--red);
}

.panel-body {
  padding: 14px;
}

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

.mode-choice {
  min-height: 142px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 32px;
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.mode-choice:hover {
  border-color: #a9b3cc;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.mode-choice-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
}

.mode-choice.post .mode-choice-icon {
  background: #fff1ea;
  color: var(--coral);
}

.mode-choice.curriculum .mode-choice-icon {
  background: #e9f5ed;
  color: #247144;
}

.mode-choice.scheduling .mode-choice-icon {
  background: #fff4d9;
  color: #946300;
}

.mode-choice-icon svg {
  width: 23px;
  height: 23px;
}

.mode-choice h3 {
  margin-bottom: 5px;
  font-size: 16px;
}

.mode-choice p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.mode-choice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mode-choice-meta span {
  padding: 3px 6px;
  border-radius: 4px;
  background: #f1f3f7;
  color: #555f77;
  font-size: 10px;
  font-weight: 700;
}

.mode-choice > svg {
  width: 18px;
  margin-top: 13px;
  color: #9aa4b8;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.preclass-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1.5fr) minmax(340px, 0.72fr);
  gap: 14px;
  align-items: start;
}

.postclass-layout {
  display: grid;
  grid-template-columns: minmax(170px, 0.42fr) minmax(420px, 1.08fr) minmax(340px, 0.75fr);
  gap: 12px;
  align-items: start;
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.25fr) minmax(340px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.toolbar {
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fafbfe;
}

.field-inline,
.field {
  display: grid;
  gap: 5px;
}

.field-inline label,
.field label {
  color: #555e74;
  font-size: 10px;
  font-weight: 800;
}

.field-inline select,
.field select,
.field input,
.field textarea,
.search-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.field-inline select {
  min-width: 142px;
  min-height: 34px;
  padding: 6px 28px 6px 9px;
  font-size: 11px;
}

.field select,
.field input,
.search-input {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 12px;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.55;
}

.field-help {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 38px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #f7f8fb;
  color: #596177;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  height: 52px;
  padding: 8px 10px;
  border-bottom: 1px solid #e9ecf3;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 120ms ease;
}

.data-table tbody tr:hover {
  background: #f8faff;
}

.data-table tbody tr.selected {
  background: #eef7fb;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.person-cell {
  min-width: 120px;
}

.person-cell strong {
  display: block;
  font-size: 11px;
}

.person-cell span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-ready,
.status-sent {
  background: var(--green-soft);
  color: var(--green);
}

.status-draft,
.status-pending,
.status-editing {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-failed {
  background: var(--red-soft);
  color: var(--red);
}

.status-overdue {
  border: 1px solid #e2b15a;
  background: #fff5df;
  color: #8a5400;
}

.status-sending,
.status-generating {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-paused {
  background: #eef0f4;
  color: #6b7384;
}

.table-link {
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.checkbox {
  width: 15px;
  height: 15px;
  accent-color: var(--navy);
}

.preview-panel {
  position: sticky;
  top: 88px;
}

.message-preview {
  padding: 12px;
  background: #f3f4f7;
}

.message-bubble {
  position: relative;
  padding: 12px;
  border: 1px solid #b9dfb8;
  border-radius: 7px;
  background: #e4f7e1;
  color: #303741;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.message-bubble::before {
  position: absolute;
  top: 16px;
  right: -7px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border-top: 1px solid #b9dfb8;
  border-right: 1px solid #b9dfb8;
  background: #e4f7e1;
  content: "";
}

.preview-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.preview-meta div {
  min-width: 0;
}

.preview-meta span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
}

.preview-meta strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 10px;
}

.editor-stack {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.divider-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.divider-label::before,
.divider-label::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.student-queue {
  max-height: calc(100vh - 236px);
  overflow: auto;
}

.student-row {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #e9ecf3;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.student-row:hover {
  background: #f8faff;
}

.student-row.active {
  box-shadow: inset 3px 0 var(--blue);
  background: #eef7fb;
}

.student-row:last-child {
  border-bottom: 0;
}

.student-row strong {
  display: block;
  font-size: 11px;
}

.student-row .student-identity > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.growth-preview {
  padding: 12px;
  background: #edf0f6;
}

.ai-growth-output {
  width: min(100%, 600px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #d3d8e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(29, 36, 70, 0.12);
}

.ai-growth-output-header,
.ai-growth-output-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
}

.ai-growth-output-header {
  border-bottom: 1px solid #e8eaf1;
}

.ai-output-person {
  min-width: 0;
}

.ai-output-person strong,
.ai-output-person span {
  display: block;
}

.ai-output-person strong {
  color: #272d3d;
  font-size: 10px;
}

.ai-output-person span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.image-state-badge {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 800;
}

.image-state-empty,
.image-state-skipped {
  background: #eef0f5;
  color: #667085;
}

.image-state-generating {
  background: #e8efff;
  color: #2457b8;
}

.image-state-ready {
  background: #e3f5ea;
  color: #167348;
}

.image-state-stale,
.image-state-failed {
  background: #fff0d8;
  color: #8b5316;
}

.ai-growth-image-frame {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
  background: #fbfaf7;
}

.ai-growth-image-frame.is-stale {
  outline: 3px solid #f0b85a;
  outline-offset: -3px;
}

.ai-growth-image {
  width: 100%;
  height: auto;
  display: block;
}

.ai-image-state {
  width: min(82%, 360px);
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 9px;
  padding: 28px;
  color: #596273;
  text-align: center;
}

.ai-image-state > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2fb;
  color: #355ca8;
}

.ai-image-state > span svg {
  width: 26px;
  height: 26px;
}

.ai-image-state h4 {
  margin: 0;
  color: #303746;
  font-size: 14px;
}

.ai-image-state p {
  max-width: 300px;
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
}

.ai-image-state.is-error > span {
  background: #fff0e8;
  color: #b54530;
}

.ai-spinner {
  animation: ai-pulse 1.4s ease-in-out infinite;
}

@keyframes ai-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

.ai-growth-output-footer {
  border-top: 1px solid #e8eaf1;
  background: #fbfcfe;
}

.ai-growth-output-footer > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #697184;
  font-size: 8px;
}

.ai-growth-output-footer > div svg,
.ai-growth-output-footer .table-link svg {
  width: 13px;
  height: 13px;
}

.ai-growth-output-footer .table-link {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-growth-output-footer .table-link:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.growth-prompt-copy {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fc;
  color: #3f4758;
  font-size: 11px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.segmented {
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}

.segmented button {
  min-height: 32px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 6px 7px;
  background: #fff;
  color: #5b6375;
  font-size: 10px;
  font-weight: 800;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: var(--navy);
  color: #fff;
}

.form-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  border-bottom: 0;
}

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.form-section-title h3 {
  margin-bottom: 0;
  font-size: 12px;
}

.form-section-title span {
  color: var(--muted);
  font-size: 9px;
}

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

.form-grid .field.full {
  grid-column: 1 / -1;
}

.voice-input-panel {
  display: grid;
  gap: 12px;
}

.voice-input-context {
  padding: 0 0 12px;
  border-top: 0;
}

.voice-capture-status {
  min-height: 66px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f9fc;
}

.voice-capture-status > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9eef8;
  color: var(--navy);
}

.voice-capture-status svg {
  width: 18px;
  height: 18px;
}

.voice-capture-status strong,
.voice-capture-status p {
  display: block;
}

.voice-capture-status strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.voice-capture-status p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.voice-capture-status.is-listening {
  border-color: #e5aeb4;
  background: #fff4f5;
}

.voice-capture-status.is-listening > span {
  animation: voice-pulse 1.2s ease-in-out infinite;
  background: var(--red-soft);
  color: var(--red);
}

.voice-capture-status.is-processing {
  border-color: #b9c9e6;
  background: #f1f5fb;
}

.voice-capture-status.is-ready {
  border-color: #afd9c2;
  background: #eff9f3;
}

.voice-capture-status.is-error {
  border-color: #e8b5ba;
  background: var(--red-soft);
}

.voice-transcript-field textarea {
  min-height: 132px;
}

.voice-source-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 10px;
  border-left: 3px solid #8eb5d6;
  background: #f4f8fb;
  color: #526177;
  font-size: 10px;
  line-height: 1.5;
}

.voice-source-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--blue);
}

.voice-modal-actions {
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.15fr);
}

.voice-modal-actions .is-recording {
  border-color: #e5aeb4;
  background: var(--red-soft);
  color: var(--red);
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.sticky-actions.post-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.sticky-actions.postclass-send-actions {
  grid-template-columns: minmax(130px, 0.8fr) minmax(210px, 1.35fr) minmax(190px, 1.15fr);
}

.postclass-send-actions .button {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  line-height: 1.35;
  white-space: normal;
}

.parent-summary-section {
  background: #f7f9fc;
}

.parent-summary-preview {
  min-height: 70px;
  padding: 10px 11px;
  border: 1px solid #d9dee8;
  border-radius: 6px;
  background: #fff;
  color: #31394a;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.delivery-target {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 12px 10px;
  padding: 8px 10px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
  color: #315843;
  font-size: 10px;
  line-height: 1.5;
}

.delivery-target svg {
  flex: 0 0 auto;
}

.postclass-reset-zone {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.postclass-reset-zone .button {
  min-height: 36px;
}

.post-actions #generatePost {
  grid-column: 1 / -1;
}

.post-actions .button {
  min-width: 0;
  padding-right: 9px;
  padding-left: 9px;
  font-size: 9px;
}

.homework-block {
  padding: 10px;
  border-left: 3px solid var(--yellow);
  background: #fffaf0;
  color: #5e4e35;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.course-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.curriculum-version-panel {
  overflow: hidden;
}

.curriculum-version-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding: 12px;
}

.curriculum-version-tab {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.curriculum-version-tab:hover {
  border-color: #9faac3;
}

.curriculum-version-tab.active {
  border-color: var(--navy);
  background: #eef3f8;
  box-shadow: inset 3px 0 var(--navy);
}

.curriculum-version-tab strong,
.curriculum-version-tab span,
.curriculum-version-tab small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.curriculum-version-tab strong {
  color: var(--navy);
  font-size: 12px;
}

.curriculum-version-tab span {
  font-size: 10px;
  font-weight: 800;
}

.curriculum-version-tab small,
.curriculum-empty-inline {
  color: var(--muted);
  font-size: 9px;
}

.curriculum-empty-inline {
  padding: 7px 0;
}

.curriculum-quality-notice {
  align-items: flex-start;
}

.course-tab {
  min-height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  background: #fff;
  color: #596177;
  font-size: 10px;
  font-weight: 800;
}

.course-tab.active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: calc(100vh - 286px);
  overflow: auto;
  padding: 12px;
}

.course-button {
  min-height: 78px;
  display: grid;
  align-content: start;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.course-button:hover {
  border-color: #9faac3;
}

.course-button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.course-button strong {
  color: var(--blue);
  font-size: 10px;
}

.course-button span {
  display: -webkit-box;
  overflow: hidden;
  color: #40485b;
  font-size: 10px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.course-button small {
  color: var(--muted);
  font-size: 8px;
}

.template-copy {
  max-height: 300px;
  overflow: auto;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8f9fb;
  color: #3d4558;
  font-size: 10px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.template-section {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.template-section:last-child {
  border-bottom: 0;
}

.template-section h3 {
  margin-bottom: 8px;
  font-size: 12px;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.curriculum-editor {
  display: grid;
  gap: 12px;
  margin: 12px 14px;
  padding: 13px;
  border: 1px solid #cfd8eb;
  border-radius: 7px;
  background: #f7f9fd;
}

.curriculum-editor-grid {
  gap: 10px;
}

.curriculum-editor-actions {
  justify-content: flex-end;
}

.curriculum-editor .notice {
  margin: 0;
}

.curriculum-page {
  gap: 12px;
}

.curriculum-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0 4px;
}

.curriculum-page-heading h1 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 22px;
}

.page-eyebrow,
.detail-kicker {
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.curriculum-page-context {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.curriculum-page-context span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.curriculum-page-context strong {
  color: var(--ink);
  font-size: 11px;
}

.curriculum-workspace {
  display: grid;
  grid-template-columns: minmax(176px, .22fr) minmax(300px, .36fr) minmax(360px, .42fr);
  gap: 12px;
  min-width: 0;
  align-items: start;
}

.curriculum-versions-panel,
.curriculum-lessons-panel,
.curriculum-detail-panel {
  min-width: 0;
  overflow: hidden;
}

.curriculum-versions-panel,
.curriculum-lessons-panel {
  height: calc(100vh - 126px);
}

.curriculum-detail-panel {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 126px);
  overflow: auto;
}

.compact-panel-header {
  padding: 12px 13px;
}

.compact-panel-header > strong {
  color: var(--blue);
  font-size: 16px;
}

.curriculum-version-list {
  display: grid;
  gap: 6px;
  max-height: calc(100% - 65px);
  overflow: auto;
  padding: 9px;
}

.curriculum-version-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.curriculum-version-item:hover {
  border-color: #9faac3;
}

.curriculum-version-item.active {
  border-color: var(--navy);
  background: #eef3f8;
  box-shadow: inset 3px 0 var(--navy);
}

.curriculum-version-code {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.curriculum-version-item strong,
.curriculum-version-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.curriculum-version-item strong {
  font-size: 10px;
}

.curriculum-version-item small {
  color: var(--muted);
  font-size: 9px;
}

.curriculum-lessons-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.curriculum-lessons-header {
  padding: 12px 13px;
}

.curriculum-theme-filter {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

.curriculum-course-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 7px;
  overflow: auto;
  padding: 10px;
}

.curriculum-course-list .course-button {
  min-height: 76px;
}

.curriculum-detail-header {
  align-items: flex-start;
  padding: 13px 14px;
}

.curriculum-detail-header h3 {
  margin: 3px 0 3px;
  font-size: 14px;
  line-height: 1.35;
}

.curriculum-detail-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.curriculum-detail-body {
  display: grid;
  gap: 12px;
  padding: 12px 14px 18px;
}

.curriculum-detail-status {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

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

.curriculum-detail-section h4 {
  margin: 0;
  color: var(--navy);
  font-size: 11px;
}

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

.curriculum-detail-grid > div,
.curriculum-service-block {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfe;
}

.curriculum-detail-grid > div > span,
.curriculum-service-block > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.curriculum-detail-grid p {
  margin: 0;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.curriculum-service-block {
  display: grid;
  gap: 6px;
}

.curriculum-service-block .template-copy {
  max-height: 150px;
  padding: 9px;
  font-size: 10px;
}

.modal-body .curriculum-editor {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.modal-body .curriculum-editor-actions {
  margin: 12px -18px -18px;
}

.curriculum-editor-error[hidden] {
  display: none;
}

@media (max-width: 1060px) {
  .curriculum-workspace {
    grid-template-columns: minmax(170px, .28fr) minmax(300px, .72fr);
  }

  .curriculum-detail-panel {
    position: static;
    grid-column: 1 / -1;
    max-height: none;
  }
}

@media (max-width: 620px) {
  .curriculum-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .curriculum-page-context {
    justify-items: start;
    text-align: left;
  }

  .curriculum-workspace {
    grid-template-columns: 1fr;
  }

  .curriculum-versions-panel,
  .curriculum-lessons-panel {
    height: auto;
  }

  .curriculum-version-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .curriculum-course-list {
    max-height: 520px;
  }

  .curriculum-detail-grid {
    grid-template-columns: 1fr;
  }
}

.curriculum-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px 0;
}

.curriculum-meta div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8f9fc;
}

.curriculum-meta span,
.curriculum-meta strong {
  display: block;
}

.curriculum-meta span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.curriculum-meta strong {
  overflow-wrap: anywhere;
  font-size: 11px;
}

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

.knowledge-grid section {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.knowledge-grid section.full {
  grid-column: 1 / -1;
}

.knowledge-grid span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: #525d74;
  font-size: 10px;
  font-weight: 800;
}

.knowledge-grid span svg {
  width: 14px;
  height: 14px;
  color: var(--blue);
}

.knowledge-grid p,
.resource-row p {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-work-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f7fa;
}

.schedule-work-tabs button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1 0 160px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #626b7d;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-work-tabs button:hover {
  background: #fff;
  color: var(--ink);
}

.schedule-work-tabs button.active {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--navy);
  box-shadow: 0 2px 7px rgba(26, 35, 65, 0.08);
}

.schedule-work-tabs svg {
  width: 15px;
  height: 15px;
}

.schedule-work-tabs b {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: #e8edf5;
  color: #445069;
  font-size: 9px;
}

.schedule-work-tabs button.active b {
  background: var(--amber-soft);
  color: #825800;
}

.schedule-view-content {
  display: grid;
  gap: 14px;
}

.schedule-path-banner {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid;
  border-radius: 8px;
  background: #fff;
}

.schedule-path-banner > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
}

.schedule-path-banner svg {
  width: 19px;
  height: 19px;
}

.schedule-path-banner strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.schedule-path-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.schedule-path-banner code {
  padding: 6px 9px;
  border-radius: 5px;
  background: #f4f6fa;
  color: #4d576c;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.formal-path {
  border-left-color: var(--green);
}

.formal-path > span {
  background: var(--green-soft);
  color: var(--green);
}

.trial-path {
  border-left-color: var(--blue);
}

.trial-path > span {
  background: var(--blue-soft);
  color: var(--blue);
}

.enrollment-table {
  min-width: 980px;
}

.class-option-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.class-option-row > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.class-option-row > div:last-child {
  border-right: 0;
}

.class-option-row span,
.class-option-row small {
  color: var(--muted);
  font-size: 9px;
}

.class-option-row strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.class-option-row .seat-available {
  color: var(--green);
  font-weight: 800;
}

.muted-action {
  color: var(--muted);
  font-size: 10px;
}

.trial-slot-panel .data-table,
.instance-table {
  min-width: 920px;
}

.enrollment-confirm-summary,
.trial-request-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fc;
}

.enrollment-confirm-summary > div,
.trial-request-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
}

.enrollment-confirm-summary > div:last-child,
.trial-request-summary > div:last-child {
  border-right: 0;
}

.enrollment-confirm-summary span,
.trial-request-summary span {
  color: var(--muted);
  font-size: 9px;
}

.enrollment-confirm-summary strong,
.trial-request-summary strong {
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.enrollment-confirm-form {
  margin-bottom: 14px;
}

.enrollment-impact {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid #b9dfc8;
  border-radius: 7px;
  background: #f0f8f3;
}

.enrollment-impact > svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.enrollment-impact strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.enrollment-impact p {
  margin: 0;
  color: #4f6558;
  font-size: 10px;
  line-height: 1.55;
}

.trial-session-options {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.trial-session-options legend {
  margin-bottom: 8px;
  color: #555e74;
  font-size: 10px;
  font-weight: 800;
}

.trial-session-option {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(220px, 1fr) minmax(180px, 0.7fr);
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.trial-session-option:has(input:checked) {
  border-color: #6f91c4;
  background: #f4f7fc;
  box-shadow: inset 3px 0 0 var(--blue);
}

.trial-session-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.trial-option-marker {
  width: 16px;
  height: 16px;
  display: block;
  border: 2px solid #a9b2c3;
  border-radius: 50%;
  background: #fff;
}

.trial-session-option input:checked + .trial-option-marker {
  border: 5px solid var(--blue);
}

.trial-option-main,
.trial-option-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.trial-option-main strong,
.trial-option-meta strong {
  font-size: 11px;
}

.trial-option-main small,
.trial-option-meta small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.trial-option-meta {
  text-align: right;
}

.trial-boundary-note {
  margin-top: 2px;
}

.modal-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 16px -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.lead-notification-setting {
  display: grid;
  gap: 16px;
}

.lead-notification-current {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 6px;
  background: #fbfcfe;
}

.lead-notification-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 6px;
}

.lead-notification-icon svg {
  width: 18px;
  height: 18px;
}

.lead-notification-current small,
.lead-notification-current strong,
.lead-notification-current p {
  display: block;
}

.lead-notification-current small,
.lead-notification-setting .field > span {
  color: #555e74;
  font-size: 10px;
  font-weight: 800;
}

.lead-notification-current strong {
  margin-top: 2px;
  font-size: 14px;
}

.lead-notification-current p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.lead-notification-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.lead-notification-loading .spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.schedule-page {
  max-width: 1880px;
}

.schedule-board-panel {
  overflow: hidden;
}

.schedule-toolbar {
  gap: 14px;
}

.schedule-week-title {
  min-width: 112px;
}

.schedule-week-title strong,
.schedule-week-title span {
  display: block;
}

.schedule-week-title strong {
  font-size: 13px;
}

.schedule-week-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.schedule-filter {
  display: inline-grid;
  grid-auto-flow: column;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.schedule-filter button {
  min-width: 64px;
  min-height: 32px;
  padding: 6px 9px;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #5b6478;
  font-size: 10px;
  font-weight: 800;
}

.schedule-filter button:last-child {
  border-right: 0;
}

.schedule-filter button.active {
  background: var(--navy);
  color: #fff;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: #5c6579;
  font-size: 9px;
  font-weight: 700;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.schedule-legend i {
  width: 10px;
  height: 10px;
  border: 1px solid transparent;
  border-radius: 2px;
}

.legend-l {
  border-color: #8fc29d !important;
  background: #e5f3e9;
}

.legend-m {
  border-color: #b7a5d8 !important;
  background: #eee8f8;
}

.legend-trial {
  border-color: #8fb8db !important;
  background: #e9f2fa;
}

.legend-reserved {
  border-color: #77b49c !important;
  background: #dcf1e8;
}

.legend-overdue {
  border-color: #d39b38 !important;
  background: #fff5df;
}

.legend-conflict {
  border-color: #d99da4 !important;
  background: #fae9eb;
}

.schedule-board-wrap {
  width: 100%;
  overflow: auto;
}

.schedule-board {
  min-width: 1210px;
  display: grid;
  grid-template-columns: 94px repeat(var(--day-count), minmax(148px, 1fr));
  background: #fff;
}

.schedule-corner,
.schedule-day,
.schedule-time,
.schedule-cell {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.schedule-corner,
.schedule-day {
  min-height: 52px;
  display: grid;
  place-content: center;
  background: #f5f7fb;
  text-align: center;
}

.schedule-corner span,
.schedule-day span,
.schedule-time span {
  color: var(--muted);
  font-size: 9px;
}

.schedule-day strong {
  margin-bottom: 2px;
  font-size: 11px;
}

.schedule-time {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 10px;
  background: #fafbfc;
}

.schedule-time strong {
  font-size: 11px;
}

.schedule-cell {
  min-height: 142px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 6px;
  background: #fff;
}

.schedule-card {
  width: 100%;
  min-height: 83px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid;
  border-radius: 6px;
  text-align: left;
}

.schedule-card:hover {
  box-shadow: 0 4px 12px rgba(25, 35, 66, 0.11);
  transform: translateY(-1px);
}

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

.schedule-card strong {
  min-width: 0;
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.schedule-card em {
  flex: 0 0 auto;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.schedule-card > span:not(.schedule-card-top),
.schedule-card small {
  color: inherit;
  font-size: 9px;
  line-height: 1.35;
}

.schedule-card .schedule-note {
  padding-top: 4px;
  border-top: 1px solid currentColor;
  opacity: 0.82;
}

.schedule-card .schedule-note-override {
  font-weight: 800;
  opacity: 1;
}

.schedule-card .schedule-note-conflict {
  font-weight: 800;
  opacity: 1;
}

.schedule-card.is-overdue {
  border-color: #d39b38;
  border-left-width: 4px;
  background: #fff8e8;
  color: #744a08;
}

.schedule-card .schedule-note-overdue {
  font-weight: 800;
  opacity: 1;
}

.schedule-l {
  border-color: #9bc8a7;
  background: #e8f4eb;
  color: #225e38;
}

.schedule-m {
  border-color: #b9a8d8;
  background: #f0ebf8;
  color: #5d447f;
}

.schedule-trial {
  border-color: #92b8d7;
  background: #eaf3fa;
  color: #255f89;
}

.schedule-reserved {
  border-color: #78b49d;
  background: #dff2e9;
  color: #1d684f;
}

.schedule-conflict {
  border-color: #d7949d;
  background: #f9e7e9;
  color: #9d3341;
}

.schedule-cancelled {
  border-color: #c6cbd5;
  background: #f2f3f6;
  color: #70788a;
}

.operations-shell {
  display: grid;
  gap: 12px;
}

.operations-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.operations-toolbar h2 {
  margin: 4px 0 3px;
  color: var(--navy);
  font-size: 18px;
}

.operations-toolbar p,
.operations-calendar-heading p,
.operations-batch-list .panel-header p,
.operations-batch-detail .panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.operations-toolbar-actions,
.operations-campus {
  display: flex;
  align-items: center;
  gap: 8px;
}

.operations-campus span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.operations-campus select {
  min-width: 150px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 10px;
}

.operations-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f7fa;
}

.operations-tabs button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #626b7d;
  font-size: 10px;
  font-weight: 800;
}

.operations-tabs button.active {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--navy);
  box-shadow: 0 2px 7px rgba(26, 35, 65, 0.08);
}

.operations-tabs svg {
  width: 15px;
  height: 15px;
}

.operations-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.operations-metrics > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.operations-metrics > div:last-child {
  border-right: 0;
}

.operations-metrics span,
.operations-metrics small {
  color: var(--muted);
  font-size: 9px;
}

.operations-metrics strong {
  color: var(--navy);
  font-size: 21px;
  line-height: 1;
}

.operations-metrics .metric-warning strong { color: #966600; }
.operations-metrics .metric-danger strong { color: #a23b48; }

.operations-calendar-panel,
.operations-batch-list,
.operations-batch-detail,
.operations-detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.operations-calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.operations-calendar-heading h3 {
  margin: 0 0 3px;
  font-size: 13px;
}

.operations-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.operations-legend span,
.operation-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 3px 6px;
  border: 1px solid;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.is-generated { border-color: #91c4a0; background: #e7f4ea; color: #28613b; }
.is-existing { border-color: #91c4a0; background: #eef8f0; color: #28613b; }
.is-pending { border-color: #e1bb64; background: #fff7e2; color: #886000; }
.is-conflict { border-color: #dfa0a9; background: #fbeaec; color: #a23b48; }
.is-suppressed { border-color: #bbc1cd; background: #f0f2f5; color: #667083; }
.is-error { border-color: #d6865e; background: #fff0e8; color: #9a4c27; }
.is-unavailable { border-color: #b8c1cc; background: #f4f6f8; color: #657184; }

.operations-calendar-wrap {
  overflow-x: auto;
}

.operations-calendar {
  min-width: 1120px;
}

.operations-calendar-head,
.operations-calendar-row {
  display: grid;
  grid-template-columns: 190px repeat(7, minmax(128px, 1fr));
}

.operations-calendar-head > span,
.operations-class-label,
.operations-time-label,
.operations-calendar-cell {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.operations-calendar-head > span {
  display: grid;
  gap: 2px;
  padding: 9px 8px;
  background: #f5f7fb;
  color: var(--navy);
  font-size: 10px;
  text-align: center;
}

.operations-calendar-head > span small {
  color: var(--muted);
  font-size: 9px;
}

.operations-class-label {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 8px 10px;
  background: #fafbfc;
}

.operations-time-label {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 8px 10px;
  background: #fafbfc;
}

.operations-time-label strong {
  color: var(--navy);
  font-size: 11px;
}

.operations-time-label span {
  color: var(--muted);
  font-size: 9px;
}

.operations-class-label strong {
  color: var(--navy);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.operations-class-label span,
.operations-calendar-cell > .operations-empty-cell {
  color: var(--muted);
  font-size: 9px;
}

.operations-calendar-cell {
  min-height: 106px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 5px;
  background: #fff;
}

.operation-occurrence {
  display: grid;
  gap: 3px;
  padding: 7px;
  border: 1px solid;
  border-left-width: 3px;
  border-radius: 5px;
}

button.operation-occurrence {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.operation-occurrence:hover,
button.operation-occurrence:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.18);
  filter: brightness(0.98);
}

.operation-occurrence-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: currentColor;
  font-weight: 800;
}

.operation-occurrence-action svg {
  width: 11px;
  height: 11px;
}

.operation-occurrence strong { font-size: 10px; }
.operation-occurrence span,
.operation-occurrence small { font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }
.operation-occurrence em { width: max-content; font-size: 8px; font-style: normal; font-weight: 800; }
.operation-occurrence small { padding-top: 3px; border-top: 1px solid currentColor; opacity: .82; }

.operation-participant-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.operation-formal-count,
.operation-trial-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: max-content;
  padding: 2px 4px;
  border: 1px solid;
  border-radius: 4px;
  font-size: 8px !important;
  font-weight: 800;
  line-height: 1.2 !important;
}

.operation-formal-count {
  border-color: #b8c7db;
  background: #f3f7fc;
  color: #36577a;
}

.operation-trial-count {
  border-color: #ddad43;
  background: #fff4d7;
  color: #79510a;
}

.operation-trial-count svg,
.schedule-detail-trial svg {
  width: 11px;
  height: 11px;
}

.operation-capacity-count {
  color: currentColor;
}

.schedule-detail-trial strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #79510a;
}

.operations-empty-cell { align-self: center; justify-self: center; }

.operations-report-grid {
  display: grid;
  grid-template-columns: minmax(230px, .7fr) minmax(450px, 1.5fr) minmax(280px, .85fr);
  gap: 12px;
  align-items: start;
}

.operations-report-stack {
  display: grid;
  gap: 12px;
}

.operations-anomaly-panel,
.operations-history {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.operations-anomaly-panel .panel-header {
  align-items: flex-start;
  padding: 13px 14px;
}

.operations-anomaly-panel .panel-header h3 {
  margin: 0 0 3px;
  font-size: 14px;
}

.operations-anomaly-panel .panel-header p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.operations-anomaly-panel .operations-detail-table {
  min-width: 780px;
}

.operations-report-stack > .operations-report-grid {
  grid-template-columns: minmax(300px, 1fr) minmax(260px, .7fr);
}

.operations-history {
  align-self: start;
}

.operations-history summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.operations-history summary::-webkit-details-marker { display: none; }
.operations-history summary::after { content: "+"; color: var(--muted); font-size: 16px; }
.operations-history[open] summary::after { content: "-"; }
.operations-history summary small { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 500; }
.operations-history .operations-batch-list { border-top: 1px solid var(--line); border-radius: 0; }

.operations-anomaly-summary {
  margin: 0 14px 4px;
  padding: 10px 11px;
  border-left: 3px solid #a23b48;
  background: #fff4f4;
}

.operations-anomaly-summary strong { color: #8f2f3d; font-size: 11px; }
.operations-anomaly-summary p { margin: 4px 0 0; color: #68434a; font-size: 10px; line-height: 1.5; }
.operations-technical-facts { display: grid; gap: 0; margin: 0; padding: 0; }
.operations-technical-facts > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.operations-technical-facts dt { color: var(--muted); font-size: 9px; }
.operations-technical-facts dd { min-width: 0; margin: 0; font-size: 9px; overflow-wrap: anywhere; }

.operations-batch-list .panel-header,
.operations-batch-detail .panel-header,
.operations-detail-panel .panel-header {
  align-items: flex-start;
  padding: 13px 14px;
}

.operations-batch-list .panel-header h3,
.operations-batch-detail .panel-header h3,
.operations-detail-panel .panel-header h3 {
  margin: 0 0 3px;
  font-size: 13px;
}

.operations-batch-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.operations-batch-card:hover,
.operations-batch-card.active { background: #f5f8fc; }
.operations-batch-card.active { box-shadow: inset 3px 0 var(--navy); }
.operations-batch-card span { min-width: 0; display: grid; gap: 3px; }
.operations-batch-card strong { font-size: 10px; }
.operations-batch-card small { color: var(--muted); font-size: 9px; }
.operations-batch-card b { color: #a23b48; font-size: 9px; white-space: nowrap; }

.operations-detail-table { min-width: 720px; }
.operations-detail-table tbody tr[data-materialization-item] { cursor: pointer; }
.operations-detail-table tbody tr[data-materialization-item]:hover td,
.operations-detail-table tbody tr.is-selected td { background: #f4f7fb; }
.operations-detail-table td { vertical-align: top; }
.operations-detail-table code,
.operations-facts code { color: #536074; font-size: 9px; overflow-wrap: anywhere; }

.operations-detail-panel {
  position: sticky;
  top: 12px;
}

.operations-detail-panel .panel-header p { margin: 0; }
.operations-facts { display: grid; gap: 0; margin: 0; padding: 0 14px; }
.operations-facts > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.operations-facts dt { color: var(--muted); font-size: 9px; }
.operations-facts dd { min-width: 0; margin: 0; color: var(--ink); font-size: 9px; overflow-wrap: anywhere; }
.operations-reason { margin: 12px 14px; padding: 10px; border: 1px solid #ead5a2; border-left: 3px solid #d39b38; background: #fffaf0; }
.operations-reason strong { font-size: 10px; }
.operations-reason p { margin: 5px 0 0; color: #76550e; font-size: 9px; line-height: 1.5; }
.operations-raw { margin: 0 14px 14px; border-top: 1px solid var(--line); }
.operations-raw summary { padding: 10px 0 0; color: #536074; cursor: pointer; font-size: 9px; font-weight: 800; }
.operations-raw pre { max-height: 240px; margin: 8px 0 0; padding: 9px; overflow: auto; background: #f5f7fa; color: #465269; font: 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.archive-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.archive-overdue-row td {
  background: #fffaf0;
}

.archive-overdue-row td:first-child {
  box-shadow: inset 3px 0 #d39b38;
}

.schedule-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.schedule-request-table {
  min-width: 850px;
}

.request-status {
  display: inline-flex;
  min-width: 50px;
  justify-content: center;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 9px;
  font-weight: 800;
}

.request-unassigned,
.request-pending {
  background: var(--amber-soft);
  color: #8b6300;
}

.request-scheduled {
  background: var(--green-soft);
  color: var(--green);
}

.request-attended,
.request-converted {
  background: var(--green-soft);
  color: var(--green);
}

.request-no_show,
.request-cancelled {
  background: var(--red-soft);
  color: var(--red);
}

.conflict-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.conflict-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.conflict-item > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.conflict-item svg {
  width: 15px;
  height: 15px;
}

.conflict-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.conflict-item p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.conflict-high > span {
  background: var(--red-soft);
  color: var(--red);
}

.conflict-medium > span {
  background: var(--amber-soft);
  color: var(--amber);
}

.compact-notice {
  margin-top: 2px;
  padding: 9px;
}

.schedule-detail-meta {
  margin-bottom: 12px;
}

.schedule-time-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #bad5ff;
  border-radius: 6px;
  background: #f2f7ff;
}

.schedule-time-compare > div,
.schedule-time-source-strip {
  display: grid;
  gap: 4px;
}

.schedule-time-compare > svg {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.schedule-time-compare span,
.schedule-time-source-strip span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.schedule-time-compare strong,
.schedule-time-source-strip strong {
  font-size: 12px;
  line-height: 1.45;
}

.schedule-time-compare small {
  color: #365f9e;
  font-size: 9px;
}

.schedule-time-source-strip {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--blue);
  background: #f6f8fc;
}

.source-mapping-notice {
  margin: 12px 0;
  padding: 12px 14px;
  border-left: 3px solid #c78800;
  background: #fff8e8;
}

.source-mapping-heading {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.source-mapping-heading > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #9a6800;
}

.source-mapping-heading strong,
.source-mapping-notice li strong {
  display: block;
  font-size: 11px;
}

.source-mapping-heading p,
.source-mapping-notice li span {
  margin: 2px 0 0;
  color: #6c5a32;
  font-size: 9px;
  line-height: 1.5;
}

.source-mapping-notice ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0 26px;
  padding: 0;
  list-style: none;
}

.source-mapping-notice li {
  position: relative;
}

.source-mapping-notice li::before {
  position: absolute;
  top: 5px;
  left: -14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c78800;
  content: "";
}

.relational-time-actions {
  grid-template-columns: repeat(2, minmax(0, auto));
}

.rule-section {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.rule-section:last-child {
  margin-bottom: 0;
}

.rule-section h3 {
  font-size: 13px;
}

.rule-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.rule-type {
  align-self: start;
  border-radius: 4px;
  padding: 3px 5px;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
}

.rule-hard {
  background: var(--red-soft);
  color: var(--red);
}

.rule-soft {
  background: var(--blue-soft);
  color: var(--blue);
}

.rule-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.rule-item p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.notice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #f0d399;
  border-radius: 7px;
  background: var(--amber-soft);
  color: #6c4b17;
  font-size: 10px;
  line-height: 1.5;
}

.notice svg {
  width: 16px;
  height: 16px;
}

.notice-error {
  border-color: #e8b5ba;
  background: var(--red-soft);
  color: #8f2f3b;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
}

.empty-state h3 {
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 14px;
}

.empty-state p {
  margin-bottom: 0;
  font-size: 11px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 19, 40, 0.48);
  backdrop-filter: blur(5px);
}

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

.modal {
  width: min(940px, 100%);
  max-height: min(86vh, 780px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(17, 20, 45, 0.26);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.class-roster-modal {
  width: min(820px, 100%);
}

.class-roster-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: var(--line);
}

.class-roster-summary > div {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  background: #fff;
}

.class-roster-summary strong {
  color: var(--ink);
  font-size: 20px;
}

.class-roster-summary span,
.class-roster-student small,
.class-roster-add span {
  color: var(--muted);
  font-size: 11px;
}

.class-roster-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.class-roster-search {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
}

.class-roster-search svg {
  width: 15px;
}

.class-roster-search input {
  width: 100%;
  border: 0;
  outline: 0;
  font: inherit;
}

.class-roster-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #b9d4ed;
  border-radius: 6px;
  background: #f5f9fd;
}

.class-roster-add label {
  display: grid;
  gap: 5px;
}

.class-roster-add label > span {
  color: var(--ink);
  font-weight: 700;
}

.class-roster-add select,
.class-roster-add input {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.class-roster-list {
  display: grid;
  gap: 8px;
}

.class-roster-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) 130px minmax(200px, auto);
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.class-roster-student {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.class-roster-student > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.class-roster-student strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-roster-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.class-roster-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.class-roster-status svg {
  width: 14px;
  height: 14px;
}

.class-roster-status.active {
  background: #e9f7ee;
  color: #147a3d;
}

.class-roster-status.paused {
  background: #fff4df;
  color: #a15b00;
}

.class-roster-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.class-roster-actions .button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

.class-roster-actions .danger {
  color: #b42318;
}

.class-roster-inline-action {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.class-roster-inline-action input {
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

@media (max-width: 720px) {
  .class-roster-toolbar,
  .class-roster-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .class-roster-actions {
    justify-content: flex-start;
  }

  .class-roster-add,
  .class-roster-inline-action {
    grid-template-columns: 1fr;
  }
}

.modal-body {
  max-height: calc(min(86vh, 780px) - 74px);
  overflow: auto;
  padding: 18px;
}

.agent-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 20px;
  min-width: 760px;
  padding: 8px 4px 18px;
}

.agent-stage {
  position: relative;
  min-height: 126px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.agent-stage:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -17px;
  width: 12px;
  height: 1px;
  background: #9fa9be;
  content: "";
}

.agent-stage:not(:last-child)::before {
  position: absolute;
  top: calc(50% - 3px);
  right: -18px;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border-top: 1px solid #9fa9be;
  border-right: 1px solid #9fa9be;
  content: "";
}

.agent-stage span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
}

.agent-stage h3 {
  margin: 7px 0 5px;
  font-size: 12px;
}

.agent-stage p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.agent-node-main {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #b9c0df;
  border-radius: 8px;
  background: #f1f1fb;
}

.agent-node-main h3 {
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 14px;
}

.agent-node-main p {
  margin-bottom: 10px;
  color: #505975;
  font-size: 11px;
}

.agent-node-main small {
  display: block;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #d2d7e9;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.agent-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.agent-role-grid .agent-node-main {
  margin-top: 0;
}

.handoff-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 9px;
}

.handoff-strip strong {
  margin-right: auto;
  color: var(--ink);
  font-size: 10px;
}

.handoff-strip span {
  color: #48516a;
  font-weight: 700;
  white-space: nowrap;
}

.handoff-strip svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-list span {
  padding: 5px 7px;
  border: 1px solid #cdd4e5;
  border-radius: 5px;
  background: #fff;
  color: #4d5670;
  font-size: 9px;
  font-weight: 700;
}

.record-message {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fb;
  color: #363e51;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 150;
  display: grid;
  gap: 8px;
}

.toast {
  width: min(360px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 11px 13px;
  border: 1px solid #b8d9c8;
  border-radius: 7px;
  background: #f2fbf6;
  color: #275f47;
  box-shadow: var(--shadow);
  font-size: 11px;
  line-height: 1.45;
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-color: #eabac0;
  background: #fff3f4;
  color: var(--red);
}

.toast svg {
  width: 17px;
  height: 17px;
}

.status-absent {
  background: var(--red-soft);
  color: var(--red);
}

.status-muted {
  background: #eef0f4;
  color: #737b8c;
}

.button-danger-quiet {
  border: 1px solid #e9b7bd;
  background: #fff;
  color: var(--red);
}

.button-danger-quiet:hover {
  background: var(--red-soft);
}

.session-toolbar .field-inline select {
  min-width: 340px;
}

.pre-queue-scope {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.pre-queue-scope svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--blue);
}

.pre-queue-scope strong {
  margin: 0 2px;
  color: var(--ink);
}

.session-context-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.session-context-strip > span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.session-context-strip > span:last-child {
  border-right: 0;
}

.session-context-strip svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
}

.session-context-strip strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.session-context-strip .seat-summary {
  margin-left: auto;
  background: var(--green-soft);
}

.preclass-group-delivery {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  background: #f7f9fc;
}

.preclass-group-delivery.warning {
  border-left-color: var(--amber);
  background: #fffaf0;
}

.preclass-group-delivery.error,
.preclass-group-delivery.failed {
  border-left-color: var(--red);
  background: #fff6f6;
}

.preclass-group-delivery.sent {
  border-left-color: var(--green);
  background: #f2fbf6;
}

.preclass-group-heading,
.preclass-group-heading > div,
.preclass-group-actions,
.preclass-group-actions > div {
  display: flex;
  align-items: center;
}

.preclass-group-heading,
.preclass-group-actions {
  justify-content: space-between;
  gap: 12px;
}

.preclass-group-heading > div {
  min-width: 0;
  gap: 9px;
}

.preclass-group-heading svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--blue);
}

.preclass-group-heading strong,
.preclass-group-heading small {
  display: block;
}

.preclass-group-heading strong {
  font-size: 11px;
}

.preclass-group-heading small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.preclass-group-facts,
.preclass-group-confirmation-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.preclass-group-facts > span,
.preclass-group-confirmation-facts > span {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
}

.preclass-group-facts > span:last-child,
.preclass-group-confirmation-facts > span:last-child {
  border-right: 0;
}

.preclass-group-facts small,
.preclass-group-facts strong,
.preclass-group-confirmation-facts small,
.preclass-group-confirmation-facts strong {
  display: block;
}

.preclass-group-facts small,
.preclass-group-confirmation-facts small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
}

.preclass-group-facts strong,
.preclass-group-confirmation-facts strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preclass-group-actions > p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.preclass-group-actions > div {
  flex: 0 0 auto;
  gap: 7px;
}

.preclass-group-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: var(--red);
  font-size: 9px;
  line-height: 1.5;
}

.preclass-group-error svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.preclass-group-confirmation {
  display: grid;
  gap: 16px;
}

.preclass-group-confirmation-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preclass-group-confirmation textarea {
  min-height: 210px;
}

.post-session-context {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.attendance-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.attendance-present {
  background: var(--green-soft);
  color: var(--green);
}

.attendance-absent {
  background: var(--red-soft);
  color: var(--red);
}

.attendance-pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.row-muted td {
  color: #7d8493;
  background: #fafbfc;
}

.attendance-empty {
  min-height: 380px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
}

.attendance-empty > span:first-child {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef1f5;
  color: #6e7686;
}

.attendance-empty > span:first-child svg {
  width: 24px;
  height: 24px;
}

.attendance-empty h3 {
  margin: 0;
  font-size: 15px;
}

.attendance-empty > p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.attendance-result-list {
  display: grid;
  gap: 7px;
  margin: 6px 0 10px;
  text-align: left;
}

.attendance-result-list span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #525b6e;
  font-size: 10px;
}

.attendance-result-list svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.post-attendance-empty {
  min-height: 520px;
}

.pre-actions {
  grid-template-columns: auto 1fr 1fr;
}

.reset-actions {
  position: static;
  margin-top: 4px;
  padding: 12px 0 0;
  backdrop-filter: none;
}

.queue-status-stack {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.attendance-section {
  background: #f8fafc;
}

.attendance-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
}

.attendance-choice button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: #586174;
  font-size: 11px;
  font-weight: 800;
}

.attendance-choice button:last-child {
  border-right: 0;
}

.attendance-choice button.active {
  background: var(--green-soft);
  color: var(--green);
}

.attendance-choice button.active.absent {
  background: var(--red-soft);
  color: var(--red);
}

.attendance-choice svg {
  width: 15px;
  height: 15px;
}

.absence-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-left: 3px solid var(--red);
  background: var(--red-soft);
  font-size: 10px;
}

.absence-note span {
  color: var(--muted);
}

.plan-panel,
.instance-panel,
.archive-session-panel {
  overflow: hidden;
}

.plan-command-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
}

.plan-switcher {
  min-width: 0;
  display: flex;
  flex: 1;
  gap: 6px;
  overflow-x: auto;
}

.plan-switcher button {
  min-width: 210px;
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.plan-switcher button.active {
  border-color: #91a4c8;
  background: #f3f6fb;
  box-shadow: inset 3px 0 0 var(--navy);
}

.plan-switcher strong,
.plan-switcher span {
  overflow-wrap: anywhere;
}

.plan-switcher strong {
  font-size: 11px;
}

.plan-switcher span {
  color: var(--muted);
  font-size: 9px;
}

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

.plan-summary-grid article {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.plan-summary-grid article:last-child {
  border-right: 0;
}

.plan-summary-grid span,
.plan-summary-grid strong,
.plan-summary-grid p {
  display: block;
}

.plan-summary-grid span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.plan-summary-grid strong {
  min-height: 32px;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.plan-summary-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.instance-table {
  min-width: 1040px;
}

.instance-list-table,
.class-options-table,
.active-enrollment-table {
  min-width: 900px;
}

.schedule-form-grid {
  margin-bottom: 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4f586d;
  font-size: 10px;
  font-weight: 700;
}

.check-row input {
  width: 16px;
  height: 16px;
}

.generation-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.generation-preview-list article {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fc;
}

.generation-preview-list span,
.generation-preview-list small {
  color: var(--muted);
  font-size: 9px;
}

.generation-preview-list strong {
  font-size: 11px;
}

.session-change-history {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.session-change-history h3 {
  margin-bottom: 8px;
  font-size: 11px;
}

.session-change-history article,
.schedule-change-list article {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

.session-change-history span,
.schedule-change-list span {
  color: var(--muted);
  font-size: 9px;
}

.session-change-history strong,
.schedule-change-list strong {
  font-size: 11px;
}

.session-change-history p,
.schedule-change-list p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.session-instance-actions {
  margin-top: 14px;
}

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

.schedule-change-list article:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.seat-available {
  color: var(--green);
  font-weight: 800;
}

.section-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f6f8fb;
}

.section-kicker span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.section-kicker p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.assign-trial-link {
  margin-top: 5px;
}

.toolbar-title {
  display: grid;
  gap: 2px;
  margin-right: 8px;
}

.toolbar-title strong {
  font-size: 11px;
}

.toolbar-title span {
  color: var(--muted);
  font-size: 9px;
}

.decision-panel {
  display: grid;
  gap: 10px;
}

.decision-panel > p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.decision-option {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.decision-option:hover {
  border-color: #90a0bd;
  background: #f8faff;
}

.decision-option > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
}

.decision-option svg {
  width: 17px;
  height: 17px;
}

.decision-option strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.decision-option p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.archive-modal-section {
  margin-top: 16px;
}

.archive-modal-section > h3 {
  margin-bottom: 8px;
  font-size: 12px;
}

.modal-roster-table {
  border: 1px solid var(--line);
  border-radius: 7px;
}

.modal-roster-table .data-table {
  min-width: 660px;
}

.archive-message-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.archive-message-row:last-child {
  border-bottom: 0;
}

.archive-message-row > span {
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.archive-message-row strong {
  display: block;
  font-size: 10px;
}

.archive-message-row p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
}

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

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes voice-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(190, 67, 81, 0.18);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(190, 67, 81, 0);
  }
}

.class-management-page {
  gap: 14px;
}

.class-summary-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  overflow: hidden;
}

.class-summary-strip article {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.class-summary-strip article:last-child {
  border-right: 0;
}

.class-summary-strip span,
.class-summary-strip small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.class-summary-strip strong {
  display: block;
  margin: 3px 0 2px;
  font-size: 22px;
  line-height: 1.2;
}

.data-quality-report {
  display: grid;
  gap: 14px;
}

.data-quality-summary article {
  padding: 12px 14px;
}

.data-quality-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.data-quality-heading h3 {
  margin: 0 0 3px;
  font-size: 14px;
}

.data-quality-heading p,
.data-quality-heading small,
.data-quality-table small,
.data-quality-footer {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.data-quality-heading p {
  margin: 0;
}

.data-quality-heading small {
  white-space: nowrap;
}

.data-quality-table td:nth-child(2) {
  width: 150px;
}

.data-quality-count {
  display: inline-grid;
  min-width: 34px;
  min-height: 26px;
  padding: 0 8px;
  place-items: center;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.data-quality-count.is-error {
  background: var(--red-soft);
  color: var(--red);
}

.data-quality-count.is-warning {
  background: var(--amber-soft);
  color: #805515;
}

.data-quality-impact,
.data-quality-breakdown {
  display: block;
  margin-top: 4px;
}

.data-quality-impact {
  white-space: nowrap;
}

.data-quality-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-top: 2px;
}

.class-directory-panel {
  overflow: hidden;
}

.class-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.class-search,
.class-group-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
}

.class-search {
  max-width: 520px;
  padding: 0 10px;
}

.class-campus-filter {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.class-campus-filter select {
  min-width: 104px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 28px 0 9px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.class-search svg,
.class-group-search svg,
.class-map-state svg,
.class-group-choice-icon svg,
.class-group-empty svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.class-search input,
.class-group-search input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.class-result-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.class-directory-table {
  min-width: 1040px;
}

.class-directory-table td:first-child {
  width: 230px;
}

.class-directory-table td:nth-child(2) {
  width: 250px;
}

.class-directory-table td:nth-child(5) {
  width: 220px;
}

.class-slot-list {
  display: grid;
  gap: 6px;
  min-width: 210px;
}

.class-slot-line {
  display: grid;
  gap: 2px;
}

.class-slot-line + .class-slot-line {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.class-slot-line strong,
.class-slot-line small {
  display: block;
  line-height: 1.35;
  white-space: nowrap;
}

.class-source-tag,
.class-map-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}

.class-source-tag.wps {
  border-color: #b8d9e9;
  background: var(--blue-soft);
  color: var(--blue);
}

.class-source-tag.manual {
  background: var(--panel-soft);
  color: var(--muted);
}

.class-map-state.mapped {
  border-color: #afe0c8;
  background: var(--green-soft);
  color: var(--green);
}

.class-map-state.unmapped {
  border-color: #ead19b;
  background: var(--amber-soft);
  color: var(--amber);
}

.class-map-state.invalid {
  border-color: #efbec4;
  background: var(--red-soft);
  color: var(--red);
}

.class-group-owner {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-directory-loading {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
}

.class-directory-loading p {
  margin: 0;
  font-size: 13px;
}

.class-profile-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.class-profile-summary > div {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  background: var(--panel-soft);
}

.class-profile-summary > div:last-child {
  border-right: 0;
}

.class-profile-summary span,
.class-profile-summary strong {
  display: block;
}

.class-profile-summary span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}

.class-profile-summary strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-profile-summary .class-profile-multiline {
  white-space: normal;
}

.class-group-binding-section {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.class-group-binding-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: end;
  gap: 16px;
  margin-bottom: 10px;
}

.class-group-binding-heading > div > span,
.class-group-binding-heading > div > strong {
  display: block;
}

.class-group-binding-heading > div > span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.class-group-binding-heading > div > strong {
  font-size: 14px;
}

.class-group-search {
  padding: 0 9px;
}

.class-group-search input {
  height: 34px;
}

.class-group-choices {
  max-height: 330px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.class-group-choice {
  display: grid;
  grid-template-columns: 18px 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.class-group-choice:last-child {
  border-bottom: 0;
}

.class-group-choice:hover,
.class-group-choice.selected {
  background: var(--blue-soft);
}

.class-group-choice input {
  margin: 0;
}

.class-group-choice-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--blue);
}

.class-group-choice strong,
.class-group-choice small {
  display: block;
}

.class-group-choice strong {
  margin-bottom: 2px;
  font-size: 12px;
}

.class-group-choice small {
  color: var(--muted);
  font-size: 10px;
}

.class-group-empty {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.class-group-more {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 76px;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    padding: 8px 4px;
    text-align: center;
  }

  .nav-item span {
    font-size: 9px;
  }

  .nav-item b,
  .agent-status {
    display: none;
  }

  .preclass-layout {
    grid-template-columns: minmax(540px, 1.35fr) minmax(320px, 0.75fr);
  }

  .postclass-layout {
    grid-template-columns: 160px minmax(400px, 1fr) minmax(320px, 0.75fr);
  }
}

@media (min-width: 761px) and (max-width: 1400px) {
  body.agent-panel-open .preclass-layout,
  body.agent-panel-open .postclass-layout,
  body.agent-panel-open .template-layout,
  body.agent-panel-open .schedule-bottom-grid,
  body.agent-panel-open .two-column {
    grid-template-columns: 1fr;
  }

  body.agent-panel-open .preview-panel {
    position: static;
  }

  body.agent-panel-open .student-queue {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 170px;
    max-height: none;
    overflow-x: auto;
  }

  body.agent-panel-open .student-row {
    border-right: 1px solid #e9ecf3;
    border-bottom: 0;
  }
}

@media (max-width: 1060px) {
  .topbar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .topbar-context {
    display: none;
  }

  .preclass-layout,
  .postclass-layout,
  .template-layout,
  .schedule-bottom-grid {
    grid-template-columns: 1fr;
  }

  .operations-report-grid {
    grid-template-columns: 1fr;
  }

  .operations-detail-panel {
    position: static;
  }

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

  .operations-metrics > div:nth-child(3) {
    border-right: 0;
  }

  .operations-metrics > div:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .preview-panel {
    position: static;
  }

  .student-queue {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 170px;
    max-height: none;
    overflow-x: auto;
  }

  .student-row {
    border-right: 1px solid #e9ecf3;
    border-bottom: 0;
  }

  .student-row strong,
  .student-row .student-identity {
    white-space: nowrap;
  }

  .course-grid {
    max-height: 380px;
  }

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

  .plan-summary-grid article:nth-child(2) {
    border-right: 0;
  }

  .plan-summary-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .class-option-row > div:nth-child(2) {
    border-right: 0;
  }

  .class-option-row > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .sticky-actions.postclass-send-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    min-height: 62px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 9px 11px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .brand-copy h1 {
    font-size: 15px;
  }

  .topbar-actions .button,
  .user-block div {
    display: none;
  }

  .user-switcher {
    min-height: 40px;
    padding: 3px;
  }

  .user-switcher > svg {
    display: none;
  }

  .agent-panel {
    z-index: 70;
    top: 0;
    width: 100vw;
    max-width: none;
    border-left: 0;
  }

  .agent-panel-header {
    min-height: 64px;
  }

  .agent-context-card {
    margin-top: 8px;
  }

  .agent-launcher {
    right: 12px;
    bottom: 12px;
  }

  .app-body {
    min-height: calc(100vh - 62px);
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 25;
    width: 100%;
    height: auto;
    padding: 6px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }

  .main-nav {
    min-width: max-content;
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 108px;
  }

  .nav-item {
    min-height: 46px;
  }

  .workspace {
    padding: 12px;
  }

  .page-header {
    display: grid;
    gap: 10px;
  }

  .page-header h2 {
    font-size: 20px;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .button {
    flex: 1;
  }

  .workflow-strip,
  .stat-grid,
  .mode-grid,
  .two-column,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .workflow-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-strip article:last-child {
    border-bottom: 0;
  }

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

  .mode-choice {
    min-height: 126px;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar-group {
    width: 100%;
    flex-wrap: wrap;
  }

  .field-inline {
    flex: 1;
  }

  .field-inline select {
    min-width: 0;
  }

  .session-toolbar .field-inline,
  .session-toolbar .field-inline select {
    width: 100%;
    min-width: 0;
  }

  .session-context-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .session-context-strip > span,
  .session-context-strip .seat-summary {
    margin-left: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .session-context-strip > span:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .preclass-group-heading,
  .preclass-group-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .preclass-group-heading > .status,
  .preclass-group-actions > div,
  .preclass-group-actions .button {
    width: 100%;
  }

  .preclass-group-actions > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .preclass-group-facts,
  .preclass-group-confirmation-facts {
    grid-template-columns: 1fr 1fr;
  }

  .preclass-group-facts > span:nth-child(2n),
  .preclass-group-confirmation-facts > span:nth-child(2n) {
    border-right: 0;
  }

  .preclass-group-confirmation-facts > span:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .plan-summary-grid {
    grid-template-columns: 1fr;
  }

  .plan-summary-grid article,
  .plan-summary-grid article:nth-child(2),
  .plan-summary-grid article:nth-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .plan-summary-grid article:last-child {
    border-bottom: 0;
  }

  .plan-command-bar {
    flex-direction: column;
  }

  .plan-command-bar > .button {
    width: 100%;
  }

  .plan-switcher button {
    min-width: 190px;
  }

  .generation-preview-list,
  .schedule-change-list {
    grid-template-columns: 1fr;
  }

  .schedule-change-list article:nth-child(odd) {
    border-right: 0;
  }

  .pre-actions {
    grid-template-columns: 1fr;
  }

  .attendance-empty,
  .post-attendance-empty {
    min-height: 300px;
  }

  .section-kicker {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .curriculum-meta,
  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-grid section.full {
    grid-column: auto;
  }

  .schedule-toolbar {
    display: grid;
  }

  .operations-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .operations-toolbar-actions {
    justify-content: space-between;
  }

  .schedule-work-tabs button {
    flex-basis: 148px;
  }

  .schedule-path-banner {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .schedule-path-banner code {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .enrollment-confirm-summary,
  .trial-request-summary {
    grid-template-columns: 1fr;
  }

  .enrollment-confirm-summary > div,
  .trial-request-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .enrollment-confirm-summary > div:last-child,
  .trial-request-summary > div:last-child {
    border-bottom: 0;
  }

  .trial-session-option {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .trial-option-meta {
    grid-column: 2;
    text-align: left;
  }

  .class-option-row {
    grid-template-columns: 1fr;
  }

  .class-option-row > div,
  .class-option-row > div:nth-child(2),
  .class-option-row > div:nth-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .class-option-row > div:last-child {
    border-bottom: 0;
  }

  .schedule-filter {
    width: 100%;
    grid-auto-flow: column;
  }

  .schedule-filter button {
    min-width: 0;
  }

  .schedule-time-compare {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .schedule-time-compare > svg {
    transform: rotate(90deg);
  }

  .relational-time-actions {
    grid-template-columns: 1fr;
  }

  .data-quality-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .data-quality-heading small {
    white-space: normal;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .modal-form-actions .button {
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .voice-modal-actions {
    grid-template-columns: 1fr 1fr;
  }

  .voice-modal-actions #applyVoiceInput {
    grid-column: 1 / -1;
  }

  .agent-role-grid {
    grid-template-columns: 1fr;
  }

  .handoff-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .handoff-strip strong {
    width: 100%;
    margin-right: 0;
  }
}

@media (max-width: 760px) {
  .class-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .class-summary-strip article:nth-child(2) {
    border-right: 0;
  }

  .class-directory-toolbar {
    grid-template-columns: 1fr;
  }

  .class-search {
    max-width: none;
  }

  .class-map-filter {
    width: 100%;
  }

  .class-campus-filter {
    justify-content: space-between;
  }

  .class-result-count {
    justify-self: end;
  }

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

  .class-profile-summary > div:nth-child(2) {
    border-right: 0;
  }

  .class-profile-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .class-group-binding-heading {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

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

  .ai-growth-output-header,
  .ai-growth-output-footer {
    align-items: flex-start;
  }

  .ai-growth-output-footer {
    flex-direction: column;
  }

  .ai-growth-output-footer .table-link {
    align-self: flex-end;
  }

  .ai-growth-image-frame {
    min-height: 280px;
  }
}

/* WeCom schedule entry: keep the read-only calendar focused on one job. */
body.schedule-calendar-surface {
  min-height: 100vh;
  background: #eef1f6;
}

body.schedule-calendar-surface .topbar,
body.schedule-calendar-surface .sidebar,
body.schedule-calendar-surface .agent-panel,
body.schedule-calendar-surface .agent-launcher {
  display: none !important;
}

body.schedule-calendar-surface .app-body {
  min-height: 100vh;
  display: block;
}

body.schedule-calendar-surface .workspace {
  width: 100%;
  min-height: 100vh;
  padding: 0;
  background: transparent;
}

.schedule-calendar-focus-shell {
  width: min(100%, 1480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 40px) 40px;
  color: var(--ink);
}

.schedule-calendar-focus-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.schedule-calendar-focus-kicker {
  color: #69738a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.schedule-calendar-focus-header h1 {
  margin: 4px 0 3px;
  color: #15145f;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
}

.schedule-calendar-focus-header p {
  margin: 0;
  color: #69738a;
  font-size: 11px;
}

.schedule-calendar-focus-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid #c6d0e0;
  border-radius: 5px;
  background: #fff;
  color: #4e5b72;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-calendar-focus-status svg {
  width: 14px;
  height: 14px;
  color: #17805d;
}

.focused-calendar-shell {
  border: 1px solid #d5dce8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 43, 74, 0.05);
  overflow: hidden;
}

.focused-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.focused-calendar-switch,
.focused-calendar-period {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.focused-calendar-switch {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5f7fb;
}

.focused-calendar-switch button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.focused-calendar-switch button.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(26, 35, 65, 0.1);
}

.focused-calendar-switch svg {
  width: 14px;
  height: 14px;
}

.focused-calendar-period strong {
  min-width: 130px;
  color: var(--navy);
  font-size: 12px;
  text-align: center;
}

.focused-calendar-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.focused-calendar-summary > div {
  display: grid;
  gap: 3px;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}

.focused-calendar-summary > div:last-child { border-right: 0; }
.focused-calendar-summary strong { color: var(--navy); font-size: 19px; line-height: 1; }
.focused-calendar-summary span { color: var(--muted); font-size: 9px; }

.focused-calendar-desktop {
  overflow-x: auto;
}

.focused-calendar-week {
  min-width: 1050px;
  display: grid;
  grid-template-columns: 112px repeat(7, minmax(130px, 1fr));
  background: var(--line);
  gap: 1px;
}

.focused-calendar-corner,
.focused-calendar-day,
.focused-calendar-time,
.focused-calendar-cell {
  min-width: 0;
  background: #fff;
}

.focused-calendar-corner,
.focused-calendar-day {
  min-height: 48px;
  display: grid;
  place-content: center;
  gap: 2px;
  background: #f5f7fb;
  color: var(--navy);
  text-align: center;
  font-size: 10px;
}

.focused-calendar-day small,
.focused-calendar-time span { color: var(--muted); font-size: 9px; }
.focused-calendar-time { min-height: 118px; display: grid; align-content: center; gap: 3px; padding: 9px; background: #fafbfc; }
.focused-calendar-time strong { color: var(--navy); font-size: 10px; }
.focused-calendar-cell { min-height: 118px; display: grid; align-content: start; gap: 5px; padding: 5px; }
.focused-calendar-cell .schedule-card { min-width: 0; }

.focused-calendar-month {
  min-width: 1000px;
  background: var(--line);
}

.focused-month-weekdays,
.focused-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(136px, 1fr));
  gap: 1px;
}

.focused-month-weekdays span {
  min-height: 38px;
  display: grid;
  place-items: center;
  background: #f5f7fb;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
}

.focused-month-cell {
  min-height: 142px;
  padding: 7px;
  background: #fff;
}

.focused-month-cell.is-outside-month { background: #f7f9fb; }
.focused-month-cell header { display: flex; align-items: baseline; justify-content: space-between; min-height: 22px; margin-bottom: 4px; }
.focused-month-cell header strong { color: var(--navy); font-size: 13px; }
.focused-month-cell header span { color: var(--muted); font-size: 9px; }
.focused-month-cell > div { display: grid; align-content: start; gap: 4px; }
.focused-month-cell .schedule-card { padding: 5px 6px; }
.focused-month-cell .schedule-card-top strong { font-size: 9px; }
.focused-month-cell .schedule-card > span:not(.schedule-card-top),
.focused-month-cell .schedule-card > small { font-size: 8px; }

.focused-mobile-agenda { display: none; }
.focused-calendar-source { margin: 0; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }

body.schedule-calendar-surface .operations-shell {
  gap: 14px;
}

body.schedule-calendar-surface .operations-toolbar.is-focused {
  justify-content: flex-end;
}

body.schedule-calendar-surface .operations-toolbar,
body.schedule-calendar-surface .operations-metrics,
body.schedule-calendar-surface .operations-calendar-panel,
body.schedule-calendar-surface .operations-batch-list,
body.schedule-calendar-surface .operations-batch-detail,
body.schedule-calendar-surface .operations-detail-panel {
  border-color: #d5dce8;
  box-shadow: 0 8px 24px rgba(30, 43, 74, 0.05);
}

@media (max-width: 700px) {
  .schedule-calendar-focus-shell {
    padding: 16px 10px 28px;
  }

  .schedule-calendar-focus-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .schedule-calendar-focus-header h1 {
    font-size: 24px;
  }

  body.schedule-calendar-surface .operations-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  body.schedule-calendar-surface .operations-toolbar-actions {
    justify-content: space-between;
  }

  body.schedule-calendar-surface .operations-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.schedule-calendar-surface .operations-metrics > div {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  body.schedule-calendar-surface .operations-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  body.schedule-calendar-surface .operations-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .focused-calendar-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .focused-calendar-switch { order: 1; }
  .focused-calendar-period { order: 2; flex: 1; justify-content: center; }
  .focused-calendar-toolbar > .button { order: 3; }
  .focused-calendar-period strong { min-width: 0; }
  .focused-calendar-desktop { display: none; }
  .focused-mobile-agenda { display: block; }
  .focused-mobile-day-strip,
  .focused-mobile-month-grid { display: grid; gap: 5px; padding: 10px; border-bottom: 1px solid var(--line); }
  .focused-mobile-day-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .focused-mobile-day-strip button { min-width: 0; display: grid; gap: 4px; padding: 7px 3px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); font-size: 9px; }
  .focused-mobile-day-strip button strong { color: var(--navy); font-size: 13px; }
  .focused-mobile-day-strip button.active { border-color: #7aa9bf; background: #edf7f9; color: var(--deep); }
  .focused-mobile-month-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .focused-mobile-weekday { padding: 2px 0; color: var(--muted); font-size: 9px; text-align: center; }
  .focused-mobile-date { position: relative; min-height: 34px; padding: 5px 3px; border: 1px solid transparent; border-radius: 4px; background: #f7f9fb; color: var(--navy); font-size: 10px; }
  .focused-mobile-date.outside { color: #b0b9c7; background: #fbfcfd; }
  .focused-mobile-date.active { border-color: #7aa9bf; background: #edf7f9; }
  .focused-mobile-date b { position: absolute; right: 3px; bottom: 2px; color: #17805d; font-size: 8px; }
  .focused-mobile-day-agenda { padding: 12px 10px 14px; }
  .focused-mobile-day-agenda > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
  .focused-mobile-day-agenda > header strong { color: var(--navy); font-size: 12px; }
  .focused-mobile-day-agenda > header span { color: var(--muted); font-size: 9px; }
  .focused-mobile-agenda-row { width: 100%; display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
  .focused-mobile-agenda-row > strong { color: var(--navy); font-size: 10px; }
  .focused-mobile-agenda-row > span { min-width: 0; display: grid; gap: 3px; }
  .focused-mobile-agenda-row > span b { overflow: hidden; color: var(--navy); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .focused-mobile-agenda-row > span small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .focused-mobile-agenda-row em { padding: 3px 5px; border-radius: 3px; font-size: 8px; font-style: normal; white-space: nowrap; }
  .focused-mobile-agenda-row em.schedule-l,
  .focused-mobile-agenda-row em.schedule-m { color: #28613b; background: #e7f4ea; }
  .focused-mobile-agenda-row em.schedule-trial,
  .focused-mobile-agenda-row em.schedule-reserved { color: #27627a; background: #e8f4fa; }
  .focused-mobile-agenda-row em.schedule-conflict { color: #a23b48; background: #fbeaec; }
  .focused-mobile-empty { padding: 28px 0; color: var(--muted); font-size: 10px; text-align: center; }
  .focused-calendar-summary > div { padding: 9px 10px; }
  .focused-calendar-summary strong { font-size: 17px; }
  .focused-calendar-source { padding: 9px 10px; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Ontology workbench shell: desktop task canvas and WeCom narrow task focus. */
body.academic-task-mode {
  --academic-ink: #141a2d;
  --academic-deep: #15145f;
  --academic-cyan: #087eae;
  --academic-coral: #df675b;
  --academic-mint: #17805d;
  --academic-amber: #a86500;
  --academic-canvas: #f4f6f9;
  --academic-paper: #ffffff;
  --academic-line: #dbe0ea;
  --academic-line-strong: #bcc7d8;
  --academic-muted: #667087;
}

.academic-main-nav {
  align-content: start;
}

.academic-nav-label {
  margin: 2px 9px 7px;
  color: var(--academic-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

.academic-main-nav .nav-item.active {
  border-color: #c3cce4;
  background: #eff1fa;
  box-shadow: inset 3px 0 0 var(--academic-coral);
}

.academic-main-nav .nav-item b:empty,
.academic-main-nav .nav-item b:not(:empty) {
  border-radius: 10px;
}

body.academic-task-mode:not(.academic-compact-mode) .workspace {
  padding: 0;
  background: var(--academic-canvas);
}

@media (min-width: 761px) {
  body.academic-task-mode.agent-panel-open .app-body {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 352px;
  }

  body.academic-task-mode.agent-panel-open .agent-panel {
    width: 352px;
  }
}

body.academic-task-mode #agentMapButton,
body.academic-task-mode #leadNotificationSettingButton,
body.academic-task-mode #resetButton {
  display: none;
}

.academic-shell {
  min-width: 0;
  color: var(--academic-ink);
}

.academic-shell button:disabled {
  cursor: not-allowed;
}

.academic-shell-full {
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
}

.academic-task-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 22px 24px 20px 28px;
  border-bottom: 1px solid var(--academic-line);
  background: var(--academic-paper);
  box-shadow: inset 4px 0 0 var(--academic-coral);
}

.academic-task-heading,
.academic-task-heading > * {
  min-width: 0;
}

.academic-task-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--academic-cyan);
  font-size: 10px;
  font-weight: 800;
}

.academic-task-kicker span + span {
  padding-left: 8px;
  border-left: 1px solid var(--academic-line-strong);
  color: var(--academic-muted);
}

.academic-task-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.academic-task-title-row h2 {
  margin: 0;
  color: var(--academic-deep);
  font-size: 23px;
  line-height: 1.3;
}

.academic-task-heading > p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--academic-muted);
  font-size: 12px;
  line-height: 1.65;
}

.academic-status-chip {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--academic-line);
  border-radius: 5px;
  background: #f7f8fb;
  color: var(--academic-muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.academic-status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.academic-status-chip.tone-info,
.academic-queue-item em.tone-info {
  border-color: #bcd9e6;
  background: #edf8fc;
  color: var(--academic-cyan);
}

.academic-status-chip.tone-warning,
.academic-queue-item em.tone-warning {
  border-color: #ead19b;
  background: #fff7e7;
  color: var(--academic-amber);
}

.academic-status-chip.tone-success,
.academic-queue-item em.tone-success {
  border-color: #b5dfcb;
  background: #edf8f2;
  color: var(--academic-mint);
}

.academic-status-chip.tone-danger,
.academic-queue-item em.tone-danger {
  border-color: #ecc0c5;
  background: #fff0f2;
  color: var(--red);
}

.academic-task-meta {
  min-width: 250px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: center;
  margin: 0;
  border: 1px solid var(--academic-line);
  border-radius: 6px;
  background: #fafbfc;
}

.academic-task-meta > div {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--academic-line);
}

.academic-task-meta > div:last-child {
  border-right: 0;
}

.academic-task-meta dt,
.academic-root-facts dt,
.academic-agent-facts dt {
  margin-bottom: 4px;
  color: var(--academic-muted);
  font-size: 9px;
  font-weight: 700;
}

.academic-task-meta dd,
.academic-root-facts dd,
.academic-agent-facts dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--academic-ink);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--academic-line);
  background: #fbfcfd;
}

.academic-metric-strip article {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px 18px;
  border-right: 1px solid var(--academic-line);
}

.academic-metric-strip article:last-child {
  border-right: 0;
}

.academic-metric-strip span {
  color: var(--academic-muted);
  font-size: 10px;
  font-weight: 700;
}

.academic-metric-strip strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: var(--academic-deep);
  font-size: 23px;
  line-height: 1;
}

.academic-metric-strip small {
  color: #8b93a4;
  font-size: 9px;
}

.academic-business-canvas {
  min-width: 0;
  flex: 1;
  padding: 18px;
}

.academic-inbox-layout {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(236px, 0.34fr) minmax(0, 1fr);
  border: 1px solid var(--academic-line);
  border-radius: 7px;
  background: var(--academic-paper);
  overflow: hidden;
}

.academic-queue {
  min-width: 0;
  padding: 16px 12px;
  border-right: 1px solid var(--academic-line);
  background: #fafbfc;
}

.academic-section-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.academic-section-heading > div {
  min-width: 0;
}

.academic-section-heading > div > span,
.academic-primary-action > div > span,
.academic-agent-rail-heading > span:first-child,
.academic-agent-gaps > span,
.academic-agent-evidence > span {
  display: block;
  margin-bottom: 3px;
  color: var(--academic-cyan);
  font-size: 9px;
  font-weight: 800;
}

.academic-section-heading h3 {
  margin: 0;
  color: var(--academic-ink);
  font-size: 15px;
  line-height: 1.35;
}

.academic-section-heading p {
  margin: 4px 0 0;
  color: var(--academic-muted);
  font-size: 10px;
  line-height: 1.45;
}

.academic-queue-count,
.academic-result-count {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 3px 7px;
  border: 1px solid var(--academic-line);
  border-radius: 5px;
  color: var(--academic-muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.academic-queue-list {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.academic-queue-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--academic-ink);
  text-align: left;
}

.academic-queue-item:hover {
  border-color: var(--academic-line);
  background: var(--academic-paper);
}

.academic-queue-item.is-active {
  border-color: #c5cde3;
  background: #f0f2fa;
  box-shadow: inset 3px 0 0 var(--academic-coral);
}

.academic-queue-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #eceff7;
  color: var(--academic-deep);
}

.academic-queue-icon svg {
  width: 15px;
  height: 15px;
}

.academic-queue-item > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.academic-queue-item strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-queue-item small {
  overflow: hidden;
  color: var(--academic-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-queue-item em {
  padding: 3px 5px;
  border: 1px solid var(--academic-line);
  border-radius: 4px;
  color: var(--academic-muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.academic-focus-pane {
  min-width: 0;
  padding: 18px;
}

.academic-focus-heading {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--academic-line);
}

.academic-focus-heading .button svg,
.academic-open-full svg,
.academic-primary-action .button svg {
  width: 15px;
  height: 15px;
}

.academic-root-summary {
  display: grid;
  grid-template-columns: minmax(185px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--academic-line);
  border-radius: 6px;
  background: #fbfcfd;
}

.academic-root-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.academic-root-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 6px;
  background: var(--academic-deep);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.academic-root-identity > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.academic-root-identity span:not(.academic-root-avatar),
.academic-root-identity small {
  overflow: hidden;
  color: var(--academic-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-root-identity strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-root-facts {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.academic-root-facts > div {
  min-width: 0;
  padding: 2px 10px;
  border-left: 1px solid var(--academic-line);
}

.academic-root-facts > div:nth-child(3n + 1) {
  border-left: 0;
}

.academic-root-facts > div:nth-child(n + 4) {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--academic-line);
}

.academic-task-canvas {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.86fr);
  gap: 14px;
}

.academic-task-facts-column,
.academic-task-tools-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.academic-task-canvas .academic-root-summary {
  margin-top: 0;
  background: var(--academic-paper);
}

.academic-context-panel,
.academic-capabilities,
.academic-pending-action,
.academic-version-panel {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--academic-line);
  border-radius: 6px;
  background: var(--academic-paper);
}

.academic-context-panel.is-ready {
  border-color: #b9decd;
  background: #f5fbf8;
}

.academic-context-panel.is-incomplete {
  border-color: #e4c890;
  background: #fffbf2;
}

.academic-context-state {
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: var(--academic-muted);
  font-size: 8px;
  font-weight: 800;
}

.academic-context-panel.is-ready .academic-context-state {
  color: var(--academic-mint);
}

.academic-context-panel.is-incomplete .academic-context-state {
  color: var(--academic-amber);
}

.academic-context-contract,
.academic-pending-action dl,
.academic-version-panel dl {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 11px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--academic-line);
}

.academic-context-contract > div,
.academic-pending-action dl > div,
.academic-version-panel dl > div {
  min-width: 0;
}

.academic-context-contract dt,
.academic-pending-action dt,
.academic-version-panel dt {
  margin-bottom: 3px;
  color: var(--academic-muted);
  font-size: 8px;
  font-weight: 700;
}

.academic-context-contract dd,
.academic-pending-action dd,
.academic-version-panel dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-capability-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 11px;
}

.academic-capability-grid > div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--academic-line);
  border-radius: 5px;
  background: #fafbfc;
}

.academic-capability-grid > div > span {
  display: block;
  margin-bottom: 7px;
  color: var(--academic-muted);
  font-size: 8px;
  font-weight: 800;
}

.academic-capability-list {
  min-width: 0;
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.academic-capability-list li,
.academic-capability-list code,
.academic-pending-action code {
  min-width: 0;
  overflow: hidden;
  color: var(--academic-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-capability-empty,
.academic-capability-note,
.academic-pending-action > p {
  margin: 0;
  color: var(--academic-muted);
  font-size: 8px;
  line-height: 1.5;
}

.academic-capability-note {
  margin-top: 9px;
}

.academic-pending-action.needs-confirmation {
  border-color: #e4c890;
  box-shadow: inset 3px 0 0 var(--academic-amber);
}

.academic-pending-action .academic-section-heading > svg,
.academic-version-panel .academic-section-heading > svg {
  width: 17px;
  height: 17px;
  color: var(--academic-cyan);
}

.academic-pending-action.needs-confirmation .academic-section-heading > svg {
  color: var(--academic-amber);
}

.academic-pending-action.is-empty .academic-section-heading > svg {
  color: var(--academic-muted);
}

.academic-pending-action.is-empty > p {
  margin-top: 9px;
}

.academic-content-hash {
  margin-top: 9px !important;
  overflow: hidden;
  padding: 6px 7px;
  border-radius: 4px;
  background: #f5f6f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-preview-candidates {
  margin-top: 14px;
}

.academic-inbox-support {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.academic-inbox-support .academic-capabilities {
  grid-column: 1 / -1;
}

.academic-candidate-list {
  display: grid;
  gap: 8px;
}

.academic-candidate {
  min-width: 0;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 74px;
  align-items: stretch;
  border: 1px solid var(--academic-line);
  border-radius: 6px;
  background: var(--academic-paper);
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.academic-candidate:hover:not(.is-blocked) {
  border-color: #aebad0;
}

.academic-candidate.is-selected {
  border-color: #9eabd0;
  box-shadow: inset 4px 0 0 var(--academic-coral);
}

.academic-candidate.is-blocked {
  background: #fafafa;
  opacity: 0.76;
}

.academic-candidate-select {
  min-width: 0;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 11px 9px 11px 12px;
  border: 0;
  border-right: 1px solid var(--academic-line);
  background: #f8f9fc;
  color: var(--academic-ink);
  text-align: left;
}

.academic-choice-mark {
  width: 13px;
  height: 13px;
  border: 1px solid #9ba6ba;
  border-radius: 50%;
  background: #fff;
}

.academic-candidate.is-selected .academic-choice-mark {
  border: 4px solid var(--academic-cyan);
}

.academic-candidate-time {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.academic-candidate-time strong,
.academic-candidate-time small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-candidate-time strong {
  font-size: 11px;
}

.academic-candidate-time small {
  color: var(--academic-muted);
  font-size: 9px;
}

.academic-candidate-main {
  min-width: 0;
  padding: 10px 12px;
}

.academic-candidate-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.academic-candidate-title strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-candidate-title span {
  flex: 0 0 auto;
  color: var(--academic-cyan);
  font-size: 9px;
  font-weight: 800;
}

.academic-candidate-main > p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--academic-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-reason-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 9px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.academic-reason-list li {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #4d586f;
  font-size: 8px;
}

.academic-reason-list svg,
.academic-block-reason svg {
  width: 11px;
  height: 11px;
  color: var(--academic-mint);
}

.academic-block-reason {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: var(--red);
  font-size: 9px;
}

.academic-block-reason svg {
  color: var(--red);
}

.academic-candidate-score {
  min-width: 0;
  display: grid;
  place-content: center;
  gap: 2px;
  padding: 9px;
  border-left: 1px solid var(--academic-line);
  text-align: center;
}

.academic-candidate-score span,
.academic-candidate-score small {
  color: var(--academic-muted);
  font-size: 8px;
}

.academic-candidate-score strong {
  color: var(--academic-deep);
  font-size: 18px;
}

.academic-canvas-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(238px, 0.65fr);
  gap: 14px;
}

.academic-canvas-main,
.academic-canvas-aside,
.academic-data-surface {
  min-width: 0;
}

.academic-canvas-main,
.academic-data-surface {
  padding: 17px;
  border: 1px solid var(--academic-line);
  border-radius: 7px;
  background: var(--academic-paper);
}

.academic-candidate-heading {
  align-items: center;
  margin-bottom: 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--academic-line);
}

.academic-canvas-aside {
  display: grid;
  align-content: start;
  gap: 12px;
}

.academic-canvas-aside .academic-root-summary {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.academic-canvas-aside .academic-root-facts {
  grid-template-columns: 1fr;
}

.academic-canvas-aside .academic-root-facts > div {
  padding: 8px 0;
  border-top: 1px solid var(--academic-line);
  border-left: 0;
}

.academic-gap-panel {
  padding: 13px;
  border: 1px solid var(--academic-line);
  border-radius: 6px;
  background: var(--academic-paper);
}

.academic-gap-panel.has-gaps {
  border-color: #e4c890;
  background: #fffbf2;
}

.academic-gap-panel.is-clear {
  border-color: #b9decd;
  background: #f1faf5;
}

.academic-gap-panel .academic-section-heading > svg {
  width: 18px;
  height: 18px;
  color: var(--academic-amber);
}

.academic-gap-panel.is-clear .academic-section-heading > svg {
  color: var(--academic-mint);
}

.academic-gap-panel ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid rgba(168, 101, 0, 0.18);
  list-style: none;
}

.academic-gap-panel li {
  display: grid;
  gap: 2px;
}

.academic-gap-panel li strong {
  color: #63470d;
  font-size: 10px;
}

.academic-gap-panel li span,
.academic-gap-panel > p {
  margin: 0;
  color: var(--academic-muted);
  font-size: 9px;
  line-height: 1.5;
}

.academic-empty-state {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border: 1px dashed var(--academic-line-strong);
  color: var(--academic-muted);
  text-align: left;
}

.academic-empty-state > svg {
  width: 22px;
  height: 22px;
}

.academic-empty-state strong {
  color: var(--academic-ink);
  font-size: 12px;
}

.academic-empty-state p {
  margin: 3px 0 0;
  font-size: 10px;
  line-height: 1.5;
}

.academic-primary-action {
  position: sticky;
  bottom: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--academic-line-strong);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -5px 16px rgba(28, 35, 66, 0.06);
  backdrop-filter: blur(10px);
}

.academic-primary-action > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.academic-primary-action strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academic-primary-action small {
  color: var(--academic-muted);
  font-size: 9px;
}

.academic-primary-action .button {
  min-width: 176px;
  justify-content: center;
}

.academic-data-surface > .academic-section-heading {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--academic-line);
}

.academic-table-wrap {
  max-width: 100%;
  margin-top: 11px;
  overflow-x: auto;
}

.academic-table-wrap table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
}

.academic-table-wrap th,
.academic-table-wrap td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--academic-line);
  color: var(--academic-ink);
  font-size: 10px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.academic-table-wrap th {
  color: var(--academic-muted);
  font-size: 9px;
  font-weight: 800;
}

.academic-table-wrap tbody tr:hover {
  background: #fafbfc;
}

.academic-agent-rail {
  display: grid;
  gap: 10px;
  margin: 10px 12px 0;
  padding: 11px;
  border: 1px solid #cbd3e4;
  border-radius: 7px;
  background: #f8f9fd;
}

.academic-agent-rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--academic-line);
}

.academic-agent-rail-heading > span:first-child {
  margin: 0;
}

.academic-agent-facts {
  display: grid;
  gap: 7px;
  margin: 0;
}

.academic-agent-facts > div {
  min-width: 0;
}

.academic-agent-gaps,
.academic-agent-evidence {
  padding-top: 8px;
  border-top: 1px solid var(--academic-line);
}

.academic-agent-gaps ul,
.academic-agent-evidence ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 15px;
  color: #4f596e;
  font-size: 9px;
  line-height: 1.45;
}

.academic-agent-gaps p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--academic-mint);
  font-size: 9px;
}

.academic-agent-gaps p svg {
  width: 13px;
  height: 13px;
}

body.academic-task-mode:not(.academic-compact-mode) .agent-panel {
  grid-template-rows: auto auto auto minmax(140px, 1fr) auto auto auto;
}

body.academic-task-mode:not(.academic-compact-mode) .agent-panel-header {
  min-height: 66px;
}

body.academic-task-mode:not(.academic-compact-mode) .agent-messages {
  padding-top: 11px;
}

.academic-compact-bar,
.academic-open-full,
.academic-security-note {
  display: none;
}

@media (max-width: 1260px) {
  .academic-task-header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .academic-task-meta {
    width: 100%;
  }

  .academic-canvas-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1080px) {
  .academic-inbox-layout {
    grid-template-columns: 1fr;
  }

  .academic-queue {
    border-right: 0;
    border-bottom: 1px solid var(--academic-line);
  }

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

  .academic-root-summary {
    grid-template-columns: 1fr;
  }

  .academic-root-facts > div:first-child {
    border-left: 0;
  }

  .academic-task-canvas {
    grid-template-columns: 1fr;
  }

  .academic-inbox-support {
    grid-template-columns: 1fr;
  }

  .academic-inbox-support .academic-capabilities {
    grid-column: auto;
  }
}

body.academic-compact-mode {
  background: #f3f5f8;
}

body.academic-compact-mode .topbar,
body.academic-compact-mode .sidebar,
body.academic-compact-mode .agent-panel,
body.academic-compact-mode .agent-launcher {
  display: none !important;
}

body.academic-compact-mode .app-body {
  min-height: 100vh;
  display: block;
}

body.academic-compact-mode .workspace {
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
  background: var(--academic-paper);
  box-shadow: 0 0 28px rgba(24, 31, 61, 0.08);
}

.academic-shell-compact {
  min-height: 100vh;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  background: var(--academic-paper);
}

.academic-compact-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--academic-line);
  background: #fff;
}

.academic-compact-bar > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.academic-compact-bar > div > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.academic-compact-bar strong {
  font-size: 12px;
}

.academic-compact-bar small {
  color: var(--academic-muted);
  font-size: 9px;
}

.academic-compact-brand {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 6px;
  background: var(--academic-deep);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.academic-shell-compact .academic-task-header {
  display: block;
  padding: 18px 16px 15px 20px;
  box-shadow: inset 4px 0 0 var(--academic-coral);
}

.academic-shell-compact .academic-task-title-row h2 {
  max-width: 100%;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.academic-shell-compact .academic-task-title-row .academic-status-chip {
  display: none;
}

.academic-shell-compact .academic-task-heading > p {
  font-size: 11px;
  line-height: 1.6;
}

.academic-shell-compact .academic-task-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  margin-top: 12px;
}

.academic-shell-compact .academic-task-meta > div {
  padding: 8px;
}

.academic-shell-compact .academic-task-meta dd {
  font-size: 10px;
}

.academic-shell-compact .academic-root-summary {
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 12px;
  padding: 12px;
}

.academic-shell-compact .academic-root-facts {
  grid-template-columns: 1fr;
}

.academic-shell-compact .academic-root-facts > div {
  padding: 7px 0;
  border-top: 1px solid var(--academic-line);
  border-left: 0;
}

.academic-shell-compact .academic-context-panel,
.academic-shell-compact .academic-capabilities,
.academic-shell-compact .academic-pending-action,
.academic-shell-compact .academic-version-panel {
  margin: 0 12px 12px;
}

.academic-shell-compact .academic-context-contract,
.academic-shell-compact .academic-pending-action dl,
.academic-shell-compact .academic-version-panel dl,
.academic-shell-compact .academic-capability-grid {
  grid-template-columns: 1fr;
}

.academic-shell-compact .academic-context-contract dd,
.academic-shell-compact .academic-pending-action dd,
.academic-shell-compact .academic-version-panel dd,
.academic-shell-compact .academic-capability-list code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.academic-shell-compact .academic-root-facts dd {
  white-space: normal;
  overflow-wrap: anywhere;
}

.academic-compact-section {
  padding: 14px 12px;
  border-top: 7px solid #f2f4f7;
}

.academic-shell-compact .academic-section-heading {
  align-items: center;
  margin-bottom: 10px;
}

.academic-shell-compact .academic-candidate-list {
  gap: 9px;
}

.academic-shell-compact .academic-candidate {
  grid-template-columns: 92px minmax(0, 1fr);
}

.academic-shell-compact .academic-candidate-select {
  grid-template-columns: 13px minmax(0, 1fr);
  gap: 6px;
  padding: 10px 7px 10px 9px;
}

.academic-shell-compact .academic-candidate-main {
  padding: 9px;
}

.academic-shell-compact .academic-candidate-title {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.academic-shell-compact .academic-candidate-title strong,
.academic-shell-compact .academic-candidate-main > p {
  white-space: normal;
  overflow-wrap: anywhere;
}

.academic-shell-compact .academic-reason-list {
  display: grid;
  gap: 3px;
}

.academic-shell-compact .academic-candidate-score {
  grid-column: 1 / -1;
  grid-template-columns: auto auto 1fr;
  place-content: initial;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-top: 1px solid var(--academic-line);
  border-left: 0;
  text-align: left;
}

.academic-shell-compact .academic-candidate-score strong {
  font-size: 13px;
}

.academic-shell-compact .academic-candidate-score small {
  justify-self: end;
}

.academic-shell-compact .academic-gap-panel {
  margin: 0 12px 12px;
}

.academic-shell-compact .academic-primary-action {
  position: static;
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding: 14px 12px;
  border-bottom: 1px solid var(--academic-line);
  box-shadow: none;
  backdrop-filter: none;
}

.academic-shell-compact .academic-primary-action strong,
.academic-shell-compact .academic-primary-action small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.academic-shell-compact .academic-primary-action .button {
  width: 100%;
  min-height: 44px;
}

.academic-open-full {
  width: calc(100% - 24px);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 13px 12px 0;
  padding: 10px 12px;
  border: 1px solid #bfc9dc;
  border-radius: 6px;
  background: #f7f8fc;
  color: var(--academic-deep);
}

.academic-open-full:hover {
  border-color: #95a3c4;
  background: #f0f2f9;
}

.academic-open-full > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.academic-open-full svg {
  width: 16px;
  height: 16px;
}

.academic-open-full strong {
  font-size: 12px;
}

.academic-security-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 9px 14px 0;
  color: var(--academic-muted);
  font-size: 9px;
  line-height: 1.5;
}

.academic-security-note svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  color: var(--academic-mint);
}

.agent-formal-class-card {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #cdd7e8;
  border-radius: 7px;
  background: #f8faff;
}

.agent-formal-class-card.is-detail {
  background: #f5f8fd;
}

.agent-formal-class-card-heading,
.formal-class-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.agent-formal-class-card-heading span:first-child,
.formal-class-section-heading span,
.formal-class-readonly-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.agent-formal-class-card-heading strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 15px;
}

.formal-class-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid #b9d4ea;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.agent-formal-class-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.agent-formal-class-facts span {
  min-width: 0;
  padding: 8px 9px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.agent-formal-class-facts span:last-child {
  border-right: 0;
  color: var(--ink);
  font-weight: 800;
}

.agent-formal-class-list {
  display: grid;
  gap: 6px;
}

.agent-formal-class-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(150px, 0.9fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.agent-formal-class-row:hover,
.agent-formal-class-row:focus-visible {
  border-color: #9fb3d3;
  background: #f3f7fe;
  outline: 0;
}

.agent-formal-class-row span {
  min-width: 0;
}

.agent-formal-class-row strong,
.agent-formal-class-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-formal-class-row strong {
  font-size: 12px;
}

.agent-formal-class-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.agent-formal-class-row b {
  display: block;
  font-size: 11px;
  text-align: right;
}

.agent-formal-class-row > svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.agent-formal-class-empty,
.formal-class-empty-line,
.class-card-loading {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.formal-class-card-content {
  display: grid;
  gap: 14px;
}

.formal-class-card-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
}

.formal-class-card-tab {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.formal-class-card-tab:hover,
.formal-class-card-tab.active {
  border-bottom-color: var(--blue);
  color: var(--blue);
}

.formal-class-card-tab svg {
  width: 14px;
  height: 14px;
}

.formal-class-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 12px;
}

.formal-class-info-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.formal-class-section-heading {
  margin-bottom: 12px;
}

.formal-class-section-heading h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 14px;
}

.formal-class-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.formal-class-detail-grid div {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.formal-class-detail-grid dt,
.formal-class-detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.formal-class-detail-grid dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
}

.formal-class-detail-grid dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.formal-class-slot-preview,
.formal-class-staff-list,
.formal-class-curriculum-list {
  display: grid;
  gap: 7px;
}

.formal-class-slot-preview > div,
.formal-class-staff-list article,
.formal-class-curriculum-list article {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.formal-class-slot-preview strong,
.formal-class-slot-preview span,
.formal-class-slot-preview small,
.formal-class-curriculum-list strong,
.formal-class-curriculum-list span,
.formal-class-curriculum-list small {
  display: block;
}

.formal-class-slot-preview strong,
.formal-class-curriculum-list strong {
  font-size: 12px;
}

.formal-class-slot-preview span,
.formal-class-curriculum-list span {
  margin-top: 3px;
  color: var(--ink);
  font-size: 11px;
}

.formal-class-slot-preview small,
.formal-class-curriculum-list small,
.formal-class-staff-list p,
.formal-class-staff-list article > small {
  color: var(--muted);
  font-size: 10px;
}

.formal-class-staff-list article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.formal-class-staff-list article > div {
  min-width: 0;
}

.formal-class-staff-list article strong {
  display: block;
  font-size: 12px;
}

.formal-class-staff-list p {
  margin: 3px 0 0;
}

.formal-class-edit-form {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.formal-class-edit-form .field {
  max-width: 220px;
}

.formal-class-readonly-label {
  flex: 0 1 auto;
  padding-top: 2px;
  text-align: right;
}

.compact-notice {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .agent-formal-class-facts,
  .formal-class-overview-grid {
    grid-template-columns: 1fr;
  }

  .agent-formal-class-facts span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .agent-formal-class-facts span:last-child {
    border-bottom: 0;
  }

  .agent-formal-class-row {
    grid-template-columns: minmax(0, 1fr) auto 15px;
  }

  .agent-formal-class-row > span:nth-child(2) {
    min-width: 74px;
  }

  .formal-class-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .formal-class-readonly-label {
    padding-top: 0;
    text-align: left;
  }

  .formal-class-detail-grid {
    grid-template-columns: 1fr;
  }

  .formal-class-info-panel {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  body.academic-compact-mode .workspace {
    max-width: none;
  }

  .academic-shell-compact .academic-task-meta {
    grid-template-columns: 1fr 1fr;
  }

  .academic-shell-compact .academic-task-meta > div:nth-child(2) {
    border-right: 0;
  }

  .academic-shell-compact .academic-task-meta > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--academic-line);
  }

  .academic-shell-compact .academic-candidate {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}
