/* ============ Lexis Admin — Design Tokens ============ */
:root {
  --primary: #E8654E;
  --primary-hover: #D9573F;
  --primary-soft: #FAECE7;
  --primary-softer: #FEF5F1;
  --bg: #FAF7F2;
  --bg-soft: #F5F2EC;
  --card: #FFFFFF;
  --ink: #2C2C2A;
  --ink-2: #5F5E5A;
  --muted: #888780;
  --muted-2: #B5ADA1;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.15);
  --green: #4F9E8B;
  --green-soft: #E0EFE9;
  --amber: #C58A3A;
  --amber-soft: #FAEFD9;
  --gray-soft: #ECE9E2;
  --danger: #B73B25;
  --danger-soft: #FBE2DB;
  --lvl-a1-bg: #FCE2DB;  --lvl-a1-fg: #B73B25;
  --lvl-a2-bg: #FCE4D2;  --lvl-a2-fg: #B25F1F;
  --lvl-b1-bg: #FAEFCC;  --lvl-b1-fg: #8E6911;
  --lvl-b2-bg: #DDEDE0;  --lvl-b2-fg: #2F7B4A;
  --lvl-c1-bg: #E2DFF4;  --lvl-c1-fg: #4A4097;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-card: 14px;
  --r-btn: 10px;
  --r-pill: 999px;
  --sidebar-w: 240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; padding: 0; color: inherit; }
input, textarea, select { font-family: inherit; }

/* ============ Layout ============ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  width: 100%;
}
.main {
  padding: 32px 40px 56px;
  min-width: 0;
}

/* ============ Sidebar ============ */
.sidebar {
  background: #FDFAF6;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
}
.brand-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.nav { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  width: 100%;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(232,101,78,0.06); color: var(--ink); }
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.nav-item.active svg { color: var(--primary); }
.nav-item svg { color: var(--muted); flex-shrink: 0; }
.nav-item.active svg { color: var(--primary); }
.nav-item .badge-count {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.user-card-fixed {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: calc(var(--sidebar-w) - 28px);
  z-index: 50;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.user-card:hover { background: var(--bg-soft); }
.user-card--open { background: var(--bg-soft); border-color: var(--border-strong); }
.user-initials {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #F4DEDB;
  color: #B23F2D;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12.5px;
  flex-shrink: 0;
}
.user-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}
.user-role {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}
.user-card svg { margin-left: auto; color: var(--muted); }

.user-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  z-index: 40;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink-2);
  text-align: left;
}
.user-dropdown-item:hover { background: var(--primary-softer); color: var(--primary); }
.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

/* "+ New Class" sidebar CTA (kept for parity with lecturer) */
.sidebar-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  transition: background 0.15s;
}
.sidebar-cta:hover { background: var(--primary-hover); }

/* ============ Top bar ============ */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.page-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 6px;
}
.page-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ============ Buttons ============ */
.btn {
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-btn);
  font-weight: 600;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline-coral {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-outline-coral:hover { background: var(--primary-soft); }
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn-danger-link {
  color: var(--danger);
  font-weight: 600;
  font-size: 13px;
  background: transparent;
}
.btn-danger-link:hover { text-decoration: underline; }

/* ============ Inputs ============ */
.search-box {
  position: relative;
  width: 260px;
}
.search-box input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border-radius: var(--r-btn);
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,101,78,0.12);
}
.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.input, .textarea, .select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,101,78,0.12);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.input.error, .textarea.error, .select.error { border-color: var(--danger); }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field-helper {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
}
.field { margin-bottom: 16px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============ Cards ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px;
}

/* Filter card */
.filter-card {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-card .select {
  width: auto;
  min-width: 160px;
  height: 38px;
  padding: 0 28px 0 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888780' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  appearance: none;
  font-size: 13.5px;
}
.filter-clear {
  margin-left: auto;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
}
.filter-clear:hover { text-decoration: underline; }

/* ============ Tabs ============ */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.tab {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tab:hover { color: var(--ink); }
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-count {
  font-size: 12px;
  background: var(--bg-soft);
  color: var(--muted);
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.tab.active .tab-count {
  background: var(--primary-soft);
  color: var(--primary);
}

.view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.view-toggle button {
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.view-toggle button.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.view-toggle button:not(:last-child) { border-right: 1px solid var(--border-strong); }
.result-count { font-size: 13px; color: var(--muted); }

/* ============ Topic Grid ============ */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1400px) { .topic-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .topic-grid { grid-template-columns: 1fr; } }

.topic-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.topic-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 10px 22px rgba(31,27,22,0.06);
}
.topic-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.topic-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.topic-icon.peach { background: #F4A47C; }
.topic-icon.teal  { background: var(--green); }
.topic-icon.amber { background: #D9A05B; }
.topic-icon.purple{ background: #8E7AC9; }
.topic-icon.rose  { background: #C97A7A; }

.menu-btn {
  width: 30px; height: 30px;
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background 0.15s;
}
.menu-btn:hover { background: var(--bg-soft); color: var(--ink); }

.topic-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0;
}
.topic-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.divider-soft {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.topic-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.topic-meta strong { color: var(--ink); font-weight: 600; }
.topic-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  color: var(--ink-2);
}
.pill.a1 { background: var(--lvl-a1-bg); color: var(--lvl-a1-fg); }
.pill.a2 { background: var(--lvl-a2-bg); color: var(--lvl-a2-fg); }
.pill.b1 { background: var(--lvl-b1-bg); color: var(--lvl-b1-fg); }
.pill.b2 { background: var(--lvl-b2-bg); color: var(--lvl-b2-fg); }
.pill.c1 { background: var(--lvl-c1-bg); color: var(--lvl-c1-fg); }

.pill.status-active   { background: var(--green-soft);  color: var(--green); }
.pill.status-active::before  { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.pill.status-draft    { background: var(--amber-soft);  color: var(--amber); }
.pill.status-draft::before   { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.pill.status-archived { background: var(--gray-soft);   color: var(--muted); }
.pill.status-archived::before{ content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }

/* Action dropdown on card */
.action-menu {
  position: absolute;
  right: 12px;
  top: 50px;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.10);
  z-index: 20;
}
.action-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
  text-align: left;
}
.action-menu button:hover { background: var(--bg-soft); color: var(--ink); }
.action-menu .danger { color: var(--danger); }
.action-menu .danger:hover { background: var(--danger-soft); color: var(--danger); }
.action-menu-divider { height: 1px; background: var(--border); margin: 4px 6px; }

/* ============ Topic Table (list view) ============ */
.topic-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}
.topic-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 16px;
  background: #FBF8F3;
  border-bottom: 1px solid var(--border);
}
.topic-table td {
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
}
.topic-table tr:last-child td { border-bottom: 0; }
.topic-table tr.row-clickable { cursor: pointer; transition: background 0.12s; }
.topic-table tr.row-clickable:hover { background: var(--bg-soft); }
.topic-table .title-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}
.topic-table .title-cell strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.topic-table .icon-mini {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  flex-shrink: 0;
}

/* ============ Helper banner ============ */
.banner-helper {
  margin-top: 28px;
  background: var(--primary-soft);
  border: 1px solid #F2D6CC;
  border-radius: var(--r-card);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.banner-helper-text {
  font-size: 13.5px;
  color: #8E3D2C;
  flex: 1;
}
.banner-helper a {
  font-weight: 600;
  color: var(--primary);
  font-size: 13.5px;
}
.banner-helper a:hover { text-decoration: underline; }

/* ============ Pagination ============ */
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
}
.pagination button {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 7px;
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.pagination button:hover:not(:disabled) { background: var(--bg-soft); }
.pagination button.active {
  background: var(--primary);
  color: #fff;
}
.pagination button:disabled { color: var(--muted-2); cursor: not-allowed; }

/* ============ Empty state ============ */
.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 24px;
  background: #fff;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-card);
}
.empty-state h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 16px 0 6px;
}
.empty-state p {
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 360px;
}

/* ============ Slide-over (Topic form) ============ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(31,27,22,0.32);
  backdrop-filter: blur(2px);
  z-index: 80;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.overlay.open { opacity: 1; }
.slideover {
  position: fixed;
  top: 0; bottom: 0; right: 0;
  width: 640px;
  max-width: 100vw;
  background: var(--bg);
  z-index: 81;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32,0.72,0,1);
  box-shadow: -16px 0 40px rgba(31,27,22,0.10);
}
.slideover.open { transform: translateX(0); }
.slideover-head {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.slideover-head h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 4px;
}
.slideover-head p { margin: 0; font-size: 13.5px; color: var(--muted); }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }

.slideover-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 32px;
}
.form-section { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.form-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.form-section h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 16px;
  color: var(--ink);
}
.form-section .section-desc {
  font-size: 13px;
  color: var(--muted);
  margin: -10px 0 16px;
}
.char-counter { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; text-align: right; }

/* Level radio pills */
.level-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.level-pills label {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  transition: border-color 0.15s, transform 0.05s;
  display: inline-flex;
  align-items: center;
}
.level-pills label:active { transform: translateY(1px); }
.level-pills input { position: absolute; opacity: 0; pointer-events: none; }
.level-pills label.a1 { background: var(--lvl-a1-bg); color: var(--lvl-a1-fg); }
.level-pills label.a2 { background: var(--lvl-a2-bg); color: var(--lvl-a2-fg); }
.level-pills label.b1 { background: var(--lvl-b1-bg); color: var(--lvl-b1-fg); }
.level-pills label.b2 { background: var(--lvl-b2-bg); color: var(--lvl-b2-fg); }
.level-pills label.c1 { background: var(--lvl-c1-bg); color: var(--lvl-c1-fg); }
.level-pills label.checked {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,101,78,0.16);
}

/* Status radio cards */
.status-options { display: flex; flex-direction: column; gap: 10px; }
.status-options label {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  align-items: flex-start;
}
.status-options label.checked {
  border-color: var(--primary);
  background: var(--primary-softer);
}
.status-options input { margin-top: 3px; accent-color: var(--primary); }
.status-options strong { font-weight: 600; color: var(--ink); display: block; margin-bottom: 2px; }
.status-options span.desc { font-size: 12.5px; color: var(--muted); }

/* Mono textarea (AI prompt) */
.textarea-mono {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  min-height: 140px;
}

/* File upload */
.upload-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  background: #FDFBF7;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone:hover { border-color: var(--primary); background: var(--primary-softer); }
.upload-zone .upload-ico {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 8px;
}
.upload-zone p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.upload-zone .upload-hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
}
.file-item .file-name { color: var(--ink); font-weight: 500; }
.file-item .file-size { color: var(--muted); font-size: 12px; margin-left: auto; }
.file-item .file-remove {
  color: var(--muted);
  width: 28px; height: 28px;
  border-radius: 6px;
  display: grid; place-items: center;
}
.file-item .file-remove:hover { background: var(--danger-soft); color: var(--danger); }

/* Footer of slide-over */
.slideover-foot {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.slideover-foot .left { display: flex; align-items: center; gap: 10px; }
.slideover-foot .right { display: flex; align-items: center; gap: 10px; }

/* ============ Detail page ============ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.breadcrumb .back-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-weight: 600;
}
.breadcrumb .back-arrow:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--muted-2); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

.detail-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  margin-bottom: 22px;
}
.detail-head-left {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.detail-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.detail-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.detail-desc { color: var(--muted); font-size: 14px; margin: 0 0 14px; line-height: 1.5; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat-cell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.stat-cell .v {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.1;
  color: var(--ink);
}
.stat-cell .l {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.section-card { margin-bottom: 22px; }
.section-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-card-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.section-card-head .sub { font-size: 13px; color: var(--muted); margin: 0; }

.chart-svg { width: 100%; height: 240px; display: block; }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

.student-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.student-row:hover { background: var(--bg-soft); }
.student-row + .student-row { border-top: 1px solid var(--border); }
.student-row .avatar-mini {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #F4DEDB;
  color: #B23F2D;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.student-row .stu-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.student-row .stu-meta { font-size: 12px; color: var(--muted); }
.student-row .stu-stats {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.insight-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
}
.insight-item + .insight-item { border-top: 1px solid var(--border); }
.insight-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.insight-text { font-size: 13.5px; color: var(--ink); line-height: 1.45; }

.prompt-box {
  background: #F6F2EB;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  white-space: pre-wrap;
  max-height: 200px;
  overflow: hidden;
  position: relative;
}
.prompt-box.expanded { max-height: none; }
.prompt-box::after {
  content: '';
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 48px;
  background: linear-gradient(to top, #F6F2EB, transparent);
  pointer-events: none;
}
.prompt-box.expanded::after { display: none; }
.prompt-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.resource-list { display: flex; flex-direction: column; gap: 8px; }

.sessions-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.sessions-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.sessions-table td {
  padding: 12px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
}
.sessions-table tr:last-child td { border-bottom: 0; }
.sessions-table tr.row-clickable { cursor: pointer; transition: background 0.12s; }
.sessions-table tr.row-clickable:hover { background: var(--bg-soft); }
.sessions-table .col-act { text-align: right; }
.link-coral { color: var(--primary); font-weight: 600; font-size: 13px; }
.link-coral:hover { text-decoration: underline; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  z-index: 90;
  animation: toastIn 0.2s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Responsive */
@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .user-card-fixed { display: none; }
  .detail-head { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .slideover { width: 100vw; }
  .main { padding: 22px 18px 40px; }
  .topbar { flex-direction: column; }
}

/* ============ Additions for Dashboard / Users / Sessions / Weekly / Settings ============ */

/* Stats row (dashboard + user detail) */
.dash-stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card-rich {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 18px 20px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.stat-value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 8px 0 4px;
  color: var(--ink);
}
.stat-delta {
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--danger); }
.stat-delta.flat { color: var(--primary); font-weight: 600; }
.stat-delta .stat-sub { color: var(--muted); font-weight: 500; }

/* Dashboard two-col layout */
.dash-two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
@media (max-width: 1200px) { .dash-two-col { grid-template-columns: 1fr; } .dash-stat-row { grid-template-columns: repeat(2, 1fr); } }

.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
  flex-wrap: wrap;
}
.chart-legend button, .chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  cursor: pointer;
  font-weight: 500;
}
.chart-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* Bar with fill (class table cells) */
.bar-wrap {
  display: inline-block;
  width: 100px;
  height: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 8px;
}
.bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}
.bar-fill.teal { background: var(--green); }
.bar-num {
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 600;
}

/* Strip bar (users count) */
.strip-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 14px;
  background: var(--bg-soft);
  padding: 10px 16px;
  border-radius: 10px;
}
.strip-bar strong { color: var(--ink); font-weight: 600; }

/* Chip row (quick filters) */
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Large avatar (detail headers) */
.avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: #F4DEDB;
  color: #B23F2D;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 26px;
  font-family: var(--serif);
  flex-shrink: 0;
}

/* Modal (transcript + export + class form) */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  z-index: 81;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(31,27,22,0.18);
  animation: modalIn 0.22s ease;
}
.modal.modal-sm { width: 460px; }
@keyframes modalIn {
  from { transform: translate(-50%, -48%); opacity: 0; }
  to   { transform: translate(-50%, -50%); opacity: 1; }
}
.modal-head {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 24px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.modal-strip span {
  font-size: 12px;
  color: var(--muted);
}
.modal-strip strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}
.modal-strip em { font-style: normal; }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.modal-foot {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Chat bubbles (transcript) */
.chat-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-end;
}
.chat-row.user { flex-direction: row-reverse; }
.chat-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #F4DEDB;
  color: #B23F2D;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.chat-row.ai .chat-avatar { background: var(--primary-soft); color: var(--primary); }
.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.chat-row.ai .chat-bubble {
  background: var(--bg-soft);
  color: var(--ink);
  border-radius: 14px 14px 14px 4px;
}
.chat-row.user .chat-bubble {
  background: var(--primary-soft);
  color: var(--ink);
  border-radius: 14px 14px 4px 14px;
}
.chat-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.chat-meta strong { color: var(--ink); font-weight: 600; }
.chat-text { color: var(--ink); }

/* Export cards grid */
.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 900px) { .export-grid { grid-template-columns: 1fr; } }
.export-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.export-card:hover { border-color: var(--primary); background: var(--primary-softer); }
.export-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Settings row */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.settings-row:first-child { border-top: 0; padding-top: 0; }
.settings-label {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}
.settings-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  max-width: 480px;
}

/* Toggle switch */
.toggle {
  width: 42px; height: 24px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  transition: background 0.18s;
  flex-shrink: 0;
}
.toggle.on { background: var(--primary); }
.toggle-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on .toggle-knob { transform: translateX(18px); }


/* Embedded mode (used when admin.html is loaded inside an iframe) */
.app--embed { grid-template-columns: 1fr; }
.app--embed .user-card-fixed { display: none; }

/* ============ Topic Groups Overview (2 hero cards) ============ */
.groups-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  padding: 14px 18px;
  background: var(--bg-soft);
  border-radius: 12px;
}
.groups-summary strong { color: var(--ink); font-weight: 600; }
.groups-summary .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--muted-2);
  flex-shrink: 0;
}

.group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 8px;
}
@media (max-width: 1100px) { .group-grid { grid-template-columns: 1fr; } }

.group-hero {
  position: relative;
  border-radius: 22px;
  padding: 36px 36px 28px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  min-height: 480px;
  display: flex;
}
.group-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(31,27,22,0.08), 0 4px 14px rgba(31,27,22,0.04);
}
.group-hero--coral {
  border-color: rgba(232,101,78,0.22);
  background:
    radial-gradient(120% 90% at 100% 50%, rgba(252,226,219,0.85) 0%, rgba(252,226,219,0.55) 30%, rgba(252,226,219,0.18) 65%, rgba(254,245,241,0.0) 100%),
    #fff;
}
.group-hero--coral:hover { border-color: var(--primary); }
.group-hero--teal  {
  border-color: rgba(79,158,139,0.28);
  background:
    radial-gradient(120% 90% at 100% 50%, rgba(221,237,232,0.85) 0%, rgba(221,237,232,0.55) 30%, rgba(221,237,232,0.20) 65%, rgba(239,232,221,0.0) 100%),
    #fff;
}
.group-hero--teal:hover  { border-color: #4F9E8B; }

.group-hero-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 60%;
  pointer-events: none;
}

.group-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.group-hero-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.group-hero-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.group-hero--coral .group-hero-icon {
  background: linear-gradient(135deg, #F4A47C 0%, #E8654E 100%);
  box-shadow: 0 8px 20px rgba(232,101,78,0.28);
}
.group-hero--teal  .group-hero-icon {
  background: linear-gradient(135deg, #6BAFA0 0%, #3F8473 100%);
  box-shadow: 0 8px 20px rgba(79,158,139,0.25);
}
.group-hero-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.group-hero--coral .group-hero-eyebrow { color: var(--primary); }
.group-hero--teal  .group-hero-eyebrow { color: #2F7B6A; }

.group-hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
  max-width: 320px;
}
.group-hero-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 380px;
}

.group-hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(4px);
  margin-top: 4px;
  width: fit-content;
  max-width: 340px;
}
.ghs-cell { display: flex; flex-direction: column; gap: 2px; min-width: 64px; }
.ghs-val {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.1;
}
.ghs-lab {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}
.ghs-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border);
}

.group-hero-featured {
  margin-top: 6px;
  width: fit-content;
  max-width: 360px;
}
.ghf-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}
.ghf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ghf-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.05);
  font-size: 13px;
  min-width: 340px;
}
.ghf-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
/* Default fallback if no inline color set */
.group-hero--coral .ghf-dot:not([style]) { background: var(--primary); }
.group-hero--teal  .ghf-dot:not([style]) { background: #4F9E8B; }
.ghf-title { color: var(--ink); font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ghf-meta  { color: var(--muted); font-size: 11.5px; flex-shrink: 0; }

.group-hero-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}
.group-hero-arrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s;
}
.group-hero:hover .group-hero-arrow { gap: 14px; }
.group-hero--coral .group-hero-arrow { color: var(--primary); }
.group-hero--teal  .group-hero-arrow { color: #2F7B6A; }

/* Teal variant overrides outline-coral button to be teal */
.group-hero--teal .btn-outline-coral {
  border-color: #4F9E8B;
  color: #2F7B6A;
}
.group-hero--teal .btn-outline-coral:hover {
  background: #DDEDE8;
}

/* ── Phase 02: Users list multi-role styles ────────────────────────────────── */

/* Role chip filter row */
.chip-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip-filter:hover { border-color: var(--primary); color: var(--ink); }
.chip-filter--active { border-color: var(--primary); background: #FEF0ED; color: var(--primary); font-weight: 600; }
.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 0 5px;
  height: 18px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.chip-filter--active .chip-count { background: rgba(244,89,70,0.12); color: var(--primary); }

/* Role pills in users table */
.pill-role-student    { background: #FDECEA; color: #B23F2D; }
.pill-role-lecturer   { background: #DDF0EB; color: #296B58; }
.pill-role-researcher { background: #EEEAF8; color: #4B3CA7; }
.pill-role-admin      { background: #FEF0D0; color: #8A5A00; }
.pill-admin           { background: #FEF0D0; color: #8A5A00; }

/* Pending invite role pills */
.pill-lecturer   { background: #DDF0EB; color: #296B58; }
.pill-researcher { background: #EEEAF8; color: #4B3CA7; }
.pill-admin      { background: #FEF0D0; color: #8A5A00; }

/* stat-sub for KPI strip */
.stat-card-rich .stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}
