:root {
  --ink: #172033;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #dce6ef;
  --line-soft: #edf2f7;
  --panel: #ffffff;
  --soft: #f6f9fc;
  --teal: #007d80;
  --teal-2: #00a6a0;
  --teal-soft: #e7f8f6;
  --blue: #3a63e6;
  --green: #11967f;
  --violet: #7857e8;
  --navy: #031a2a;
  --shadow: 0 18px 42px rgba(24, 40, 68, 0.1);
  --shadow-light: 0 10px 24px rgba(24, 40, 68, 0.07);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f3f7fb;
}

button,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.workbench {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 253, 0.96)),
    radial-gradient(circle at 54% 18%, rgba(0, 166, 160, 0.08), transparent 34%);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 76px 56px minmax(0, 1fr) auto;
  row-gap: 11px;
  padding: 22px 16px 18px;
  color: #d7e8ef;
  background:
    linear-gradient(168deg, rgba(0, 151, 151, 0.2) 0%, transparent 30%),
    linear-gradient(180deg, #062538 0%, #031827 48%, #04192a 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
  overflow-anchor: none;
}

.brand {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #0ed3c5;
  border: 1px solid rgba(14, 211, 197, 0.65);
  border-radius: 8px;
}

.brand strong {
  display: block;
  color: #fff;
  font-size: 19px;
  letter-spacing: 0;
}

.brand span {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 8px;
  color: #9de2df;
  font-size: 12px;
  border-radius: 4px;
  background: rgba(0, 166, 160, 0.22);
}

.new-workspace {
  width: 100%;
  height: 40px;
  min-height: 40px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  border-radius: 7px;
  background: linear-gradient(135deg, #019f9c, #007276);
  box-shadow: 0 8px 16px rgba(0, 118, 121, 0.2);
}

.new-workspace svg {
  font-size: 16px;
  stroke-width: 2.4;
}

.new-workspace + .workspace-nav {
  margin-top: -8px;
}

.side-section {
  display: grid;
  gap: 12px;
}

.workspace-nav {
  min-height: 0;
  display: grid;
  overflow: hidden;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow-anchor: none;
}

.side-title {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.student-search {
  height: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: #9ab3c2;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  transition: height 0.18s ease, padding 0.18s ease, border-color 0.18s ease;
}

.student-search.open {
  height: 38px;
  padding: 0 10px;
  border-color: rgba(255, 255, 255, 0.1);
}

.student-search input {
  min-width: 0;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
}

.student-search input::placeholder {
  color: #87a4b4;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #536071;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: #fff;
}

.icon-button.ghost {
  color: #bad4df;
  border-color: transparent;
  background: transparent;
}

.icon-button.user {
  color: #435063;
  background: #ecf1f6;
}

.tabs {
  height: 34px;
  min-height: 34px;
  display: grid;
  grid-template-columns: 54px 1fr 1fr;
  gap: 8px;
  overflow-anchor: none;
}

.tab {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ab3c2;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  border-radius: 6px;
  background: transparent;
}

.tab.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.student-list,
.workspace-list {
  display: grid;
  gap: 8px;
  align-content: start;
  grid-auto-rows: max-content;
}

.workspace-list {
  min-height: 0;
  max-height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  overflow-anchor: none;
}

.workspace-list::-webkit-scrollbar,
.right-panel::-webkit-scrollbar,
.chat-scroll::-webkit-scrollbar {
  width: 8px;
}

.workspace-list::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb,
.chat-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
}

.empty-state {
  padding: 14px 12px;
  color: #9ab3c2;
  font-size: 13px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 7px;
}

.student-item,
.workspace-item {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px 10px 18px;
  color: #c6d9e2;
  text-align: left;
  border-left: 3px solid transparent;
  border-radius: 6px;
  background: transparent;
}

.workspace-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: stretch;
  border-left: 3px solid transparent;
  border-radius: 6px;
}

.workspace-row.active {
  border-left-color: #00d0c6;
  background: rgba(61, 127, 167, 0.26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.workspace-row.active .workspace-item {
  color: #fff;
  border-left-color: transparent;
  background: transparent;
  box-shadow: none;
}

.student-item.active,
.workspace-item.active {
  color: #fff;
  border-left-color: #00d0c6;
  background: rgba(61, 127, 167, 0.26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.student-name,
.workspace-name {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.student-tags,
.workspace-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.student-tags span,
.workspace-tags span,
.advisor span {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  color: #c4dce5;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.student-item time,
.workspace-item time {
  color: #91a8b6;
  font-size: 12px;
}

.workspace-category {
  display: grid;
  gap: 6px;
  align-content: start;
}

.category-head {
  width: 100%;
  height: 42px;
  min-height: 42px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: #d6e7ef;
  text-align: left;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.student-type-search {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: #a8e8e4;
  border-radius: 50%;
  background: rgba(0, 166, 160, 0.14);
}

.student-type-search.active,
.student-type-search:focus-visible {
  color: #55d4cf;
  background: rgba(0, 166, 160, 0.14);
  outline: 0;
  box-shadow: inset 0 0 0 1px rgba(85, 212, 207, 0.78);
}

.student-type-search:active {
  color: #55d4cf;
  background: rgba(0, 166, 160, 0.2);
}

.category-head svg {
  color: #55d4cf;
}

.category-head strong {
  overflow: hidden;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-head em {
  grid-column: -1;
  min-width: 22px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  color: #92deda;
  font-size: 11px;
  font-style: normal;
  border-radius: 999px;
  background: rgba(0, 166, 160, 0.16);
}

.category-sessions {
  display: grid;
  gap: 6px;
  min-height: 0;
}

.category-sessions.empty {
  display: none;
}

.workspace-category.collapsed .category-sessions {
  display: none;
}

.workspace-item {
  min-height: 60px;
  padding-left: 14px;
  border-left: 0;
}

.workspace-more {
  width: 30px;
  display: inline-grid;
  place-items: center;
  align-self: stretch;
  color: #9ab3c2;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  background: transparent;
}

.workspace-more:hover,
.workspace-more.active {
  color: #fff;
}

.workspace-fav {
  min-width: 22px;
  justify-content: center;
  margin-left: 2px;
  color: #ffd166;
  font-size: 14px;
  background: rgba(255, 209, 102, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.18);
}


.recent {
  flex: 0 0 auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-list {
  display: grid;
  gap: 9px;
}

.recent-list button {
  width: 100%;
  min-height: 30px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #c5d9e2;
  font-size: 13px;
  text-align: left;
  background: transparent;
}

.recent-list button.active {
  color: #fff;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.recent-list span:nth-child(2) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.recent-list em {
  color: #8da5b4;
  font-size: 12px;
  font-style: normal;
}

.dot-check {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  border-radius: 50%;
  background: var(--green);
}

.dot-check svg {
  width: 11px;
  height: 11px;
  stroke-width: 3;
}

.all-workspaces {
  height: 42px;
  margin-top: 8px;
  color: #c9dce5;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.02);
}

.advisor {
  height: 76px;
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.advisor .avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #344054;
  border-radius: 50%;
  background: #e7edf3;
  overflow: hidden;
}

.advisor .avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.advisor strong {
  display: inline-flex;
  max-width: 110px;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  vertical-align: middle;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.advisor span {
  margin-left: 7px;
  color: #55d4cf;
  background: rgba(0, 166, 160, 0.2);
}

.chat-thread {
  display: grid;
  gap: 12px;
  padding-bottom: 4px;
}

.main-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  position: sticky;
  z-index: 8;
  top: 0;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.panel-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #007779;
  border: 1px solid #cfe2e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 35, 55, 0.08);
}

.panel-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.3;
}

.panel-toggle::after {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  content: attr(data-tip);
  padding: 6px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  border-radius: 7px;
  background: rgba(17, 24, 39, 0.9);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.panel-toggle:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.panel-toggle.collapsed {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #008c8a, #006a70);
}

.headline {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.headline h1 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.headline p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.text-tool {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #667085;
  font-size: 13px;
  background: transparent;
}

.content-grid {
  height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: minmax(680px, 1fr) 456px;
  overflow: hidden;
}

.workbench.panel-collapsed .content-grid {
  grid-template-columns: minmax(680px, 1fr);
}

.workbench.panel-collapsed .right-panel {
  display: none;
}

.chat-stage {
  position: relative;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.chat-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 28px 16px;
  overscroll-behavior: contain;
}

.scroll-bottom {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(var(--composer-height, 132px) + 16px);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #1d2939;
  border: 1px solid #e0e7ef;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.scroll-bottom.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.scroll-bottom svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.suggestions[hidden] {
  display: none;
}

.user-prompt {
  align-self: flex-end;
  justify-self: end;
  max-width: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 2px;
}

.user-prompt span {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  border-radius: 7px;
  background: linear-gradient(135deg, #008c8c, #006b70);
  box-shadow: var(--shadow-light);
}

.user-prompt time {
  grid-column: 1;
  justify-self: end;
  color: #7a8899;
  font-size: 13px;
}

.user-prompt > img {
  grid-column: 2;
  grid-row: 1;
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(0, 125, 128, 0.18);
}

.assistant-card {
  position: relative;
  justify-self: start;
  width: min(472px, 100%);
  max-width: min(472px, 100%);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.assistant-badge {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-top: 4px;
  color: #fff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 8px 18px rgba(0, 125, 128, 0.24);
}

.assistant-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.assistant-body {
  width: 100%;
  max-width: 100%;
  padding: 16px 18px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-light);
}

.assistant-card time {
  grid-column: 2;
  justify-self: start;
  color: #8a98aa;
  font-size: 12px;
}

.assistant-copy {
  margin: 0 0 14px;
  color: #344054;
  font-size: 14px;
}

.progress-card,
.generated-block,
.suggestions,
.composer,
.sop-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.progress-card {
  width: 100%;
  max-width: 420px;
  padding: 14px 14px 12px;
}

.assistant-card:focus,
.progress-card:focus,
.generated-block:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 125, 128, 0.08), var(--shadow-light);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-header h2,
.generated-block h2,
.drawer-head h2,
.sop-card h3 {
  margin: 0;
  color: #1d2939;
  font-size: 15px;
  letter-spacing: 0;
}

.link-button {
  color: #667085;
  font-size: 13px;
  background: transparent;
}

.steps {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
  padding: 12px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
}

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 64px;
  align-items: center;
  column-gap: 10px;
  min-height: 34px;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: -12px;
  left: 8px;
  width: 1px;
  background: #cfdbe7;
}

.steps span {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--green);
}

.steps svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.steps .running span {
  color: var(--teal);
  border: 2px dashed currentColor;
  background: #fff;
  animation: spin 1.4s linear infinite;
}

.steps strong {
  overflow: visible;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  white-space: normal;
}

.steps em {
  grid-column: 3;
  justify-self: end;
  margin-top: 0;
  color: #8a98aa;
  font-size: 12px;
  font-style: normal;
}

.steps .running em {
  color: var(--teal);
  font-weight: 800;
}

.steps .pending span {
  color: #b7c3d0;
  border: 1px solid #d8e1ea;
  background: #fff;
}

.steps .pending em {
  color: #98a2b3;
}

.steps .done span {
  color: #fff;
  border: 0;
  background: var(--green);
}

.steps .done em {
  color: var(--green);
  font-weight: 800;
}

.execution-log {
  min-height: 36px;
  margin-top: 10px;
  padding: 9px 12px;
  color: #475467;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 6px;
  background: #f3f7fa;
}

.generated-block {
  width: min(520px, 100%);
  padding: 12px 14px;
  margin-left: 52px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.result-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 14px;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.04);
}

.result-head {
  min-height: 24px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  grid-column: 1;
}

.result-head h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
}

.result-card em {
  min-width: 58px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.result-card em.muted {
  color: #667085;
}

.result-card em.pending {
  color: #98a2b3;
}

.file-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  border-radius: 5px;
}

.file-icon.word {
  background: #3267e8;
}

.file-icon.blue {
  background: #5269e8;
}

.file-icon.teal {
  background: #078f82;
}

.doc-preview,
.outline-preview,
.evidence-preview {
  grid-column: 1;
  max-width: 100%;
  min-height: 0;
  padding: 0 0 0 34px;
  margin-top: -2px;
  border: 1px solid var(--line-soft);
  border-color: transparent;
  border-radius: 0;
  background: transparent;
}

.doc-preview h4,
.outline-preview h4,
.evidence-preview h4 {
  display: none;
  margin: 0;
  color: #344054;
  font-size: 13px;
}

.doc-preview p,
.outline-preview p,
.evidence-preview p {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}

.doc-preview ul,
.outline-preview ol,
.evidence-preview ul,
.meta-row,
.outline-preview section + section,
.evidence-preview small,
.evidence-preview h4,
.evidence-preview ul {
  display: none;
}

.doc-preview ul,
.outline-preview ol {
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: #475467;
  font-size: 12px;
  line-height: 1.5;
}

.evidence-preview p strong {
  color: #344054;
}

.evidence-preview p span {
  color: var(--green);
  font-weight: 900;
}

.evidence-preview small {
  color: #8a98aa;
  font-size: 11px;
}

.evidence-preview h4 {
  margin-top: 14px;
}

.evidence-preview ul {
  padding-left: 0;
  list-style: none;
}

.evidence-preview li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.evidence-preview li strong,
.evidence-preview li small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  gap: 8px;
  margin-top: 0;
  align-self: center;
  justify-self: end;
}

.card-actions button {
  min-width: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  color: #007779;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.card-actions button svg {
  width: 16px;
  height: 16px;
}

.suggestions {
  width: min(520px, 100%);
  display: grid;
  gap: 8px;
  margin-left: 52px;
  padding: 10px;
  border: 0;
  background: transparent;
}

.suggestions button:not(.icon-button) {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 16px;
  color: #1d2939;
  font-size: 12px;
  border: 0;
  border-radius: 999px;
  background: #f1f3f5;
}

.suggestions button:not(.icon-button)::after {
  content: "→";
  color: #1d2939;
  font-size: 14px;
  line-height: 1;
}

.suggestions button:not(.icon-button):hover {
  background: #e8edf2;
}

.composer {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 28px 14px;
  border: 0;
  border-top: 1px solid #d7e0e9;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 -12px 30px rgba(24, 40, 68, 0.08);
}

.action-menu {
  position: fixed;
  z-index: 40;
  display: none;
  min-width: 138px;
  padding: 6px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.action-menu.show {
  display: grid;
  gap: 4px;
}

.action-menu button {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: #344054;
  font-size: 13px;
  text-align: left;
  border-radius: 6px;
  background: transparent;
}

.action-menu button:hover {
  background: #f2f6fa;
}

.action-menu button.danger {
  color: #c2410c;
}

.input-row {
  display: block;
}

.upload-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 4px;
}

.upload-list[hidden] {
  display: none;
}

.upload-chip {
  min-width: 0;
  max-width: 260px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 10px;
  color: #344054;
  font-size: 12px;
  border: 1px solid #dbe5ee;
  border-radius: 999px;
  background: #f8fafc;
}

.upload-chip svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--teal);
}

.upload-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.upload-chip small {
  flex: 0 0 auto;
  color: #8a98aa;
}

.upload-chip button {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #667085;
  border-radius: 50%;
  background: transparent;
}

.upload-chip button:hover {
  color: #1d2939;
  background: #e8eef5;
}

.input-row textarea {
  width: 100%;
  min-height: 58px;
  max-height: 110px;
  resize: vertical;
  padding: 8px 10px;
  color: #1d2939;
  font-size: 15px;
  line-height: 1.5;
  border: 0;
  outline: 0;
  background: transparent;
}

.input-row textarea::placeholder {
  color: #98a2b3;
}

.composer-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}

.composer-actions > span {
  flex: 1;
}

.composer-actions button:not(.round):not(.send) {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: #475467;
  font-size: 12px;
  border: 1px solid #e4eaf0;
  border-radius: 999px;
  background: #f8fafc;
}

.round,
.send {
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.round {
  width: 38px;
  color: #475467;
  border: 1px solid var(--line);
  background: #fff;
}

.round.active {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.send {
  width: 42px;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #008b89, #006b70);
}

.right-panel {
  min-width: 0;
  height: calc(100vh - 58px);
  overflow-y: scroll;
  padding: 0 26px 26px;
  border-left: 1px solid var(--line);
  background: rgba(249, 252, 255, 0.92);
  box-shadow: -10px 0 28px rgba(24, 40, 68, 0.05);
  scrollbar-gutter: stable;
  overflow-anchor: none;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 6px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}


.scene-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-content: start;
}

.scene-card {
  position: relative;
  min-height: 70px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 4px 12px;
  padding: 12px 40px 12px 12px;
  color: #344054;
  text-align: left;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.scene-card strong,
.scene-card small {
  align-self: start;
}

.scene-card:hover {
  border-color: rgba(0, 125, 128, 0.42);
  box-shadow: inset 0 0 0 1px rgba(0, 125, 128, 0.12), var(--shadow-light);
}

.scene-card.active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(0, 125, 128, 0.12);
}

.scene-card.active::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal);
  transform: translateY(-50%);
}

.scene-card.active::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-62%) rotate(-45deg);
}

.scene-card span {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--teal);
  border-radius: 7px;
  background: var(--teal-soft);
}

.scene-card:nth-child(2) span,
.scene-card:nth-child(5) span {
  color: #087c9d;
  background: #e8f3fb;
}

.scene-card:nth-child(6) span {
  color: var(--violet);
  background: #f0edff;
}

.scene-card strong {
  padding-right: 0;
  font-size: 14px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.scene-card small {
  color: #7a8899;
  font-size: 12px;
  line-height: 1.5;
  min-height: 0;
  overflow-wrap: anywhere;
}

.sop-card {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding: 18px;
  box-shadow: var(--shadow-light);
}

.sop-card h3 {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 16px;
}

.sop-card h3 span {
  color: #475467;
  font-weight: 600;
}

.sop-card label {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.sop-card select,
.sop-card input {
  min-width: 0;
  width: 100%;
  height: 40px;
  padding: 0 28px 0 12px;
  color: #475467;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: #fff;
}

.sop-card input {
  padding-right: 14px;
}

.sop-card select:focus,
.sop-card input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 125, 128, 0.1);
}

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

.sop-upload {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #007c7d;
  font-size: 15px;
  font-weight: 900;
  border: 1px solid rgba(0, 124, 125, 0.28);
  border-radius: 7px;
  background: #effafa;
}

.sop-upload:hover {
  border-color: rgba(0, 124, 125, 0.48);
  background: #e3f7f7;
}

.sop-upload svg {
  width: 17px;
  height: 17px;
}

.sop-upload-block small {
  color: #7a8899;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.toggle-row {
  grid-template-columns: 78px auto;
  justify-content: start;
}

.toggle {
  width: 52px;
  height: 26px;
  padding: 3px;
  border-radius: 999px;
  background: #cbd5df;
}

.toggle span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(24, 40, 68, 0.24);
}

.toggle.active {
  background: var(--teal);
}

.toggle.active span {
  margin-left: 26px;
}

.generate {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  border-radius: 7px;
  background: linear-gradient(135deg, #008c8a, #006a70);
  box-shadow: 0 16px 26px rgba(0, 118, 121, 0.18);
}

.hint {
  margin: 0;
  color: #98a2b3;
  font-size: 13px;
  text-align: center;
}

.modal-layer {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(4px);
}

.modal-layer.show {
  display: grid;
}

.modal-card {
  position: relative;
  width: min(620px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}

.modal-card h2 {
  margin: 0 44px 16px 0;
  font-size: 18px;
}

.modal-group {
  display: grid;
  gap: 10px;
}

.modal-group + .modal-group {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.modal-group h3 {
  margin: 0;
  color: #1d2939;
  font-size: 15px;
}

.modal-group-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  color: #101828;
  text-align: left;
  border: 1px solid rgba(0, 125, 128, 0.22);
  border-radius: 8px;
  background: #eef7f7;
  cursor: pointer;
}

.modal-group-toggle span {
  min-width: 0;
  font-size: 15px;
  font-weight: 900;
}

.modal-group-toggle small {
  color: #007d80;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.modal-group-toggle i {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #007d80;
  transition: transform 0.16s ease;
}

.modal-group-toggle i svg {
  width: 16px;
  height: 16px;
}

.modal-group.collapsed {
  gap: 0;
}

.modal-group.collapsed .modal-group-toggle {
  border-color: var(--line-soft);
  background: #f8fafc;
}

.modal-group.collapsed .modal-group-toggle small,
.modal-group.collapsed .modal-group-toggle i {
  color: #667085;
}

.modal-group.collapsed .modal-group-toggle i {
  transform: rotate(-90deg);
}

.modal-group.collapsed .modal-group-content {
  display: none;
}

.modal-card p {
  margin: 0 0 12px;
  color: #475467;
  line-height: 1.7;
}

.modal-card ul,
.modal-card ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: #475467;
  line-height: 1.65;
}

.modal-card .modal-grid {
  display: grid;
  gap: 10px;
}

.modal-card .modal-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  width: 100%;
  padding: 11px 12px;
  color: #1d2939;
  text-align: left;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #f8fafc;
}

.modal-card button.modal-row {
  cursor: pointer;
}

.modal-card button.modal-row:hover {
  border-color: rgba(0, 125, 128, 0.28);
  background: #eef7f7;
}

.modal-card .modal-row span {
  min-width: 0;
  color: #475467;
  line-height: 1.6;
  text-align: left;
  white-space: normal;
}

.modal-card .workspace-modal-row {
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
}

.modal-card .workspace-modal-row time {
  justify-self: end;
  color: #475467;
  line-height: 1.6;
  white-space: nowrap;
}

.workspace-create-form {
  display: grid;
  gap: 16px;
}

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

.workspace-type-picker button {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 12px 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
  border: 2px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.workspace-type-picker button.active {
  color: var(--teal);
  border-color: var(--teal);
  background: var(--teal-soft);
}

.workspace-type-picker svg {
  width: 22px;
  height: 22px;
}

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

.workspace-create-field {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

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

.workspace-create-field input,
.workspace-create-field textarea {
  width: 100%;
  min-width: 0;
  color: #1d2939;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: #fff;
}

.workspace-create-field input {
  height: 40px;
  padding: 0 12px;
}

.workspace-create-field textarea {
  resize: vertical;
  min-height: 78px;
  padding: 10px 12px;
  line-height: 1.5;
}

.workspace-create-field input:focus,
.workspace-create-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 125, 128, 0.1);
}

.workspace-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.workspace-create-actions button {
  height: 40px;
  min-width: 104px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 800;
  border-radius: 7px;
}

.workspace-create-actions .ghost {
  color: #475467;
  border: 1px solid var(--line);
  background: #fff;
}

.workspace-create-actions .primary {
  color: #fff;
  background: linear-gradient(135deg, #008c8a, #006a70);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 26px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  border-radius: 7px;
  background: rgba(17, 24, 39, 0.92);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

@media (max-width: 1380px) {
  .content-grid {
    grid-template-columns: minmax(620px, 1fr) 400px;
  }

  .result-grid {
    gap: 12px;
  }

  .right-panel {
    padding: 22px;
  }
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: 260px minmax(0, 1fr);
  }

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

  .right-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .composer {
    position: static;
  }
}

@media (max-width: 940px) {
  .workbench {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
  }

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

  .topbar {
    position: static;
    height: auto;
    flex-wrap: wrap;
    padding: 16px;
  }

  .headline {
    display: grid;
    gap: 8px;
  }

  .headline p {
    white-space: normal;
  }

  .chat-stage {
    padding: 0;
  }

  .chat-scroll {
    padding: 18px 16px 12px;
  }

  .composer {
    padding: 12px 16px 14px;
  }

  .steps,
  .result-grid,
  .scene-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    gap: 12px;
  }

  .steps li:not(:last-child)::after {
    display: none;
  }

}

@media (max-width: 640px) {
  .student-list,
  .workspace-list,
  .recent-list {
    grid-template-columns: 1fr;
  }

  .user-prompt {
    grid-template-columns: 1fr;
    justify-items: end;
  }

  .user-prompt time,
  .user-prompt > img {
    display: none;
  }

  .assistant-card {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .generated-block,
  .suggestions {
    margin-left: 0;
  }

  .assistant-badge {
    display: none;
  }

  .input-row,
  .composer-actions,
  .sop-card label {
    grid-template-columns: 1fr;
  }
}
