:root {
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --blue: #3b94e9;
  --blue-dark: #256fbd;
  --blue-soft: #e8f6ff;
  --text: #374151;
  --muted: #718096;
  --line: #e5e7eb;
  --line-strong: #d7dee8;
  --danger: #dc2626;
  --shadow: 0 2px 8px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Aptos", "Helvetica Neue", Arial, sans-serif;
}

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

a {
  color: var(--blue-dark);
}

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

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

.brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.brand h1 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 18px;
  line-height: 1.15;
  font-weight: 650;
}

.brand p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.tabs {
  padding: 14px 12px 6px;
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
}

.tab i,
.primary-button i,
.warning-button i {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.tab:hover,
.tab.active {
  background: #edf2f7;
  color: var(--blue-dark);
}

.sidebar-row {
  padding: 12px;
}

.primary-button,
.secondary-button,
.warning-button,
.file-button {
  min-height: 38px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
}

.secondary-button {
  background: var(--surface);
  color: var(--blue-dark);
  border-color: var(--line-strong);
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.refresh-button i,
.refresh-button svg {
  width: 15px;
  height: 15px;
}

.refresh-button.loading svg {
  animation: spin-refresh 0.8s linear infinite;
}

.refresh-button:disabled {
  opacity: 0.75;
  cursor: wait;
}

.reindex-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.reindex-button i,
.reindex-button svg {
  width: 15px;
  height: 15px;
}

.reindex-button.loading svg {
  animation: pulse-warning 0.7s ease-in-out infinite alternate;
}

.reindex-button:disabled {
  opacity: 0.82;
  cursor: wait;
}

.warning-button {
  background: #f7b731;
  border-color: #e6a11c;
  color: #2d3748;
}

.warning-button:hover {
  background: #e6a11c;
}

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

.file-button {
  background: var(--surface);
  color: var(--blue-dark);
  border-color: var(--line-strong);
}

.file-button input {
  display: none;
}

.sessions-list {
  display: grid;
  gap: 6px;
  padding: 0 12px 18px;
  overflow: auto;
}

.session-item {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
  border-radius: 7px;
  padding: 8px 8px 8px 10px;
  cursor: pointer;
}

.session-item:hover,
.session-item.active {
  background: #edf2f7;
}

.session-title,
.material-title,
.tool-title {
  font-weight: 650;
  line-height: 1.3;
}

.session-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.session-meta,
.material-meta,
.tool-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.4;
}

.delete-session {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.delete-session:hover {
  background: #fee2e2;
  color: var(--danger);
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.panel {
  display: none;
  height: 100vh;
  min-height: 620px;
}

.active-panel {
  display: flex;
  flex-direction: column;
}

.panel-header {
  min-height: 76px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.panel-header h2 {
  margin: 0;
  color: #4a5568;
  font-size: 20px;
  font-weight: 700;
}

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

.status-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.status-dot.ok {
  background: #16a34a;
}

.status-dot.bad {
  background: #ef4444;
}

.chat-topbar {
  justify-content: center;
  text-align: center;
}

.messages {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 18px 170px;
  gap: 18px;
}

.empty-state {
  margin: auto;
  text-align: center;
  color: var(--muted);
}

.empty-state img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  opacity: 0.9;
}

.empty-state h2 {
  margin: 16px 0 8px;
  color: var(--text);
  font-size: 28px;
}

.empty-state p {
  margin: 0;
  max-width: 560px;
}

.message {
  width: min(100%, 820px);
  display: grid;
  gap: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 15px;
}

.message.user {
  justify-items: end;
}

.message.user .message-bubble {
  max-width: 82%;
  background: #edf2f7;
  border-radius: 18px;
  padding: 12px 16px;
}

.message.assistant .message-bubble {
  background: transparent;
  padding: 4px 0;
}

.citations {
  width: min(100%, 820px);
  border-left: 3px solid var(--blue);
  padding-left: 12px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.composer {
  position: fixed;
  left: 260px;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(243, 246, 249, 0), var(--bg) 25%);
  padding: 28px 18px 22px;
  display: grid;
  place-items: center;
}

.composer-inner {
  width: min(100%, 820px);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px 14px 10px;
}

.composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 180px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  display: block;
  padding: 4px 0 8px;
  line-height: 1.45;
}

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

.attach-wrap {
  position: relative;
}

.attach-button,
.send-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.attach-button {
  background: #edf2f7;
  color: #2d3748;
}

.attach-button i,
.send-button i {
  width: 21px;
  height: 21px;
  stroke-width: 2.2;
}

.send-button {
  background: #2d3748;
  color: #fff;
}

.attach-menu {
  position: absolute;
  left: 0;
  bottom: 48px;
  width: 258px;
  display: none;
  padding: 8px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(31, 41, 55, 0.22);
  z-index: 20;
}

.attach-menu.open {
  display: grid;
}

.attach-menu-item {
  min-height: 42px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
  font-weight: 500;
}

.attach-menu-item:hover {
  background: #edf2f7;
}

.attach-menu-item i {
  width: 19px;
  height: 19px;
  color: var(--blue-dark);
}

.attach-menu-item input {
  display: none;
}

.attached-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.image-chip,
.status-chip {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.materials-toolbar {
  padding: 18px 24px 0;
  display: grid;
  gap: 12px;
}

.filters {
  display: grid;
  gap: 10px;
  align-items: center;
}

.filters {
  grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(150px, 1fr));
}

.filters input,
.filters select {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
}

.source-info {
  max-width: 980px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.materials-list {
  padding: 18px 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  align-content: start;
}

.materials-list.just-refreshed .material-item {
  animation: material-refresh 0.42s ease both;
}

.materials-list.just-refreshed .material-item:nth-child(2n) {
  animation-delay: 35ms;
}

.materials-list.just-refreshed .material-item:nth-child(3n) {
  animation-delay: 70ms;
}

.material-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 198px;
}

.material-item.card-added {
  animation: card-added 0.46s ease both;
}

.material-item.card-updated {
  animation: card-updated 0.56s ease both;
}

.material-item.card-removing {
  pointer-events: none;
  animation: card-removing 0.22s ease both;
}

.material-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 72px;
}

.material-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
  min-height: 43px;
}

.material-meta {
  display: flex;
  align-items: center;
  column-gap: 6px;
  row-gap: 3px;
  flex-wrap: wrap;
  font-size: 13px;
  min-height: 34px;
  max-height: 34px;
  align-content: start;
  overflow: hidden;
}

.material-meta span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.origin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.origin-badge i,
.origin-badge svg {
  width: 13px;
  height: 13px;
}

.material-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 2px 0 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-height: 38px;
  max-height: 38px;
}

.material-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  font-size: 13px;
  line-height: 1;
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 10px;
  border: 1px solid #d8e7f7;
  border-radius: 8px;
  background: #f4f9ff;
  color: var(--blue-dark);
  font-weight: 600;
  text-decoration: none;
}

.material-link:hover {
  background: #e8f4ff;
  border-color: #b7d9f8;
}

.material-link i,
.material-link svg {
  width: 14px;
  height: 14px;
}

.material-actions {
  display: flex;
  gap: 6px;
}

.edit-material,
.delete-material {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: #f7fafc;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.edit-material i,
.edit-material svg {
  width: 14px;
  height: 14px;
}

.edit-material:hover {
  background: #e8f4ff;
  color: var(--blue-dark);
}

.delete-material:hover {
  background: #fee2e2;
  color: var(--danger);
}

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

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: min(100%, 560px);
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 18px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}

.modal-close:hover {
  background: #edf2f7;
  color: var(--text);
}

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

.modal-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 600;
}

.modal-form input,
.modal-form select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-weight: 400;
}

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

.status-prepared,
.status-indexed {
  color: #138a55;
  font-weight: 650;
}

.status-unavailable {
  color: var(--danger);
  font-weight: 650;
}

.status-metadata_only,
.status-pending {
  color: #b7791f;
  font-weight: 650;
}

.status-line {
  min-height: 24px;
  margin: 14px 24px 0;
  color: var(--muted);
}

.status-working,
.status-success,
.status-error {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: calc(100% - 48px);
  border-radius: 999px;
  padding: 8px 12px;
  line-height: 1.35;
}

.status-working {
  background: #fff7ed;
  color: #9a5b00;
  border: 1px solid #fed7aa;
}

.status-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
}

.status-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.status-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid rgba(154, 91, 0, 0.25);
  border-top-color: #d97706;
  border-radius: 50%;
  animation: spin-refresh 0.75s linear infinite;
}

.tools-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  overflow: auto;
}

.tool-card {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-card::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -44px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: #e8f4ff;
}

.tool-card.active-tool {
  border-color: #b7d9f8;
  background: linear-gradient(135deg, #ffffff, #eef8ff);
}

.tool-card.dev-tool {
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
}

.tool-icon {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e8f3ff;
  color: var(--blue-dark);
}

.dev-tool .tool-icon {
  background: #eef2f7;
  color: #667085;
}

.tool-icon i {
  width: 24px;
  height: 24px;
}

.tool-title {
  position: relative;
  z-index: 1;
  color: #243044;
  font-size: 17px;
  font-weight: 800;
}

.tool-meta {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.tool-status,
.tool-dev-note {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.tool-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-active-tool {
  background: #dcfce7;
  color: #15803d;
}

.status-active-tool span {
  background: #16a34a;
}

.status-dev-tool {
  background: #eef2f7;
  color: #64748b;
}

.status-dev-tool span {
  background: #94a3b8;
}

.tool-start-button {
  position: relative;
  z-index: 1;
  min-height: 40px;
  margin-top: auto;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.tool-start-button:hover {
  background: var(--blue-dark);
}

.tool-start-button i,
.tool-dev-note i {
  width: 16px;
  height: 16px;
}

.tool-dev-note {
  margin-top: auto;
  background: #f3f6fa;
  color: #64748b;
}

.courses-shell {
  padding: 24px;
  overflow: auto;
  display: grid;
  gap: 18px;
}

.methodist-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid #bee3f8;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8f6ff, #ffffff 72%);
  box-shadow: var(--shadow);
  padding: 22px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--blue-dark);
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
}

.methodist-hero h2 {
  margin: 10px 0 8px;
  color: #2d3748;
  font-size: 26px;
}

.methodist-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 120px);
  gap: 10px;
}

.hero-stats div {
  min-height: 96px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.hero-stats strong {
  color: var(--blue-dark);
  font-size: 28px;
}

.hero-stats span {
  color: var(--muted);
  font-size: 12px;
}

.courses-list {
  display: grid;
  gap: 16px;
}

.course-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: course-rise 0.34s ease both;
}

.course-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(180px, 260px);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.course-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #edf2f7;
  color: var(--blue-dark);
}

.course-icon i {
  width: 25px;
  height: 25px;
}

.course-head h3 {
  margin: 0;
  color: #243044;
  font-size: 19px;
}

.course-head p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.course-dev-button {
  margin-top: 12px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #eef2f7;
  color: #65758b;
  padding: 0 13px;
  font-weight: 500;
  cursor: not-allowed;
  opacity: 0.95;
}

.course-dev-button i,
.course-dev-button svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.course-progress-box {
  display: grid;
  gap: 8px;
}

.course-progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #16a34a);
  transition: width 0.42s ease;
}

.module-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 14px;
}

.module-card {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  padding: 13px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: #b7d9f8;
}

.module-card.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.module-card.active {
  background: #f4f9ff;
  border-color: #acd2f5;
  box-shadow: inset 0 0 0 1px rgba(47, 128, 237, 0.08);
}

.module-card.locked {
  background: #fbfdff;
  border-color: #e4eaf2;
}

.module-check {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.module-card.done .module-check {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.module-card.active .module-check {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.module-card.locked .module-check {
  background: #f3f6fa;
  border-color: #d9e2ec;
  color: #7b8ba1;
}

.module-check i,
.module-check svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.25;
}

.module-card.active .module-check svg {
  margin-left: 1px;
}

.module-card h4 {
  margin: 0;
  color: #243044;
  font-size: 15px;
}

.module-card p {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.module-meta span {
  border-radius: 999px;
  background: #edf2f7;
  color: #4a5568;
  padding: 3px 8px;
  font-size: 12px;
}

.module-meta .module-status {
  background: #eaf4ff;
  color: var(--blue-dark);
  font-weight: 500;
}

.module-card.done .module-status {
  background: #dcfce7;
  color: #15803d;
}

.module-card.active .module-status {
  background: #dbeafe;
  color: var(--blue-dark);
}

.module-card.locked .module-status {
  background: #eef2f7;
  color: #64748b;
}

@keyframes course-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes material-refresh {
  from {
    opacity: 0.72;
    transform: translateY(6px);
    border-color: #b7d9f8;
    box-shadow: 0 6px 18px rgba(59, 148, 233, 0.18);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-added {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(59, 148, 233, 0.2);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-updated {
  0% {
    border-color: #f7b731;
    box-shadow: 0 0 0 0 rgba(247, 183, 49, 0.28);
    background: #fffbeb;
  }
  70% {
    border-color: #f7b731;
    box-shadow: 0 0 0 7px rgba(247, 183, 49, 0);
    background: #fff;
  }
  100% {
    border-color: var(--line);
  }
}

@keyframes card-removing {
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

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

@keyframes pulse-warning {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.12);
  }
}

code {
  color: var(--blue-dark);
}

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

  .sidebar {
    max-height: 330px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .panel {
    height: calc(100vh - 330px);
  }

  .composer {
    left: 0;
  }

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

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .methodist-hero,
  .course-head {
    grid-template-columns: 1fr;
  }

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