:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  --bg: #f6f4fb;
  --bg-soft: #fbfaff;
  --panel: #ffffff;
  --panel-strong: #fdfcff;
  --line: #e4dfec;
  --line-strong: #d4cae3;
  --text: #241b2f;
  --muted: #71677d;
  --primary: #82318e;
  --primary-dark: #5d1c6b;
  --primary-soft: #f2e8f5;
  --accent: #2563eb;
  --teal: #0f9488;
  --danger: #dc2626;
  --warn: #b45309;
  --ok: #059669;
  --shadow: 0 14px 36px rgba(51, 30, 74, 0.10);
  --shadow-soft: 0 8px 24px rgba(51, 30, 74, 0.07);
}

/* Commercial UI refresh */
:root {
  --bg: #f4f6fb;
  --bg-soft: #f8fafc;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text: #111827;
  --muted: #64748b;
  --primary: #7a1f86;
  --primary-dark: #55125f;
  --primary-soft: #f6ecf8;
  --accent: #0f766e;
  --teal: #0f766e;
  --danger: #dc2626;
  --warn: #b45309;
  --ok: #059669;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.07);
}

html {
  background: var(--bg);
}

body {
  background:
    linear-gradient(180deg, #f8fafc 0%, #f4f6fb 42%, #eef7f6 100%);
  color: var(--text);
}

button {
  min-height: 38px;
  border-radius: 8px;
  border-color: #d7deea;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: #1f2937;
  font-weight: 650;
}

button:hover:not(:disabled) {
  border-color: rgba(122, 31, 134, 0.42);
  color: var(--primary-dark);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09);
}

button.primary {
  background: linear-gradient(135deg, #7a1f86 0%, #6c2d91 52%, #0f766e 100%);
  box-shadow: 0 12px 24px rgba(122, 31, 134, 0.24);
}

button.primary:hover:not(:disabled) {
  box-shadow: 0 16px 32px rgba(122, 31, 134, 0.28);
}

input,
select,
textarea {
  min-height: 40px;
  border-color: #d7deea;
  border-radius: 8px;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(122, 31, 134, 0.62);
  box-shadow: 0 0 0 3px rgba(122, 31, 134, 0.12);
}

.shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, #4c1757 0%, #331344 52%, #15213d 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 14px 0 36px rgba(15, 23, 42, 0.16);
}

.brand {
  min-height: 48px;
  margin-bottom: 22px;
  padding: 0 10px;
  letter-spacing: 0;
}

.brand::before {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #d8c2e2 48%, #64d4c7 100%);
}

.nav {
  gap: 7px;
}

.nav button {
  min-height: 42px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.74);
}

.nav button.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 4px 0 0 #67e8d3;
}

.main {
  background: transparent;
}

.topbar {
  height: 58px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e6edf6;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.04);
}

.content {
  gap: 18px;
  padding: 22px;
}

.page-title {
  min-height: 82px;
  border-color: #dde6f2;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 58%, rgba(238, 249, 248, 0.98) 100%);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.page-title::before {
  width: 4px;
  background: linear-gradient(180deg, #7a1f86, #0f766e);
}

.page-title h2 {
  font-size: 24px;
  font-weight: 850;
}

.page-title h2::after {
  width: 46px;
  background: linear-gradient(90deg, #7a1f86, #0f766e);
}

.panel,
.modal,
.login-box,
.card {
  border-color: #dde6f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.toolbar {
  gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.toolbar.two {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px) auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

th,
td {
  border-bottom: 1px solid #e8eef6;
  padding: 12px 14px;
}

tbody tr {
  transition: background 0.14s ease;
}

tbody tr:hover {
  background: #fbf7fd;
}

.actions {
  gap: 7px;
}

.actions button,
.subject-chip button,
.rule-item button {
  border-radius: 8px;
  background: #fff;
}

.stats-grid {
  gap: 14px;
}

.stat-card,
.workbench-task,
.class-overview-card {
  border-color: #dde6f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.stat-card strong,
.workbench-task strong,
.class-metrics b {
  color: #111827;
}

.workbench-hero {
  border-color: #dde6f2;
  background:
    linear-gradient(135deg, rgba(122, 31, 134, 0.08), rgba(15, 118, 110, 0.08)),
    #fff;
}

.workbench-kpis span,
.reminder-grid span {
  border-color: #dde6f2;
  border-radius: 8px;
}

.status-pill,
.tag {
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  font-weight: 750;
}

.tag.warn,
.status-pill.late,
.status-pill.early_leave {
  background: #fff7ed;
  color: #9a5808;
}

.tag.ok,
.status-pill.normal {
  background: #ecfdf5;
  color: #047857;
}

.tag.fail,
.status-pill.absent {
  background: #fef2f2;
  color: #b91c1c;
}

.modal-mask {
  background: rgba(15, 23, 42, 0.42);
}

.modal header,
.modal footer {
  background: #fff;
}

.modal header h3 {
  font-size: 18px;
}

.form-grid {
  gap: 14px;
}

.field label {
  color: #475569;
  font-weight: 750;
}

.error {
  border-radius: 8px;
  color: #991b1b;
}

.avatar {
  border-radius: 8px;
}

.completeness-badges .tag {
  font-size: 11px;
}

.timetable-slot,
.schedule-request-item,
.rule-item,
.ai-summary-item {
  border-radius: 8px;
  border-color: #dde6f2;
}

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

  .toolbar.two {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(130, 49, 142, 0.10), transparent 28%),
    linear-gradient(135deg, #f8f6fc 0%, #f4f7fb 48%, #f8fbfa 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  padding: 0 13px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.actions button,
.subject-chip button,
.rule-item button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
  background: #fbfaff;
}

.actions button:first-child {
  border-color: rgba(130, 49, 142, 0.26);
  color: var(--primary);
  background: var(--primary-soft);
}

button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(130, 49, 142, 0.10);
}

button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary) 0%, #6d3bb4 55%, #3157b7 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(130, 49, 142, 0.22);
}

button.primary:hover:not(:disabled) {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(130, 49, 142, 0.26);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: #aaa2b6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(130, 49, 142, 0.12);
}

textarea {
  min-height: 82px;
  resize: vertical;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-box {
  width: min(410px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(228, 223, 236, 0.9);
  border-radius: 8px;
  padding: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-box h1 {
  margin: 0 0 8px;
  font-size: 25px;
}

.login-box p {
  margin: 0 0 24px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  color: #f7f2fb;
  background:
    linear-gradient(180deg, rgba(96, 30, 112, 0.96) 0%, rgba(44, 25, 71, 0.98) 58%, rgba(30, 35, 73, 0.98) 100%);
  box-shadow: 12px 0 30px rgba(46, 25, 70, 0.13);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 18px;
  padding: 0 9px;
  font-weight: 800;
  font-size: 18px;
}

.brand::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #e7d6ef 48%, #7dd3c7 100%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  min-height: 40px;
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.nav button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.nav button.active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: inset 3px 0 0 #7dd3c7;
}

.nav button:disabled {
  color: rgba(255, 255, 255, 0.34);
  opacity: 1;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 62px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar strong span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.topbar strong::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 148, 136, 0.12);
}

.content {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.page-title {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  margin-bottom: 0;
  padding: 18px 20px;
  border: 1px solid rgba(228, 223, 236, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(251, 249, 255, 0.94) 58%, rgba(241, 250, 249, 0.92) 100%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.page-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), #6d3bb4, var(--teal));
}

.page-title h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: 0;
}

.page-title h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  opacity: 0.7;
}

.title-actions,
.summary-toolbar,
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.segmented button {
  min-height: 32px;
  border-color: transparent;
  background: transparent;
}

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

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.panel > table,
.panel > form > table {
  background: #fff;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(253, 252, 255, 0.98) 0%, rgba(248, 245, 252, 0.98) 100%);
}

.toolbar.two {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.attendance-toolbar {
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 0.8fr) auto;
}

.timetable-wrap,
.wide-table {
  overflow-x: auto;
}

.timetable {
  min-width: 980px;
  table-layout: fixed;
}

.timetable th,
.timetable td {
  width: 12.5%;
  height: 92px;
  padding: 8px;
  vertical-align: top;
}

.timetable thead th {
  height: 42px;
  text-align: center;
}

.timetable tbody th {
  width: 120px;
  background: #faf8fd;
}

.timetable tbody th strong,
.timetable tbody th span {
  display: block;
}

.timetable tbody th span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.today-col {
  background: #f6fbff;
}

.timetable-slot {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  padding: 8px;
  text-align: left;
  border-color: #d9d0e7;
  background: #fff;
  box-shadow: 0 4px 12px rgba(51, 30, 74, 0.06);
}

.timetable-slot strong {
  font-size: 14px;
}

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

.timetable-slot.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.empty-slot {
  display: grid;
  place-items: center;
  height: 58px;
  color: #c7bfd2;
}

.timetable td {
  background: #fff;
}

.mini-table {
  padding: 0 14px 14px;
  background: linear-gradient(180deg, #fff 0%, #fdfcff 100%);
}

.section-title {
  font-weight: 800;
  padding: 14px 0 8px;
}

.section-title.padded {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #fdfbff 100%);
}

.section-title.padded::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(130, 49, 142, 0.10);
}

.teacher-class-panel {
  margin-bottom: 14px;
}

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

.class-overview-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 13px;
  text-align: left;
  border-color: #d9d0e7;
  background: linear-gradient(180deg, #fff 0%, #fcfaff 100%);
  box-shadow: 0 7px 18px rgba(51, 30, 74, 0.06);
}

.class-overview-card.active {
  border-color: var(--primary);
  background: linear-gradient(180deg, #fbf5ff 0%, #f5fbff 100%);
  box-shadow: 0 9px 22px rgba(130, 49, 142, 0.13);
}

.class-overview-card span,
.class-overview-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.class-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
  align-items: baseline;
}

.class-metrics b {
  display: block;
  font-size: 19px;
}

.class-metrics small {
  display: block;
  color: var(--muted);
}

.danger-text {
  color: var(--danger);
}

.workbench-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border-color: rgba(130, 49, 142, 0.18);
  background:
    linear-gradient(135deg, rgba(130, 49, 142, 0.08), rgba(20, 184, 166, 0.08)),
    #fff;
}

.workbench-hero > div:first-child {
  display: grid;
  align-content: center;
  gap: 6px;
}

.workbench-hero span,
.workbench-list li span,
.workbench-list li em {
  color: var(--muted);
}

.workbench-hero h3 {
  margin: 0;
  font-size: 24px;
}

.workbench-hero p {
  margin: 0;
  color: var(--muted);
}

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

.workbench-kpis span {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(130, 49, 142, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.workbench-kpis b {
  color: var(--ink);
  font-size: 22px;
}

.workbench-kpis small {
  color: var(--muted);
}

.workbench-task-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.workbench-task {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 76px;
  padding: 14px;
  text-align: left;
  background: #fff;
}

.workbench-task span {
  color: var(--muted);
}

.workbench-task strong {
  font-size: 28px;
}

.workbench-task.ok {
  border-color: rgba(5, 150, 105, 0.18);
}

.workbench-task.warn {
  border-color: rgba(217, 119, 6, 0.28);
  background: linear-gradient(180deg, #fff 0%, #fffbeb 100%);
}

.workbench-task.danger {
  border-color: rgba(220, 38, 38, 0.3);
  background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
}

.workbench-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.workbench-list ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 14px 14px;
  list-style: none;
}

.workbench-list li {
  display: grid;
  gap: 4px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.workbench-list li:first-child {
  border-top: 0;
}

.workbench-list li em {
  font-style: normal;
}

.compact-list {
  padding-top: 0 !important;
}

.reminder-panel {
  padding: 14px;
  border-color: rgba(130, 49, 142, 0.20);
}

.reminder-panel.urgent {
  border-color: rgba(220, 38, 38, 0.35);
  background: linear-gradient(180deg, #fff 0%, #fff7f7 100%);
}

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

.reminder-head strong {
  font-size: 16px;
}

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

.reminder-grid span {
  display: grid;
  gap: 3px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.reminder-grid b {
  font-size: 22px;
}

.reminder-grid small {
  color: var(--muted);
}

.reminder-grid.compact {
  padding: 14px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}

.filter-tabs button.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
}

.grade-publish-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 14px 14px;
  padding: 13px;
  border: 1px solid rgba(130, 49, 142, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fbf8fd 100%);
}

.grade-publish-bar div {
  display: grid;
  gap: 4px;
}

.grade-publish-bar span {
  color: var(--muted);
  font-size: 13px;
}

.wide-table table {
  min-width: 760px;
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  background: #f0edf5;
  color: var(--muted);
  font-weight: 600;
}

.status-pill.normal,
.tag.ok {
  background: #e9fbf4;
  color: var(--ok);
}

.status-pill.late,
.status-pill.early_leave,
.tag.warn {
  background: #fff7ed;
  color: var(--warn);
}

.status-pill.leave {
  background: #eff6ff;
  color: var(--accent);
}

.status-pill.absent,
.tag.fail {
  background: #fef2f2;
  color: var(--danger);
}

.completeness-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 260px;
}

.small-text {
  margin-top: 5px;
  font-size: 12px;
}

.grade-subject {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}

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

.form-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--panel-strong);
}

select[multiple] {
  min-height: 110px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom: 1px solid #eeeaf4;
  text-align: left;
  padding: 13px 14px;
  font-size: 14px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 700;
  background: linear-gradient(180deg, #fbf9fe 0%, #f7f3fb 100%);
  white-space: nowrap;
}

tbody tr:hover td {
  background: #fbf9ff;
}

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

td[colspan] {
  height: 92px;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 249, 255, 0.9));
}

td strong {
  font-weight: 800;
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--primary-soft);
  object-fit: cover;
}

.avatar.missing {
  display: grid;
  place-items: center;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.avatar.large {
  width: 92px;
  height: 112px;
  border-radius: 12px;
}

.photo-upload-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.photo-upload-field input[type="file"] {
  min-height: auto;
  padding: 10px;
}

.subject-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.subject-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 6px 5px 9px;
  background: linear-gradient(180deg, #fff 0%, #fbfaff 100%);
  box-shadow: 0 4px 12px rgba(51, 30, 74, 0.05);
}

.subject-chip button {
  min-height: 24px;
  padding: 0 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.stat-card {
  position: relative;
  min-height: 102px;
  background: linear-gradient(180deg, #fff 0%, #fcfaff 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.stat-card:nth-child(2)::after {
  background: linear-gradient(90deg, #3157b7, var(--teal));
}

.stat-card:nth-child(3)::after {
  background: linear-gradient(90deg, var(--teal), #d97706);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  opacity: 0.34;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 23px;
}

.month-input {
  width: 160px;
}

.rule-list,
.summary-group {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.rule-item {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.2fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #fff 0%, #fbfaff 100%);
}

.rule-item span {
  color: var(--muted);
}

.rule-item button {
  justify-self: end;
}

.summary-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.summary-head,
.follow-item > div:first-child,
.ai-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.summary-head {
  color: var(--muted);
  margin-bottom: 10px;
}

.summary-head strong {
  color: var(--text);
}

.analysis-row td {
  padding: 0 12px 14px;
  background: #fbf9ff;
}

.ai-inline {
  border: 1px solid #d9d0e7;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.ai-inline.pending {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.ai-inline.failed {
  color: var(--danger);
  background: #fef2f2;
  border-color: #fecaca;
}

.ai-inline-head {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.ai-inline-head strong {
  font-size: 15px;
}

.ai-inline-head span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
}

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

.ai-summary-item,
.follow-item,
.analysis-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.ai-summary-item h4,
.follow-history h4,
.analysis-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.ai-summary-item ul {
  margin: 0;
  padding-left: 18px;
}

.ai-summary-item li + li {
  margin-top: 3px;
}

.follow-history {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.follow-item {
  margin-bottom: 10px;
}

.follow-item span {
  color: var(--muted);
  font-size: 13px;
}

.follow-item p {
  margin: 8px 0;
}

.modal-mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(36, 27, 47, 0.48);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.modal {
  width: min(780px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal.wide {
  width: min(1040px, 100%);
}

.modal header,
.modal footer {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-strong);
}

.modal footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
  gap: 10px;
}

.modal h3 {
  margin: 0;
  font-size: 17px;
}

.modal-body {
  padding: 18px;
  background: #fff;
}

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

.span-2 {
  grid-column: 1 / -1;
}

.analysis {
  display: grid;
  gap: 12px;
}

.error {
  display: block;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  padding: 10px 12px;
}

.muted {
  color: var(--muted);
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }

  .brand {
    margin-bottom: 10px;
  }

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

  .topbar {
    position: static;
  }

  .content {
    padding: 14px;
  }

  .toolbar,
  .toolbar.two,
  .attendance-toolbar,
  .form-grid,
  .ai-summary-grid {
    grid-template-columns: 1fr;
  }

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

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

  .workbench-hero,
  .workbench-columns,
  .workbench-task-grid {
    grid-template-columns: 1fr;
  }

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

  .summary-head,
  .title-actions {
    justify-content: flex-start;
  }

  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-upload-row {
    grid-template-columns: 1fr;
  }
}

/* Product UI system, Tsinghua purple business edition */
:root {
  --bg: #f9fafb;
  --bg-soft: #f5f0fa;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d8c8e8;
  --text: #111827;
  --muted: #6b7280;
  --primary: #660099;
  --primary-dark: #330066;
  --primary-mid: #7e22ce;
  --primary-light: #9333ea;
  --primary-soft: #f3e8ff;
  --purple-100: #ddd6fe;
  --accent: #2563eb;
  --teal: #0f766e;
  --danger: #dc2626;
  --warn: #d97706;
  --ok: #059669;
  --blue: #2563eb;
  --shadow: 0 24px 60px rgba(31, 13, 46, 0.13);
  --shadow-soft: 0 10px 28px rgba(31, 13, 46, 0.08);
  --radius-card: 18px;
  --radius-panel: 22px;
  --radius-control: 12px;
}

body {
  background:
    radial-gradient(circle at 24% 0%, rgba(147, 51, 234, 0.10), transparent 32%),
    linear-gradient(180deg, #fbfaff 0%, #f9fafb 44%, #f6fbfa 100%);
  color: var(--text);
}

button {
  min-height: 40px;
  border-radius: var(--radius-control);
  border-color: #e5e7eb;
  background: #fff;
  font-weight: 750;
  letter-spacing: 0;
}

button:hover:not(:disabled) {
  border-color: rgba(102, 0, 153, 0.42);
  color: var(--primary);
  box-shadow: 0 10px 22px rgba(102, 0, 153, 0.12);
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button.primary {
  min-height: 44px;
  border-color: transparent;
  border-radius: 14px;
  background: linear-gradient(135deg, #660099 0%, #7e22ce 58%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(102, 0, 153, 0.25);
}

button.primary:hover:not(:disabled) {
  color: #fff;
  box-shadow: 0 18px 36px rgba(102, 0, 153, 0.32);
}

input,
select,
textarea {
  min-height: 42px;
  border-radius: var(--radius-control);
  border-color: #e2e8f0;
  background: #fff;
  padding: 9px 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(102, 0, 153, 0.62);
  box-shadow: 0 0 0 4px rgba(102, 0, 153, 0.10);
}

.login-page {
  background:
    radial-gradient(circle at 18% 10%, rgba(167, 139, 250, 0.28), transparent 26%),
    linear-gradient(135deg, #660099 0%, #330066 100%);
}

.login-box {
  width: min(430px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.28);
}

.login-box h1 {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary-dark);
}

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

.sidebar {
  height: 100vh;
  padding: 24px 16px 18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #ffffff 72%, #fbf7ff 100%);
  color: var(--text);
  border-right: 1px solid #e5e7eb;
  box-shadow: 10px 0 30px rgba(31, 13, 46, 0.07);
}

.brand {
  min-height: 54px;
  margin: 0 0 22px;
  padding: 0 10px;
  color: var(--primary-dark);
  font-size: 19px;
  font-weight: 900;
}

.brand span {
  display: grid;
  gap: 2px;
  line-height: 1.15;
}

.brand span::after {
  content: "Campus OA v1.0";
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.brand::before {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #660099 0%, #9333ea 65%, #a78bfa 100%);
  box-shadow: 0 12px 24px rgba(102, 0, 153, 0.25);
}

.nav {
  gap: 8px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #4b5563;
  background: transparent;
  box-shadow: none;
}

.nav button::before {
  content: attr(data-icon);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.nav button:hover:not(:disabled) {
  background: #faf5ff;
  border-color: #f3e8ff;
  color: var(--primary);
  transform: none;
  box-shadow: none;
}

.nav button:hover:not(:disabled)::before,
.nav button.active::before {
  background: linear-gradient(135deg, #660099, #9333ea);
  color: #fff;
}

.nav button.active {
  color: var(--primary-dark);
  background: linear-gradient(90deg, rgba(102, 0, 153, 0.13), rgba(147, 51, 234, 0.06));
  border-color: rgba(102, 0, 153, 0.16);
  box-shadow: inset 4px 0 0 var(--primary);
}

.nav button:disabled {
  color: #cbd5e1;
  background: transparent;
}

.sidebar-footer {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f1e6ff;
  border-radius: 18px;
  background: linear-gradient(135deg, #faf5ff, #ffffff);
}

.sidebar-footer .avatar-mini {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #660099, #9333ea);
  font-weight: 900;
}

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}

.sidebar-footer strong {
  color: #111827;
  font-size: 14px;
}

.sidebar-footer span {
  margin-top: 2px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 800;
}

.main {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  background: transparent;
}

.topbar {
  height: 64px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(31, 13, 46, 0.04);
}

.topbar strong {
  font-size: 17px;
  font-weight: 900;
}

.topbar strong span {
  min-height: 24px;
  border-radius: 999px;
  background: #faf5ff;
  color: var(--primary);
}

.topbar strong::before {
  background: #14b8a6;
  box-shadow: 0 0 0 5px rgba(20, 184, 166, 0.12);
}

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

.system-date {
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.icon-btn {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 14px;
  color: var(--primary);
  background: #faf5ff;
  border-color: #eadcff;
}

.notification-btn {
  position: relative;
}

.notice-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.28);
}

.modal-notifications {
  width: min(760px, calc(100vw - 36px));
}

.modal-notifications header p {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
}

.notification-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.96), rgba(239, 246, 255, 0.86));
  border: 1px solid rgba(221, 214, 254, 0.84);
}

.notification-toolbar > span {
  color: #4c1d95;
  font-size: 14px;
  font-weight: 900;
}

.notification-toolbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-list {
  display: grid;
  gap: 12px;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.notification-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(79, 70, 229, 0.08);
}

.notification-item.unread {
  border-color: rgba(125, 60, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(250, 245, 255, 0.96), rgba(255, 255, 255, 0.86));
}

.notification-main {
  min-width: 0;
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.notification-head strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
}

.notification-head span,
.read-state {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.notification-item p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
}

.notification-item em {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f3e8ff;
  color: #7c3aed;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.notification-empty {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #94a3b8;
  text-align: center;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px dashed rgba(203, 213, 225, 0.9);
}

.notification-empty .ui-icon {
  width: 42px;
  height: 42px;
  color: #7d3cff;
}

.notification-empty strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

.content {
  height: calc(100vh - 64px);
  overflow: auto;
  padding: 32px;
  gap: 22px;
}

.page-title {
  min-height: 88px;
  padding: 22px 24px;
  border: 1px solid rgba(216, 200, 232, 0.8);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 245, 255, 0.88) 54%, rgba(239, 246, 255, 0.82) 100%);
  box-shadow: var(--shadow-soft);
}

.page-title::before {
  width: 5px;
  background: linear-gradient(180deg, #660099 0%, #9333ea 58%, #14b8a6 100%);
}

.page-title h2 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 950;
  color: #111827;
}

.page-title h2::after {
  width: 52px;
  height: 3px;
  background: linear-gradient(90deg, #660099, #14b8a6);
}

.page-title p,
.muted {
  color: #64748b;
}

.title-actions,
.summary-toolbar {
  gap: 10px;
}

.panel,
.card,
.stat-card,
.workbench-task,
.class-overview-card,
.login-box {
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.panel {
  overflow: hidden;
}

.toolbar {
  grid-template-columns: minmax(280px, 1fr) minmax(160px, 220px) auto;
  padding: 16px;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid #edf0f5;
}

.toolbar.two {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
}

.section-title,
.card-title {
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

th {
  height: 48px;
  background: #f9fafb;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

td {
  height: 58px;
  color: #1f2937;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
}

tbody tr:hover {
  background: rgba(243, 232, 255, 0.42);
}

.wide-table,
.mini-table {
  overflow: auto;
}

.actions {
  gap: 8px;
}

.actions button,
.subject-chip button,
.rule-item button {
  min-height: 34px;
  border-radius: 11px;
  background: #fff;
  font-size: 13px;
}

.actions button:first-child {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: var(--primary);
}

.stats-grid {
  gap: 18px;
}

.stat-card {
  position: relative;
  min-height: 108px;
  padding: 20px;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3e8ff, #dbeafe);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 96px;
  height: 96px;
  border-radius: 32px;
  background: rgba(102, 0, 153, 0.08);
  transform: rotate(18deg);
}

.stat-card span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.stat-card small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.stat-card.tone-purple::before { background: linear-gradient(135deg, #f3e8ff, #ddd6fe); }
.stat-card.tone-blue::before { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.stat-card.tone-warn::before { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.stat-card.tone-ok::before { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }
.stat-card.tone-purple strong { color: #581c87; }
.stat-card.tone-blue strong { color: #1d4ed8; }
.stat-card.tone-warn strong { color: #b45309; }
.stat-card.tone-ok strong { color: #047857; }

.tag,
.status-pill,
.completeness-badges .tag {
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.tag,
.status-pill.leave,
.tag.blue {
  background: #eff6ff;
  color: #1d4ed8;
}

.tag.ok,
.status-pill.normal {
  background: #ecfdf5;
  color: #047857;
}

.tag.warn,
.status-pill.late,
.status-pill.early_leave {
  background: #fffbeb;
  color: #b45309;
}

.tag.fail,
.status-pill.absent {
  background: #fef2f2;
  color: #b91c1c;
}

.modal-mask {
  padding: 24px;
  background: rgba(17, 24, 39, 0.52);
  backdrop-filter: blur(10px);
}

.modal {
  width: min(820px, 100%);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  box-shadow: 0 32px 90px rgba(17, 24, 39, 0.28);
}

.modal.wide {
  width: min(1120px, 100%);
}

.modal header,
.modal footer {
  padding: 18px 20px;
  background: #fff;
}

.modal h3 {
  font-size: 20px;
  font-weight: 900;
}

.modal-body {
  padding: 20px;
}

.form-grid {
  gap: 16px;
}

.field label {
  color: #475569;
  font-size: 13px;
  font-weight: 850;
}

.error {
  border-radius: 14px;
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
  font-weight: 700;
}

.workbench-hero {
  border-color: #e9d5ff;
  background:
    linear-gradient(135deg, rgba(102, 0, 153, 0.08), rgba(37, 99, 235, 0.06)),
    #fff;
}

.executive-title {
  min-height: 106px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.dashboard-main-card {
  grid-row: span 2;
}

.padded {
  padding: 18px 20px;
}

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

.todo-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  min-height: 92px;
  padding: 16px;
  text-align: left;
  border-radius: 18px;
  background: #fff;
}

.todo-card span,
.todo-card em {
  display: block;
}

.todo-card span {
  color: #334155;
  font-weight: 900;
}

.todo-card strong {
  color: #111827;
  font-size: 30px;
  font-weight: 950;
}

.todo-card em {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.todo-card.warn { border-color: #fde68a; background: linear-gradient(135deg, #fff, #fffbeb); }
.todo-card.danger { border-color: #fecaca; background: linear-gradient(135deg, #fff, #fff1f2); }
.todo-card.blue { border-color: #bfdbfe; background: linear-gradient(135deg, #fff, #eff6ff); }
.todo-card.warn strong { color: #b45309; }
.todo-card.danger strong { color: #b91c1c; }
.todo-card.blue strong { color: #1d4ed8; }

.funnel-list,
.rank-list {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.funnel-row span {
  color: #475569;
  font-size: 13px;
  font-weight: 850;
}

.funnel-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

.funnel-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #660099, #9333ea, #a78bfa);
}

.funnel-row strong {
  text-align: right;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

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

.rank-row b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #660099;
  background: #f3e8ff;
}

.rank-row span {
  font-weight: 850;
}

.rank-row strong {
  color: #660099;
}

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

.health-grid span {
  display: grid;
  gap: 4px;
  min-height: 74px;
  align-content: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  color: #64748b;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.health-grid b {
  color: #111827;
  font-size: 24px;
}

.workbench-kpis span,
.reminder-grid span,
.timetable-slot,
.schedule-request-item,
.rule-item,
.ai-summary-item,
.follow-item,
.analysis-section {
  border-color: #e5e7eb;
  border-radius: 16px;
  background: #fff;
}

.timetable th {
  background: #faf5ff;
  color: var(--primary-dark);
}

.timetable-slot {
  min-height: 72px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.timetable-slot:hover {
  transform: translateY(-1px);
  border-color: #c084fc;
  box-shadow: 0 12px 22px rgba(102, 0, 153, 0.12);
}

.timetable-slot.active {
  border-color: #660099;
  background: linear-gradient(135deg, #faf5ff, #eff6ff);
}

.ai-inline {
  border-radius: 18px;
  border-color: #e9d5ff;
  background: linear-gradient(180deg, #ffffff 0%, #fdfaff 100%);
}

.ai-inline-head span {
  background: #faf5ff;
  color: var(--primary);
}

.avatar {
  border-radius: 12px;
}

.photo-upload-row,
.summary-toolbar,
.title-actions {
  align-items: center;
}

@media (max-width: 920px) {
  .shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .main {
    height: auto;
    overflow: visible;
  }

  .content {
    height: auto;
    overflow: visible;
    padding: 16px;
  }

  .page-title,
  .panel,
  .card,
  .stat-card {
    border-radius: 18px;
  }

  .dashboard-grid,
  .todo-grid,
  .health-grid {
    grid-template-columns: 1fr;
  }
}

/* Premium refinement: quieter, cleaner, more commercial */
body {
  background: #f7f8fb;
}

.sidebar {
  background: #ffffff;
  box-shadow: none;
}

.brand {
  padding: 0 8px;
  font-size: 18px;
}

.brand::before {
  border-radius: 14px;
  background: linear-gradient(145deg, #660099 0%, #8b35d1 100%);
  box-shadow: 0 10px 24px rgba(102, 0, 153, 0.18);
}

.nav button {
  min-height: 44px;
  border-radius: 14px;
  color: #475569;
}

.nav button::before {
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background: #f8fafc;
  font-size: 11px;
}

.nav button.active {
  background: #faf5ff;
  border-color: #eadcff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.topbar {
  height: 60px;
  padding: 0 30px;
  background: rgba(255, 255, 255, 0.92);
}

.content {
  height: calc(100vh - 60px);
  padding: 28px 32px 36px;
  gap: 20px;
}

.page-title {
  min-height: 92px;
  padding: 22px 24px;
  border-color: #e8e0f1;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #fbf8ff 58%, #f8fbff 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.page-title::before {
  width: 4px;
  background: #660099;
}

.page-title h2 {
  font-size: 26px;
  letter-spacing: 0;
}

.page-title h2::after {
  width: 40px;
  height: 2px;
  background: #14b8a6;
}

.page-title p {
  max-width: 760px;
  font-size: 14px;
  line-height: 1.65;
}

.panel,
.card,
.stat-card,
.workbench-task,
.class-overview-card {
  border-color: #e6eaf0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.executive-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  min-height: 126px;
  padding: 20px 22px;
}

.stat-card::before {
  top: 20px;
  right: 22px;
  width: 10px;
  height: 44px;
  border-radius: 999px;
  opacity: 1;
}

.stat-card::after {
  display: none;
}

.stat-card span {
  color: #536174;
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  margin-top: 10px;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 900;
}

.stat-card small {
  margin-top: 12px;
  color: #64748b;
  font-weight: 700;
}

.stat-card.tone-purple::before { background: #a855f7; }
.stat-card.tone-blue::before { background: #60a5fa; }
.stat-card.tone-warn::before { background: #f59e0b; }
.stat-card.tone-ok::before { background: #34d399; }

.dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.section-title {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  font-weight: 900;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #660099;
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px #f3e8ff;
}

.todo-grid {
  gap: 10px;
}

.todo-card {
  min-height: 82px;
  padding: 14px 16px;
  border-radius: 16px;
  border-color: #e8edf4;
  background: #fff;
  box-shadow: none;
}

.todo-card:hover:not(:disabled) {
  border-color: #d8b4fe;
  background: #fdfbff;
  box-shadow: 0 10px 22px rgba(102, 0, 153, 0.07);
}

.todo-card span {
  color: #1f2937;
  font-size: 14px;
}

.todo-card strong {
  font-size: 28px;
}

.todo-card em {
  color: #64748b;
  font-size: 12px;
}

.todo-card.warn,
.todo-card.danger,
.todo-card.blue {
  background: #fff;
}

.todo-card.warn { border-left: 3px solid #f59e0b; }
.todo-card.danger { border-left: 3px solid #ef4444; }
.todo-card.blue { border-left: 3px solid #3b82f6; }

.funnel-list,
.rank-list {
  gap: 12px;
  padding: 0 20px 20px;
}

.funnel-row {
  grid-template-columns: 78px minmax(0, 1fr) 34px;
}

.funnel-row div {
  height: 9px;
  background: #eef2f7;
}

.funnel-row i {
  background: linear-gradient(90deg, #660099, #a855f7);
}

.rank-row {
  padding: 11px 0;
}

.rank-row b {
  width: 28px;
  height: 28px;
  background: #f5edff;
}

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

.health-grid span {
  min-height: 68px;
  border-color: #edf1f6;
  border-radius: 14px;
  background: #fbfcfe;
}

.health-grid b {
  font-size: 22px;
}

table {
  font-size: 14px;
}

th {
  height: 44px;
  background: #fbfcfe;
  color: #6b7280;
  font-weight: 800;
}

td {
  height: 54px;
}

tbody tr:hover {
  background: #fcf8ff;
}

button {
  box-shadow: none;
}

button:hover:not(:disabled) {
  box-shadow: 0 8px 18px rgba(102, 0, 153, 0.08);
}

button.primary {
  box-shadow: 0 12px 24px rgba(102, 0, 153, 0.20);
}

/* Admin glassmorphism redesign, aligned to supplied reference */
:root {
  --brand: #7d3cff;
  --brand-dark: #5f20f0;
  --brand-soft: rgba(125, 60, 255, 0.12);
  --admin-bg: #f5f0ff;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-line: rgba(255, 255, 255, 0.82);
  --ink: #111827;
  --subtle: #6b7280;
}

body {
  background:
    radial-gradient(circle at 45% 0%, rgba(125, 60, 255, 0.09), transparent 34%),
    linear-gradient(135deg, #f7f2ff 0%, #eef3ff 100%);
}

.shell {
  grid-template-columns: 238px minmax(0, 1fr);
  background:
    radial-gradient(circle at 52% 10%, rgba(125, 60, 255, 0.08), transparent 34%),
    linear-gradient(135deg, #f7f2ff 0%, #eaf0ff 100%);
}

.sidebar {
  padding: 20px 10px 16px;
  background: rgba(255, 255, 255, 0.36);
  border-right: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
}

.brand {
  min-height: 58px;
  margin: 0 10px 34px;
  gap: 12px;
  color: #101827;
}

.brand::before,
.sidebar-footer .avatar-mini {
  width: 39px;
  height: 39px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--brand) 0%, #9a61ff 100%);
  box-shadow: 0 12px 24px rgba(125, 60, 255, 0.28);
}

.brand span {
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -0.01em;
}

.brand span::after {
  content: "Campus OA v1.0";
  color: #8a94a6;
  font-size: 11px;
  font-weight: 700;
}

.nav {
  gap: 8px;
}

.nav button {
  min-height: 44px;
  padding: 0 15px;
  border-radius: 0 12px 12px 0;
  color: #4b5563;
  font-size: 15px;
  font-weight: 750;
  background: transparent;
}

.nav button::before {
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: transparent;
  color: currentColor;
  font-size: 0;
  box-shadow: none;
}

.nav button[data-icon="总"]::before { content: "□"; font-size: 20px; }
.nav button[data-icon="意"]::before { content: "♙"; font-size: 20px; }
.nav button[data-icon="账"]::before { content: "⚭"; font-size: 19px; }
.nav button[data-icon="学"]::before { content: "▱"; font-size: 20px; }
.nav button[data-icon="课"]::before { content: "◫"; font-size: 20px; }

.nav button:hover:not(:disabled) {
  color: var(--brand);
  background: rgba(255, 255, 255, 0.42);
  border-color: transparent;
  box-shadow: none;
}

.nav button:hover:not(:disabled)::before,
.nav button.active::before {
  color: var(--brand);
  background: transparent;
}

.nav button.active {
  color: var(--brand);
  background: rgba(255, 255, 255, 0.56);
  border-color: transparent;
  box-shadow: inset 4px 0 0 var(--brand);
}

.sidebar-footer {
  left: 14px;
  right: 14px;
  bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 34px rgba(125, 60, 255, 0.08);
}

.sidebar-footer strong {
  color: #111827;
  font-size: 13px;
}

.sidebar-footer span {
  color: #6b7280;
  font-size: 11px;
}

.topbar {
  height: 66px;
  padding: 0 28px 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(18px);
  box-shadow: none;
}

.topbar strong {
  color: #4b5563;
  font-size: 13px;
  font-weight: 750;
}

.topbar strong span {
  display: none;
}

.topbar strong::before {
  width: 7px;
  height: 7px;
  background: #34d399;
  box-shadow: none;
}

.system-date {
  color: #5f6b7d;
  font-size: 14px;
}

.icon-btn,
#logoutBtn {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.34);
  color: #1f2937;
  backdrop-filter: blur(12px);
}

.content {
  height: calc(100vh - 66px);
  padding: 34px 32px 48px;
  gap: 26px;
  animation: fadeInUp 0.38s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-title {
  min-height: auto;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-title::before,
.page-title h2::after {
  display: none;
}

.page-title h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.025em;
}

.page-title p {
  color: #687386;
  font-size: 15px;
}

.title-actions button.primary,
.page-title button.primary {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, #9a61ff 100%);
  box-shadow: 0 10px 24px rgba(125, 60, 255, 0.25);
}

.title-actions button:not(.primary),
.page-title button:not(.primary) {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.title-actions input,
.toolbar input,
.toolbar select,
.page-title input {
  border: 0;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

.panel,
.card,
.stat-card,
.workbench-task,
.class-overview-card,
.modal {
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 48px rgba(109, 76, 214, 0.10);
}

.executive-kpis,
.stats-grid {
  gap: 24px;
}

.stat-card {
  min-height: 126px;
  padding: 26px 26px 24px;
}

.stat-card::before {
  top: 44px;
  right: 24px;
  width: 4px;
  height: 40px;
  border-radius: 999px;
  background: var(--brand);
}

.stat-card span {
  color: #687386;
  font-size: 13px;
  font-weight: 760;
}

.stat-card strong {
  margin-top: 10px;
  color: #111827;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 920;
  letter-spacing: -0.025em;
}

.stat-card small {
  margin-top: 12px;
  color: #8b95a5;
  font-size: 12px;
}

.stat-card.tone-warn strong { color: #f97316; }
.stat-card.tone-blue strong { color: #3b82f6; }
.stat-card.tone-ok strong { color: #16a34a; }
.stat-card.tone-purple strong { color: #111827; }
.stat-card.tone-warn::before { background: #f97316; }
.stat-card.tone-blue::before { background: #3b82f6; }
.stat-card.tone-ok::before { background: #22c55e; }

.placement-modal {
  width: min(820px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 244, 255, 0.90)),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 34px 90px rgba(60, 42, 110, 0.30);
}

.placement-head,
.placement-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
}

.placement-head {
  padding: 22px 24px 16px;
}

.placement-head h3 {
  margin: 4px 0 0;
  color: #121827;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 920;
}

.placement-head .eyebrow {
  color: var(--brand, #7d3cff);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.icon-close {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(125, 60, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 12px 26px rgba(76, 57, 138, 0.10);
}

.icon-close:hover {
  color: #111827;
  background: #fff;
  transform: translateY(-1px);
}

.placement-body {
  display: grid;
  gap: 18px;
  padding: 0 24px 20px;
}

.placement-student {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(125, 60, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.placement-student .avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7d3cff, #a78bfa);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(125, 60, 255, 0.25);
}

.placement-student strong {
  display: block;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.placement-student p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.65;
}

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

.placement-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.placement-card.target {
  border-color: rgba(125, 60, 255, 0.24);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(245, 240, 255, 0.76));
}

.placement-card .card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.placement-card .card-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand, #7d3cff);
}

.placement-card .field {
  display: grid;
  gap: 7px;
}

.placement-card .field label {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.placement-card input,
.placement-card select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.90);
  color: #111827;
  font-size: 15px;
  font-weight: 750;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.placement-card input:disabled {
  background: rgba(248, 250, 252, 0.82);
  color: #475569;
}

.placement-card select:focus {
  border-color: rgba(125, 60, 255, 0.68);
  box-shadow: 0 0 0 4px rgba(125, 60, 255, 0.12);
  outline: none;
}

.placement-actions {
  padding: 16px 24px 22px;
  justify-content: flex-end;
  gap: 12px;
}

.placement-actions button {
  min-width: 108px;
  min-height: 42px;
  border-radius: 14px;
  font-weight: 900;
}

.placement-actions .primary {
  background: linear-gradient(135deg, #7d3cff, #5b21d9);
  box-shadow: 0 18px 36px rgba(125, 60, 255, 0.28);
}

@media (max-width: 720px) {
  .placement-modal {
    width: calc(100vw - 24px);
  }

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

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

.dashboard-grid {
  gap: 26px;
}

.dashboard-grid > .panel:not(.dashboard-main-card),
.teaching-health,
.panel:has(.funnel-list),
.panel:has(.rank-list) {
  display: none;
}

.section-title {
  padding-left: 26px;
  font-size: 20px;
  font-weight: 950;
}

.section-title::before {
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 8px;
  height: 10px;
  border: 2px solid var(--brand);
  border-top-width: 3px;
  border-radius: 2px;
  transform: translateY(-50%);
}

.padded {
  padding: 0 0 18px;
}

.dashboard-main-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.todo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 0;
}

.todo-card {
  position: relative;
  min-height: 132px;
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  border-left-width: 4px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 48px rgba(109, 76, 214, 0.10);
}

.todo-card::before {
  content: "";
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(125, 60, 255, 0.10);
}

.todo-card span {
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.todo-card strong {
  position: absolute;
  top: 22px;
  right: 26px;
  font-size: 28px;
  font-weight: 920;
}

.todo-card em {
  margin-top: 8px;
  color: #8a94a6;
  font-size: 12px;
}

.todo-card.warn { border-left-color: #f59e0b; }
.todo-card.blue { border-left-color: #3b82f6; }
.todo-card.danger { border-left-color: #ef4444; }
.todo-card.ok { border-left-color: #22c55e; }

.todo-card:hover:not(:disabled),
.stat-card:hover,
.panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 60px rgba(109, 76, 214, 0.16);
}

.panel,
.stat-card,
.todo-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.toolbar {
  grid-template-columns: minmax(220px, 280px) minmax(120px, 150px) auto;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 0;
  background: transparent;
}

.toolbar button,
#searchBtn,
#formalSearchBtn,
#userSearchBtn {
  min-height: 36px;
  border-radius: 9px;
  border: 0;
  color: #fff;
  background: #111827;
}

table {
  background: transparent;
}

th {
  height: 54px;
  background: transparent;
  color: #697386;
  font-size: 12px;
}

td {
  height: 58px;
  border-bottom-color: rgba(226, 232, 240, 0.58);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.40);
}

.tag,
.status-pill {
  background: rgba(255, 255, 255, 0.58);
}

.tag.ok { color: #16a34a; background: rgba(34, 197, 94, 0.10); }
.tag.warn { color: #f97316; background: rgba(249, 115, 22, 0.10); }
.tag.fail { color: #ef4444; background: rgba(239, 68, 68, 0.10); }

@media (max-width: 1200px) {
  .executive-kpis,
  .stats-grid,
  .todo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final visual alignment pass for admin reference screens */
.brand span {
  max-width: 150px;
  word-break: keep-all;
}

.nav button::before {
  content: "" !important;
  width: 18px;
  height: 18px;
  border: 1.8px solid currentColor;
  border-radius: 5px;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.nav button[data-icon="意"]::before,
.nav button:nth-child(2)::before {
  border-radius: 50%;
}

.nav button[data-icon="账"]::before,
.nav button:nth-child(3)::before {
  border-radius: 7px 7px 3px 3px;
}

.nav button[data-icon="学"]::before,
.nav button:nth-child(4)::before {
  border-radius: 3px;
  transform: skewX(-12deg) !important;
}

.nav button[data-icon="课"]::before,
.nav button:nth-child(5)::before {
  border-radius: 2px;
  border-left-width: 4px;
}

.stats-grid,
.executive-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.section-title {
  min-height: 24px;
  padding-left: 34px !important;
  line-height: 24px;
}

.section-title::before {
  display: none !important;
}

.section-title::after {
  left: 4px !important;
  width: 18px !important;
  height: 18px !important;
  border: 0 !important;
  border-radius: 5px;
  background:
    linear-gradient(#7d3cff, #7d3cff) 5px 4px / 8px 2px no-repeat,
    linear-gradient(#7d3cff, #7d3cff) 5px 8px / 8px 2px no-repeat,
    linear-gradient(#7d3cff, #7d3cff) 5px 12px / 8px 2px no-repeat,
    rgba(125, 60, 255, 0.10);
}

.padded {
  padding: 0 0 18px 34px !important;
}

.todo-card {
  display: block !important;
  overflow: hidden;
}

.todo-card::before {
  content: "" !important;
  display: none !important;
}

.dashboard-main-card {
  display: grid;
  gap: 18px;
}

.dashboard-section-title {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: 0;
  padding: 0 0 0 34px !important;
  line-height: 1;
}

.dashboard-section-title::after {
  top: 50% !important;
  transform: translateY(-50%);
}

.todo-grid {
  margin-top: 0;
}

.todo-card .todo-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 10px;
}

.todo-card .todo-icon .ui-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.todo-card.warn .todo-icon { color: #f59e0b; background: #fff7dd; }
.todo-card.blue .todo-icon { color: #3b82f6; background: #eaf3ff; }
.todo-card.danger .todo-icon { color: #ef4444; background: #fff0f0; }
.todo-card.ok .todo-icon { color: #22c55e; background: #eafff1; }

.todo-card span {
  display: block;
  padding-right: 56px;
  line-height: 1.4;
  text-align: left;
}

.todo-card strong {
  top: 22px;
  right: 26px;
  line-height: 1;
}

.todo-card em {
  display: block;
  padding-right: 44px;
  line-height: 1.5;
  text-align: left;
}

.toolbar {
  grid-template-columns: minmax(220px, 280px) minmax(120px, 150px) 110px !important;
}

.toolbar.two {
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 210px) 110px !important;
}

.toolbar button,
#searchBtn,
#formalSearchBtn,
#userSearchBtn {
  width: 110px;
  justify-self: end;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(16px);
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  color: #111827;
  background: transparent;
  box-shadow: none;
}

.segmented button.active {
  color: var(--brand);
  background: #fff;
  box-shadow: 0 8px 18px rgba(125, 60, 255, 0.10);
}

@media (max-width: 1400px) {
  .stats-grid,
  .executive-kpis,
  .todo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Real SVG icon system, replacing temporary character icons */
.ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: currentColor;
}

.nav button {
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.nav button::before {
  display: none !important;
  content: none !important;
}

.nav button .ui-icon {
  width: 19px;
  height: 19px;
  color: currentColor;
  stroke-width: 2;
}

.nav button span {
  display: inline-flex;
  align-items: center;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  padding: 0;
}

.icon-btn .ui-icon {
  width: 18px;
  height: 18px;
}

#logoutBtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
}

#logoutBtn .ui-icon {
  width: 17px;
  height: 17px;
}

.completeness-badges.missing-only {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 180px;
}

.completeness-badges.missing-only .tag.warn {
  color: #f97316;
  background: rgba(249, 115, 22, 0.10);
}

.completeness-complete {
  font-weight: 900;
}

/* Table panels must remain scrollable after the glass card refresh. */
.content {
  overflow-y: auto !important;
  overflow-x: hidden;
}

.panel:has(> table),
.panel:has(> .toolbar + table),
.panel:has(> .wide-table),
.panel:has(> .mini-table),
.panel:has(> form > table) {
  max-height: min(720px, calc(100vh - 250px));
  overflow: auto !important;
  overscroll-behavior: contain;
}

.panel:has(> .toolbar + table) {
  display: flex;
  flex-direction: column;
}

.panel:has(> .toolbar + table) > .toolbar {
  flex: 0 0 auto;
}

.panel:has(> .toolbar + table) > table,
.panel:has(> table) > table,
.panel:has(> form > table) > form {
  min-width: 100%;
}

.wide-table,
.mini-table,
.timetable-wrap {
  max-height: min(680px, calc(100vh - 280px));
  overflow: auto !important;
  overscroll-behavior: contain;
}

thead th {
  position: static !important;
  top: auto !important;
  z-index: auto;
  backdrop-filter: none;
}

/* Compact AI analysis in intentional-student lists. */
.intentional-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 390px;
}

.intentional-actions button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.intentional-table {
  table-layout: fixed;
  min-width: 1180px;
}

.intentional-table th:nth-child(1),
.intentional-table td:nth-child(1) { width: 130px; }
.intentional-table th:nth-child(2),
.intentional-table td:nth-child(2) { width: 150px; }
.intentional-table th:nth-child(3),
.intentional-table td:nth-child(3) { width: 120px; }
.intentional-table th:nth-child(4),
.intentional-table td:nth-child(4) { width: 130px; }
.intentional-table th:nth-child(5),
.intentional-table td:nth-child(5) { width: 110px; }
.intentional-table th:nth-child(6),
.intentional-table td:nth-child(6) { width: 120px; }
.intentional-table th:nth-child(7),
.intentional-table td:nth-child(7) { width: 220px; }
.intentional-table th:nth-child(8),
.intentional-table td:nth-child(8) { width: 420px; }

.intentional-table td {
  vertical-align: middle;
}

.intentional-table td:nth-child(7) {
  overflow-wrap: anywhere;
}

.intentional-table .intentional-actions {
  width: 404px;
}

.intentional-table .intentional-actions button {
  width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.intentional-table .intentional-actions button[data-action="audio"] {
  width: 82px;
}

.intentional-table .intentional-actions button[data-action="depositProof"] {
  width: 82px;
}

.intentional-table .intentional-actions button[data-action="analyze"] {
  width: 76px;
}

.mini-link {
  display: block;
  width: max-content;
  margin-top: 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.compact-analysis-row td {
  padding: 10px 18px 18px !important;
  border-top: 1px solid rgba(125, 60, 255, 0.10);
  background: linear-gradient(180deg, rgba(245, 241, 255, 0.42), rgba(245, 241, 255, 0.66)) !important;
  text-align: left;
}

.ai-compact {
  padding: 14px 16px 12px;
  border-color: rgba(125, 60, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 36px rgba(109, 76, 214, 0.09);
}

.ai-compact-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
}

.ai-compact-head strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 950;
}

.ai-compact-head p,
.ai-compact-grid p {
  margin: 5px 0 0;
  color: #667085;
  line-height: 1.65;
  text-align: left;
}

.ai-compact-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ai-compact-tags span,
.intent-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #6d28d9;
  background: rgba(125, 60, 255, 0.10);
  font-size: 12px;
  font-weight: 850;
}

.intent-A { color: #dc2626; background: rgba(239, 68, 68, 0.10); }
.intent-B { color: #ea580c; background: rgba(249, 115, 22, 0.12); }
.intent-C { color: #2563eb; background: rgba(59, 130, 246, 0.11); }

.ai-compact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.ai-compact-grid section {
  min-height: 86px;
  padding: 12px 13px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.ai-compact-grid section.primary {
  border-color: rgba(125, 60, 255, 0.22);
  background: linear-gradient(135deg, rgba(125, 60, 255, 0.09), rgba(255, 255, 255, 0.78));
}

.ai-compact-grid h4 {
  margin: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 920;
  text-align: left;
}

.ai-detail-fold {
  margin-top: 12px;
  text-align: center;
}

.ai-detail-fold summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  color: #7d3cff;
  background: rgba(125, 60, 255, 0.08);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  list-style: none;
}

.ai-detail-fold summary::-webkit-details-marker {
  display: none;
}

.ai-detail-fold[open] summary {
  margin-bottom: 10px;
}

.ai-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}

@media (max-width: 1200px) {
  .ai-compact-head,
  .ai-compact-grid,
  .ai-detail-grid {
    grid-template-columns: 1fr;
  }

  .ai-compact-tags {
    justify-content: flex-start;
  }
}

/* Teacher workbench cards are dashboard modules, not scroll tables. */
.workbench-hero,
.workbench-columns > .panel,
.reminder-panel,
.teacher-class-panel {
  max-height: none !important;
  overflow: visible !important;
}

.workbench-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  align-items: stretch;
  gap: 18px;
  min-height: 156px;
  padding: 22px;
}

.workbench-hero > div:first-child {
  display: grid;
  align-content: center;
  min-width: 0;
}

.workbench-kpis {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.workbench-kpis span,
.reminder-grid span {
  min-height: 78px;
  align-content: center;
}

.reminder-panel {
  display: grid;
  gap: 14px;
  min-height: 132px;
  padding: 18px 20px;
}

.reminder-head {
  margin-bottom: 0;
}

.reminder-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.workbench-columns {
  align-items: stretch;
}

.workbench-list {
  min-height: 154px;
}

.workbench-list ul {
  min-height: 76px;
}

@media (max-width: 1200px) {
  .workbench-hero {
    grid-template-columns: 1fr;
  }

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

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

/* Class-master workspace redesign */
.teacher-shell {
  --teacher-brand: #7d3cff;
  --teacher-soft: rgba(125, 60, 255, 0.10);
  --teacher-line: rgba(125, 60, 255, 0.16);
  --teacher-green: #16a34a;
  --teacher-amber: #f59e0b;
  --teacher-red: #ef4444;
}

.teacher-shell .sidebar {
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid rgba(125, 60, 255, 0.10);
  backdrop-filter: blur(18px);
}

.teacher-shell .brand::before {
  background: linear-gradient(145deg, #7d3cff 0%, #a855f7 100%);
  box-shadow: 0 14px 28px rgba(125, 60, 255, 0.24);
}

.teacher-shell .nav button.active {
  color: var(--teacher-brand);
  background: linear-gradient(90deg, rgba(125, 60, 255, 0.13), rgba(255, 255, 255, 0.78));
  border-color: rgba(125, 60, 255, 0.18);
  box-shadow: inset 3px 0 0 var(--teacher-brand), 0 10px 24px rgba(125, 60, 255, 0.08);
}

.teacher-shell .content {
  gap: 22px;
  padding: 30px 34px 42px;
  background:
    linear-gradient(180deg, rgba(245, 241, 255, 0.82) 0%, rgba(248, 250, 252, 0.96) 42%, #f8fafc 100%);
}

.teacher-shell .topbar {
  border-bottom: 1px solid rgba(125, 60, 255, 0.08);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
}

.teacher-shell .page-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 0 2px 2px;
}

.teacher-shell .page-title h2 {
  margin: 0;
  color: #101828;
  font-size: 30px;
  letter-spacing: 0;
}

.teacher-shell .page-title .title-actions {
  display: flex;
  justify-content: flex-end;
}

.teacher-shell .page-title input,
.teacher-shell .page-title button {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(125, 60, 255, 0.14);
  background: rgba(255, 255, 255, 0.84);
}

.teacher-shell .panel,
.teacher-shell .stat-card,
.teacher-shell .workbench-task,
.teacher-shell .class-overview-card {
  border-color: rgba(125, 60, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(79, 70, 229, 0.08);
}

.teacher-shell .workbench-hero {
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  min-height: 174px;
  padding: 24px;
  border: 1px solid rgba(125, 60, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(125, 60, 255, 0.13), rgba(255, 255, 255, 0.86) 54%, rgba(20, 184, 166, 0.08));
}

.teacher-shell .workbench-hero span {
  color: #6941c6;
  font-size: 13px;
  font-weight: 900;
}

.teacher-shell .workbench-hero h3 {
  margin: 8px 0 6px;
  color: #101828;
  font-size: 28px;
  line-height: 1.18;
}

.teacher-shell .workbench-hero p {
  max-width: 620px;
  color: #667085;
  line-height: 1.65;
}

.teacher-shell .workbench-kpis {
  gap: 12px;
}

.teacher-shell .workbench-kpis span {
  min-height: 104px;
  padding: 16px;
  border: 1px solid rgba(125, 60, 255, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.teacher-shell .workbench-kpis b {
  color: #101828;
  font-size: 28px;
}

.teacher-shell .workbench-kpis small {
  color: #667085;
  font-weight: 800;
}

.teacher-shell .workbench-task-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.teacher-shell .workbench-task {
  min-height: 102px;
  padding: 18px;
  border-left: 4px solid var(--teacher-green);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.teacher-shell .workbench-task:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(79, 70, 229, 0.13);
}

.teacher-shell .workbench-task span {
  color: #475467;
  font-weight: 900;
}

.teacher-shell .workbench-task strong {
  color: #101828;
  font-size: 32px;
}

.teacher-shell .workbench-task.warn {
  border-left-color: var(--teacher-amber);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 251, 235, 0.92));
}

.teacher-shell .workbench-task.danger {
  border-left-color: var(--teacher-red);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(254, 242, 242, 0.94));
}

.teacher-shell .workbench-columns {
  grid-template-columns: minmax(340px, 1.15fr) minmax(280px, 0.9fr) minmax(280px, 0.9fr);
  gap: 16px;
}

.teacher-shell .workbench-list {
  min-height: 188px;
  overflow: visible !important;
}

.teacher-shell .workbench-list .section-title {
  min-height: 48px;
  padding: 18px 20px 10px 48px !important;
  font-size: 17px;
}

.teacher-shell .workbench-list .section-title::after {
  left: 20px !important;
}

.teacher-shell .workbench-list ul {
  display: grid;
  gap: 8px;
  padding: 4px 18px 18px;
}

.teacher-shell .workbench-list li {
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.74);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.teacher-shell .workbench-list li strong {
  color: #101828;
}

.teacher-shell .workbench-list li span,
.teacher-shell .workbench-list li em {
  color: #667085;
  line-height: 1.45;
}

.teacher-shell .reminder-panel {
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1fr);
  align-items: center;
  min-height: 150px;
  padding: 20px;
  border-left: 4px solid var(--teacher-brand);
  background:
    linear-gradient(135deg, rgba(125, 60, 255, 0.10), rgba(255, 255, 255, 0.88));
}

.teacher-shell .reminder-panel.urgent {
  border-left-color: var(--teacher-red);
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.10), rgba(255, 255, 255, 0.9));
}

.teacher-shell .reminder-head {
  display: grid;
  gap: 12px;
}

.teacher-shell .reminder-head strong {
  color: #101828;
  font-size: 18px;
}

.teacher-shell .reminder-head button {
  width: fit-content;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--teacher-brand), #9a61ff);
  box-shadow: 0 12px 24px rgba(125, 60, 255, 0.20);
}

.teacher-shell .reminder-grid {
  gap: 12px;
}

.teacher-shell .reminder-grid span {
  min-height: 92px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.teacher-shell .reminder-grid b {
  color: #101828;
  font-size: 30px;
}

.teacher-shell .teacher-class-panel {
  padding-bottom: 18px;
}

.teacher-shell .class-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  padding: 0 18px;
}

.teacher-shell .class-overview-card {
  display: grid;
  gap: 12px;
  min-height: 156px;
  padding: 18px;
  text-align: left;
  border: 1px solid rgba(125, 60, 255, 0.12);
}

.teacher-shell .class-overview-card.active {
  border-color: rgba(125, 60, 255, 0.36);
  background: linear-gradient(135deg, rgba(125, 60, 255, 0.10), rgba(255, 255, 255, 0.88));
  box-shadow: 0 22px 48px rgba(125, 60, 255, 0.14);
}

.teacher-shell .class-overview-card strong {
  color: #101828;
  font-size: 17px;
}

.teacher-shell .class-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}

.teacher-shell .class-metrics b,
.teacher-shell .class-metrics small {
  text-align: center;
}

.teacher-shell .class-metrics b {
  padding-top: 8px;
  border-top: 1px solid rgba(226, 232, 240, 0.72);
  color: #101828;
  font-size: 20px;
}

.teacher-shell .class-metrics small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.teacher-shell .teacher-class-panel + .panel,
.teacher-shell .panel:has(.reminder-grid.compact),
.teacher-shell .panel:has(#teacherExamInput) {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.teacher-shell .filter-tabs {
  padding: 0 18px 16px;
}

.teacher-shell .filter-tabs button {
  min-height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.teacher-shell .filter-tabs button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teacher-brand), #9a61ff);
  box-shadow: 0 10px 22px rgba(125, 60, 255, 0.18);
}

.teacher-shell table th {
  color: #667085;
  background: rgba(248, 250, 252, 0.78);
}

.teacher-shell table td {
  background: rgba(255, 255, 255, 0.58);
}

.teacher-shell .stats-grid .stat-card {
  min-height: 118px;
}

@media (max-width: 1400px) {
  .teacher-shell .workbench-task-grid,
  .teacher-shell .workbench-kpis,
  .teacher-shell .reminder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-shell .workbench-hero,
  .teacher-shell .reminder-panel,
  .teacher-shell .workbench-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .teacher-shell .content {
    padding: 18px;
  }

  .teacher-shell .page-title,
  .teacher-shell .workbench-task-grid,
  .teacher-shell .workbench-kpis,
  .teacher-shell .reminder-grid {
    grid-template-columns: 1fr;
  }
}

/* Reference-matched class-master overview */
.teacher-shell .content {
  background:
    radial-gradient(circle at 84% 0%, rgba(125, 60, 255, 0.10), transparent 28%),
    linear-gradient(135deg, #fbfaff 0%, #f4efff 42%, #fbfbff 100%);
}

.teacher-shell .page-title p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 14px;
}

.teacher-shell .workbench-hero,
.teacher-shell .workbench-task,
.teacher-shell .teacher-focus-panel {
  animation: fadeInUp 0.42s ease both;
}

.teacher-shell .workbench-task-grid .workbench-task:nth-child(2) { animation-delay: 0.04s; }
.teacher-shell .workbench-task-grid .workbench-task:nth-child(3) { animation-delay: 0.08s; }
.teacher-shell .workbench-task-grid .workbench-task:nth-child(4) { animation-delay: 0.12s; }

.teacher-shell .workbench-hero {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.6fr);
  min-height: 186px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 28px 70px rgba(125, 60, 255, 0.10);
}

.teacher-shell .workbench-hero > div:first-child {
  padding-right: 34px;
  border-right: 1px solid rgba(226, 232, 240, 0.78);
}

.teacher-shell .workbench-hero span:first-child {
  color: #7d3cff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.teacher-shell .workbench-hero h3 {
  font-size: 34px;
  font-weight: 950;
}

.teacher-shell .workbench-kpis span {
  min-height: 102px;
  border-width: 1px;
  border-left-width: 5px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: none;
}

.teacher-shell .workbench-kpis span:nth-child(1) { border-color: rgba(59, 130, 246, 0.24); border-left-color: #60a5fa; }
.teacher-shell .workbench-kpis span:nth-child(2) { border-color: rgba(16, 185, 129, 0.24); border-left-color: #34d399; }
.teacher-shell .workbench-kpis span:nth-child(3) { border-color: rgba(245, 158, 11, 0.26); border-left-color: #f59e0b; }
.teacher-shell .workbench-kpis span:nth-child(4) { border-color: rgba(125, 60, 255, 0.24); border-left-color: #7d3cff; }

.teacher-shell .workbench-kpis b {
  color: #1f2937;
  font-size: 30px;
}

.teacher-shell .workbench-kpis span:nth-child(1) b { color: #2563eb; }
.teacher-shell .workbench-kpis span:nth-child(2) b { color: #059669; }
.teacher-shell .workbench-kpis span:nth-child(3) b { color: #d97706; }
.teacher-shell .workbench-kpis span:nth-child(4) b { color: #7d3cff; }

.teacher-shell .workbench-task-grid {
  gap: 20px;
}

.teacher-shell .workbench-task {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon badge badge"
    "label label label"
    "value note note";
  gap: 8px 12px;
  min-height: 144px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.72);
  border-left: 4px solid #10b981;
  border-radius: 18px;
  background: rgba(255,255,255,0.62);
}

.teacher-shell .workbench-task i {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.teacher-shell .workbench-task i .ui-icon {
  width: 17px;
  height: 17px;
}

.teacher-shell .workbench-task em {
  grid-area: badge;
  justify-self: end;
  align-self: start;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.teacher-shell .workbench-task span {
  grid-area: label;
  color: #8a94a6;
  font-size: 13px;
}

.teacher-shell .workbench-task strong {
  grid-area: value;
  line-height: 1;
}

.teacher-shell .workbench-task small {
  grid-area: note;
  align-self: end;
  color: #98a2b3;
  font-weight: 850;
}

.teacher-shell .workbench-task.red {
  border-left-color: #ef4444;
}

.teacher-shell .workbench-task.red i,
.teacher-shell .workbench-task.red em {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.10);
}

.teacher-shell .workbench-task.amber {
  border-left-color: #f59e0b;
}

.teacher-shell .workbench-task.amber i,
.teacher-shell .workbench-task.amber em {
  color: #d97706;
  background: rgba(245, 158, 11, 0.12);
}

.teacher-shell .teacher-focus-panel {
  position: relative;
  padding: 34px;
  border: 1px solid rgba(255,255,255,0.78);
  border-left: 5px solid #10b981;
  border-radius: 22px;
  background: rgba(255,255,255,0.66);
  box-shadow: 0 24px 70px rgba(125, 60, 255, 0.09);
}

.teacher-shell .teacher-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.teacher-shell .teacher-panel-head strong {
  position: relative;
  padding-left: 22px;
  color: #101828;
  font-size: 20px;
  font-weight: 950;
}

.teacher-shell .teacher-panel-head strong::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 8px;
  height: 24px;
  border-radius: 999px;
  background: #10b981;
}

.teacher-shell .teacher-panel-head button,
.teacher-shell .teacher-panel-head span {
  border: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: 999px;
  padding: 8px 13px;
  color: #98a2b3;
  background: rgba(255,255,255,0.58);
  font-size: 12px;
  font-weight: 900;
}

.teacher-shell .teacher-empty-state {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 280px;
  gap: 14px;
  text-align: center;
}

.teacher-shell .teacher-empty-state.slim {
  min-height: 164px;
}

.teacher-shell .teacher-empty-state i {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.10);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.18);
}

.teacher-shell .teacher-empty-state i .ui-icon {
  width: 40px;
  height: 40px;
}

.teacher-shell .teacher-empty-state strong {
  color: #1f2937;
  font-size: 18px;
}

.teacher-shell .teacher-empty-state span {
  color: #98a2b3;
}

.teacher-shell .teacher-empty-state button,
.teacher-shell .teacher-link-button,
.teacher-shell .teacher-leave-item button,
.teacher-shell .teacher-follow-card button,
.teacher-shell .teacher-mini-table button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #7d3cff, #9a61ff);
  box-shadow: 0 12px 24px rgba(125, 60, 255, 0.18);
  font-weight: 900;
}

.teacher-shell .teacher-follow-focus {
  border-left-color: #ef4444;
}

.teacher-shell .teacher-follow-focus .teacher-panel-head strong::before {
  background: #ef4444;
}

.teacher-shell .teacher-follow-focus .teacher-panel-head span {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(239, 68, 68, 0.08);
}

.teacher-shell .teacher-grade-focus {
  border-left-color: #f59e0b;
}

.teacher-shell .teacher-grade-focus .teacher-panel-head strong::before {
  background: #f59e0b;
}

.teacher-shell .teacher-grade-focus .teacher-panel-head span {
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.18);
  background: rgba(245, 158, 11, 0.10);
}

.teacher-shell .teacher-leave-item,
.teacher-shell .teacher-follow-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  min-height: 100px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
}

.teacher-shell .teacher-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  color: #7d3cff;
  background: rgba(125, 60, 255, 0.10);
  font-size: 22px;
  font-weight: 950;
}

.teacher-shell .teacher-avatar.danger {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.10);
}

.teacher-shell .teacher-leave-item strong,
.teacher-shell .teacher-follow-card strong {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #101828;
  font-size: 17px;
}

.teacher-shell .teacher-follow-card small,
.teacher-shell .teacher-chip {
  padding: 4px 9px;
  border-radius: 999px;
  color: #667085;
  background: #f2f4f7;
  font-size: 12px;
}

.teacher-shell .teacher-leave-item span,
.teacher-shell .teacher-follow-card span,
.teacher-shell .teacher-leave-item em,
.teacher-shell .teacher-follow-card em {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-style: normal;
}

.teacher-shell .teacher-mini-table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.teacher-shell .teacher-mini-table th,
.teacher-shell .teacher-mini-table td {
  height: 66px;
  background: transparent;
}

.teacher-shell .teacher-mini-table button {
  min-width: 112px;
}

.teacher-shell .teacher-link-button {
  display: block;
  margin: 24px auto 0;
  color: #7d3cff;
  background: transparent;
  box-shadow: none;
}

.teacher-shell .workbench-columns,
.teacher-shell .reminder-panel {
  display: none !important;
}

/* Hard alignment pass for the reference screenshots. */
.teacher-shell .teacher-focus-panel,
.teacher-shell .teacher-focus-panel:has(> table),
.teacher-shell .teacher-focus-panel:has(.teacher-mini-table) {
  display: block !important;
  width: 100%;
  max-height: none !important;
  overflow: visible !important;
  padding: 34px !important;
}

.teacher-shell .teacher-leave-focus {
  min-height: 410px !important;
}

.teacher-shell .teacher-follow-focus,
.teacher-shell .teacher-grade-focus {
  min-height: 260px !important;
}

.teacher-shell .teacher-focus-panel > :not(.teacher-panel-head) {
  visibility: visible !important;
  opacity: 1 !important;
}

.teacher-shell .teacher-empty-state {
  min-height: 300px !important;
}

.teacher-shell .teacher-empty-state.slim {
  min-height: 150px !important;
}

.teacher-shell .teacher-grade-focus .teacher-mini-table {
  display: table !important;
  width: 100%;
  max-height: none !important;
  overflow: visible !important;
}

.teacher-shell .teacher-grade-focus table,
.teacher-shell .teacher-grade-focus thead,
.teacher-shell .teacher-grade-focus tbody,
.teacher-shell .teacher-grade-focus tr {
  max-height: none !important;
  overflow: visible !important;
}

.teacher-shell .teacher-focus-panel + .teacher-focus-panel {
  margin-top: 0;
}

.teacher-shell .teacher-class-panel {
  margin-top: 2px;
}

/* Premium polish pass: closer to the provided visual reference. */
.teacher-shell .sidebar {
  width: 256px;
  padding: 28px 16px 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 18px 0 60px rgba(125, 60, 255, 0.06);
}

.teacher-shell .brand {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 8px;
}

.teacher-shell .brand::before {
  content: "系";
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(145deg, #7d3cff, #8b5cf6);
  box-shadow: 0 14px 28px rgba(125, 60, 255, 0.26);
}

.teacher-shell .brand span {
  max-width: none;
  color: #111827;
  font-size: 16px;
  line-height: 1.1;
}

.teacher-shell .nav {
  gap: 12px;
  margin-top: 44px;
}

.teacher-shell .nav button {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #5f6b7d;
  font-size: 15px;
  font-weight: 850;
}

.teacher-shell .nav button .ui-icon {
  width: 20px;
  height: 20px;
}

.teacher-shell .nav button.active {
  color: #7d3cff;
  background: rgba(125, 60, 255, 0.10);
  border-color: rgba(125, 60, 255, 0.16);
  box-shadow: inset 4px 0 0 #7d3cff;
}

.teacher-shell .sidebar-footer {
  min-height: 72px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 42px rgba(125, 60, 255, 0.08);
}

.teacher-shell .avatar-mini {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(145deg, #7d3cff, #8b5cf6);
}

.teacher-shell .main {
  background:
    radial-gradient(circle at 88% -8%, rgba(125, 60, 255, 0.16), transparent 28%),
    linear-gradient(135deg, #fbfaff 0%, #f5f0ff 44%, #ffffff 100%);
}

.teacher-shell .content {
  padding: 34px 34px 56px;
  gap: 24px;
  background: transparent;
}

.teacher-shell .topbar {
  height: 66px;
  background: rgba(255, 255, 255, 0.70);
}

.teacher-shell .topbar > strong {
  color: #475467;
}

.teacher-shell .icon-btn,
.teacher-shell #logoutBtn {
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.teacher-shell .page-title {
  margin-bottom: 4px;
}

.teacher-shell .page-title h2 {
  font-size: 30px;
  font-weight: 950;
}

.teacher-shell .page-title p {
  color: #667085;
  font-weight: 650;
}

.teacher-shell .workbench-hero,
.teacher-shell .workbench-task,
.teacher-shell .teacher-focus-panel,
.teacher-shell .teacher-class-panel,
.teacher-shell .teacher-class-panel + .panel {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(24px);
  box-shadow: 0 26px 70px rgba(125, 60, 255, 0.09);
}

.teacher-shell .workbench-hero {
  min-height: 184px;
  padding: 34px 36px;
  border-radius: 22px;
}

.teacher-shell .workbench-hero h3 {
  letter-spacing: 0;
}

.teacher-shell .workbench-kpis span {
  align-content: center;
  min-height: 106px;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
}

.teacher-shell .workbench-task-grid {
  gap: 22px;
}

.teacher-shell .workbench-task {
  min-height: 146px;
  padding: 22px 24px;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(125, 60, 255, 0.08);
}

.teacher-shell .workbench-task:hover,
.teacher-shell .teacher-focus-panel:hover,
.teacher-shell .class-overview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 34px 76px rgba(125, 60, 255, 0.13);
}

.teacher-shell .teacher-focus-panel {
  padding: 38px 36px !important;
  border-radius: 22px;
  box-shadow: 0 28px 74px rgba(125, 60, 255, 0.10);
}

.teacher-shell .teacher-leave-focus {
  min-height: 430px !important;
}

.teacher-shell .teacher-panel-head {
  margin-bottom: 26px;
}

.teacher-shell .teacher-panel-head strong {
  font-size: 21px;
  letter-spacing: 0;
}

.teacher-shell .teacher-panel-head strong::before {
  width: 8px;
  height: 26px;
  top: 2px;
}

.teacher-shell .teacher-empty-state {
  min-height: 310px !important;
}

.teacher-shell .teacher-empty-state i {
  width: 84px;
  height: 84px;
  background: rgba(16, 185, 129, 0.09);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.18), 0 22px 50px rgba(16, 185, 129, 0.08);
}

.teacher-shell .teacher-empty-state strong {
  margin-top: 8px;
  font-size: 19px;
}

.teacher-shell .teacher-empty-state button {
  margin-top: 6px;
  padding: 0 18px;
  color: #667085;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.teacher-shell .teacher-follow-card {
  min-height: 102px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.04);
}

.teacher-shell .teacher-follow-card button,
.teacher-shell .teacher-mini-table button {
  padding: 0 18px;
  box-shadow: 0 14px 30px rgba(125, 60, 255, 0.20);
}

.teacher-shell .teacher-link-button {
  margin-top: 28px;
  min-height: 32px;
  color: #7d3cff;
  font-size: 15px;
}

.teacher-shell .teacher-grade-focus {
  padding-bottom: 26px !important;
}

.teacher-shell .teacher-mini-table {
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
}

.teacher-shell .teacher-mini-table th {
  height: 54px;
  color: #98a2b3;
  font-size: 12px;
  background: transparent;
}

.teacher-shell .teacher-mini-table td {
  height: 72px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.62);
  background: rgba(255, 255, 255, 0.38);
}

.teacher-shell .teacher-mini-table tr:last-child td {
  border-bottom: 0;
}

.teacher-shell .teacher-class-panel {
  padding: 22px 18px 24px;
  border-radius: 22px;
  overflow: visible !important;
}

.teacher-shell .teacher-class-panel .section-title {
  min-height: 36px;
  margin-bottom: 14px;
  padding: 0 0 0 36px !important;
  font-size: 20px;
}

.teacher-shell .teacher-class-panel .section-title::after {
  left: 4px !important;
  top: 50% !important;
}

.teacher-shell .class-overview-grid {
  padding: 0;
  gap: 16px;
}

.teacher-shell .class-overview-card {
  min-height: 176px;
  padding: 22px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(125, 60, 255, 0.08), rgba(255, 255, 255, 0.72));
  box-shadow: 0 22px 54px rgba(125, 60, 255, 0.09);
}

.teacher-shell .class-overview-card > span {
  color: #667085;
  font-weight: 800;
}

.teacher-shell .class-metrics {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(226, 232, 240, 0.70);
}

.teacher-shell .teacher-class-panel + .panel {
  border-radius: 22px;
  overflow: hidden !important;
}

.teacher-shell .teacher-class-panel + .panel .section-title {
  padding: 18px 22px 12px 48px !important;
}

/* Teacher secondary pages: intention, grades and leave approval */
.teacher-shell .teacher-reference-title {
  min-height: 72px;
  margin: 0;
  align-items: center;
}

.teacher-shell .teacher-reference-title h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

.teacher-shell .teacher-reference-title p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  font-weight: 650;
}

.teacher-shell .teacher-page-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.teacher-shell .teacher-page-kpi {
  position: relative;
  min-height: 132px;
  padding: 24px 28px 22px 34px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(24px);
  box-shadow: 0 26px 70px rgba(125, 60, 255, 0.10);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.teacher-shell .teacher-page-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 34px 82px rgba(125, 60, 255, 0.14);
}

.teacher-shell .teacher-page-kpi::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 26px;
  bottom: 26px;
  width: 5px;
  border-radius: 999px;
  background: #7d3cff;
}

.teacher-shell .teacher-page-kpi span,
.teacher-shell .teacher-page-kpi strong,
.teacher-shell .teacher-page-kpi small {
  display: block;
  margin-left: 18px;
}

.teacher-shell .teacher-page-kpi span {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.teacher-shell .teacher-page-kpi strong {
  margin-top: 8px;
  color: #111827;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.teacher-shell .teacher-page-kpi small {
  margin-top: 10px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 750;
}

.teacher-shell .teacher-page-kpi.purple::before { background: #7d3cff; }
.teacher-shell .teacher-page-kpi.amber::before { background: #fb923c; }
.teacher-shell .teacher-page-kpi.green::before { background: #34d399; }
.teacher-shell .teacher-page-kpi.blue::before { background: #60a5fa; }
.teacher-shell .teacher-page-kpi.red::before { background: #fb7185; }
.teacher-shell .teacher-page-kpi.purple strong { color: #7d3cff; }
.teacher-shell .teacher-page-kpi.amber strong { color: #f97316; }
.teacher-shell .teacher-page-kpi.green strong { color: #10b981; }
.teacher-shell .teacher-page-kpi.blue strong { color: #3b82f6; }
.teacher-shell .teacher-page-kpi.red strong { color: #ef4444; }

.teacher-shell .teacher-tool-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 64px rgba(125, 60, 255, 0.09);
}

.teacher-shell .teacher-tool-panel input,
.teacher-shell .teacher-tool-panel select {
  height: 44px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  font-weight: 650;
  box-shadow: none;
}

.teacher-shell .teacher-tool-panel input {
  flex: 1;
  min-width: 280px;
}

.teacher-shell .teacher-tool-panel select {
  min-width: 160px;
}

.teacher-shell .teacher-tool-panel button {
  height: 44px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 850;
}

.teacher-shell .teacher-tool-panel .primary,
.teacher-shell .teacher-grade-card button,
.teacher-shell .teacher-leave-actions button:not(:disabled),
.teacher-shell .teacher-intent-list .intentional-actions button:not(:disabled) {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #7d3cff, #9b5cff);
  box-shadow: 0 18px 34px rgba(125, 60, 255, 0.23);
}

.teacher-shell .teacher-leave-tabs {
  justify-content: flex-start;
}

.teacher-shell .teacher-leave-tabs button {
  color: #475467;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.teacher-shell .teacher-leave-tabs button.active {
  color: #7d3cff;
  border-color: rgba(125, 60, 255, 0.42);
  background: rgba(125, 60, 255, 0.10);
}

.teacher-shell .teacher-leave-tabs #refreshTeacherLeavesBtn {
  margin-left: auto;
}

.teacher-shell .teacher-grade-list,
.teacher-shell .teacher-leave-cards,
.teacher-shell .teacher-intent-list,
.teacher-shell .teacher-score-panel {
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(24px);
  box-shadow: 0 28px 74px rgba(125, 60, 255, 0.10);
  overflow: hidden;
}

.teacher-shell .teacher-grade-list,
.teacher-shell .teacher-leave-cards {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.teacher-shell .teacher-grade-card,
.teacher-shell .teacher-leave-row {
  display: grid;
  align-items: center;
  gap: 18px;
  min-height: 96px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.035);
}

.teacher-shell .teacher-grade-card {
  grid-template-columns: 56px 1fr auto auto;
  border-left: 5px solid #34d399;
}

.teacher-shell .teacher-grade-card.is-pending {
  border-left-color: #fb923c;
}

.teacher-shell .teacher-grade-card.active {
  box-shadow: inset 0 0 0 1px rgba(125, 60, 255, 0.20), 0 22px 54px rgba(125, 60, 255, 0.10);
}

.teacher-shell .teacher-record-icon,
.teacher-shell .teacher-record-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #7d3cff;
  background: rgba(125, 60, 255, 0.09);
}

.teacher-shell .teacher-record-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.teacher-shell .teacher-grade-main strong,
.teacher-shell .teacher-leave-main strong {
  color: #111827;
  font-size: 16px;
  font-weight: 950;
}

.teacher-shell .teacher-grade-main span,
.teacher-shell .teacher-leave-main p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 650;
}

.teacher-shell .teacher-leave-main .ui-icon {
  width: 14px;
  height: 14px;
}

.teacher-shell .teacher-leave-row {
  grid-template-columns: 56px 1fr auto;
  border-left: 5px solid #34d399;
}

.teacher-shell .teacher-leave-row.red {
  border-left-color: #fb7185;
}

.teacher-shell .teacher-leave-row.amber {
  border-left-color: #fb923c;
}

.teacher-shell .teacher-leave-actions {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.teacher-shell .teacher-leave-actions > div {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.teacher-shell .teacher-leave-actions button,
.teacher-shell .teacher-grade-card button {
  min-width: 78px;
  height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 850;
}

.teacher-shell .teacher-leave-actions button:disabled {
  display: none;
}

.teacher-shell .teacher-soft-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.teacher-shell .teacher-soft-badge.green { color: #059669; background: rgba(52, 211, 153, 0.14); }
.teacher-shell .teacher-soft-badge.amber { color: #f97316; background: rgba(251, 146, 60, 0.14); }
.teacher-shell .teacher-soft-badge.blue { color: #2563eb; background: rgba(96, 165, 250, 0.14); }
.teacher-shell .teacher-soft-badge.red { color: #f43f5e; background: rgba(251, 113, 133, 0.14); }

.teacher-shell .teacher-list-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  color: #98a2b3;
  text-align: center;
  font-weight: 750;
}

.teacher-shell .teacher-list-empty b {
  color: #344054;
  font-size: 18px;
}

.teacher-shell .teacher-list-empty span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
}

.teacher-shell .teacher-score-panel {
  padding: 24px;
}

.teacher-shell .teacher-score-panel .teacher-panel-head {
  margin-bottom: 18px;
}

.teacher-shell .teacher-intent-toolbar input {
  flex: 1;
}

.teacher-shell .teacher-intent-list {
  max-height: 560px;
  overflow: auto;
}

.teacher-shell .teacher-intent-list table,
.teacher-shell .teacher-score-panel table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.teacher-shell .teacher-intent-list th,
.teacher-shell .teacher-score-panel th {
  height: 54px;
  padding: 0 18px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.34);
}

.teacher-shell .teacher-intent-list td,
.teacher-shell .teacher-score-panel td {
  min-height: 70px;
  padding: 16px 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.72);
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.44);
}

.teacher-shell .teacher-intent-list tr:hover td {
  background: rgba(125, 60, 255, 0.045);
}

.teacher-shell .teacher-intent-list .intentional-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
}

.teacher-shell .teacher-intent-list .intentional-actions button {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.teacher-shell .teacher-list-footer {
  padding: 18px 22px;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 750;
  border-top: 1px solid rgba(226, 232, 240, 0.72);
}

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

  .teacher-shell .teacher-grade-card,
  .teacher-shell .teacher-leave-row {
    grid-template-columns: 52px 1fr;
  }

  .teacher-shell .teacher-grade-card button,
  .teacher-shell .teacher-grade-card .teacher-soft-badge,
  .teacher-shell .teacher-leave-actions {
    grid-column: 2;
    justify-self: start;
  }
}

/* Teacher product-grade refinement pass */
.teacher-shell {
  color: #101828;
  background: #f7f3ff;
}

.teacher-shell .sidebar {
  width: 258px;
  padding: 28px 18px 20px;
  border-right: 1px solid rgba(125, 60, 255, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(250,247,255,0.74));
  backdrop-filter: blur(26px);
  box-shadow: 18px 0 60px rgba(125, 60, 255, 0.055);
}

.teacher-shell .brand {
  min-height: 48px;
  gap: 12px;
  align-items: center;
}

.teacher-shell .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, #7d3cff 0%, #8b5cf6 58%, #b794ff 100%);
  box-shadow: 0 14px 30px rgba(125, 60, 255, 0.28);
}

.teacher-shell .brand-text strong {
  color: #111827;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 950;
}

.teacher-shell .brand-text span {
  margin-top: 2px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 750;
}

.teacher-shell .nav {
  gap: 10px;
  margin-top: 46px;
}

.teacher-shell .nav button {
  position: relative;
  min-height: 48px;
  padding: 0 14px 0 16px;
  border-radius: 13px;
  color: #5b6475;
  background: transparent;
  box-shadow: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.teacher-shell .nav button:hover {
  color: #7d3cff;
  background: rgba(125, 60, 255, 0.055);
  transform: translateX(2px);
}

.teacher-shell .nav button.active {
  color: #7d3cff;
  border-color: rgba(125, 60, 255, 0.10);
  background: linear-gradient(90deg, rgba(125, 60, 255, 0.13), rgba(255, 255, 255, 0.58));
  box-shadow: none;
}

.teacher-shell .nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: #7d3cff;
}

.teacher-shell .nav button .ui-icon {
  width: 19px;
  height: 19px;
  stroke-width: 2.15;
}

.teacher-shell .sidebar-footer {
  margin-top: auto;
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.045);
}

.teacher-shell .main {
  background:
    linear-gradient(135deg, rgba(125, 60, 255, 0.055), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #fbfaff 0%, #f6f1ff 46%, #ffffff 100%);
}

.teacher-shell .topbar {
  height: 66px;
  padding: 0 34px;
  border-bottom: 1px solid rgba(125, 60, 255, 0.08);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px);
  box-shadow: none;
}

.teacher-shell .topbar > strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 850;
}

.teacher-shell .topbar > strong::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.teacher-shell .topbar-actions {
  gap: 12px;
}

.teacher-shell .icon-btn,
.teacher-shell #logoutBtn {
  height: 42px;
  min-width: 42px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  color: #344054;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}

.teacher-shell .content {
  gap: 26px;
  padding: 34px 32px 58px;
}

.teacher-shell .page-title {
  min-height: 54px;
  margin: 0;
  align-items: center;
}

.teacher-shell .page-title h2 {
  margin: 0 0 7px;
  color: #111827;
  font-size: 27px;
  line-height: 1.15;
  font-weight: 950;
}

.teacher-shell .page-title p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.6;
}

.teacher-shell .title-actions input {
  height: 42px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 13px;
  background: rgba(255,255,255,0.82);
}

.teacher-shell .panel,
.teacher-shell .workbench-hero,
.teacher-shell .workbench-task,
.teacher-shell .teacher-focus-panel,
.teacher-shell .teacher-class-panel,
.teacher-shell .teacher-grade-list,
.teacher-shell .teacher-leave-cards,
.teacher-shell .teacher-intent-list,
.teacher-shell .teacher-score-panel,
.teacher-shell .teacher-tool-panel {
  border: 1px solid rgba(255,255,255,0.82);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(28px);
  box-shadow:
    0 24px 70px rgba(125, 60, 255, 0.075),
    inset 0 1px 0 rgba(255,255,255,0.72);
}

.teacher-shell .workbench-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(640px, 1.58fr);
  align-items: center;
  gap: 30px;
  min-height: 186px;
  padding: 30px 34px;
  border-radius: 20px;
}

.teacher-shell .workbench-hero > div:first-child {
  padding-right: 26px;
  border-right: 1px solid rgba(226, 232, 240, 0.78);
}

.teacher-shell .workbench-hero span {
  color: #7d3cff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.teacher-shell .workbench-hero h3 {
  margin: 10px 0 10px;
  color: #111827;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 950;
}

.teacher-shell .workbench-hero p {
  max-width: 520px;
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 650;
}

.teacher-shell .workbench-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.teacher-shell .workbench-kpis span {
  min-height: 104px;
  padding: 22px 18px;
  border: 1px solid rgba(125, 60, 255, 0.12);
  border-left: 5px solid #7d3cff;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
}

.teacher-shell .workbench-kpis span:nth-child(1) { border-left-color: #60a5fa; }
.teacher-shell .workbench-kpis span:nth-child(2) { border-left-color: #34d399; }
.teacher-shell .workbench-kpis span:nth-child(3) { border-left-color: #f59e0b; }
.teacher-shell .workbench-kpis span:nth-child(4) { border-left-color: #7d3cff; }

.teacher-shell .workbench-kpis b {
  color: #111827;
  font-size: 30px;
  line-height: 1;
}

.teacher-shell .workbench-kpis small {
  margin-top: 9px;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
}

.teacher-shell .workbench-task-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.teacher-shell .workbench-task {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  min-height: 132px;
  padding: 22px 24px;
  border-radius: 18px;
  border-left: 4px solid #34d399;
  text-align: left;
  overflow: hidden;
}

.teacher-shell .workbench-task.red { border-left-color: #fb7185; }
.teacher-shell .workbench-task.amber { border-left-color: #f59e0b; }

.teacher-shell .workbench-task i {
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #10b981;
  background: rgba(16, 185, 129, 0.11);
}

.teacher-shell .workbench-task.red i {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.10);
}

.teacher-shell .workbench-task.amber i {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.11);
}

.teacher-shell .workbench-task span {
  grid-column: 2;
  color: #667085;
  font-size: 13px;
  font-weight: 850;
}

.teacher-shell .workbench-task strong {
  grid-column: 2;
  margin-top: 8px;
  color: #111827;
  font-size: 30px;
  line-height: 1;
}

.teacher-shell .workbench-task small {
  grid-column: 2;
  margin-top: 9px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 750;
}

.teacher-shell .workbench-task em {
  position: absolute;
  right: 20px;
  top: 20px;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.teacher-shell .workbench-task.red em {
  color: #f43f5e;
  background: rgba(251, 113, 133, 0.12);
}

.teacher-shell .workbench-task.amber em {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

.teacher-shell .teacher-focus-panel {
  position: relative;
  min-height: auto !important;
  padding: 30px 34px !important;
  border-radius: 20px;
  overflow: hidden;
}

.teacher-shell .teacher-focus-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 28px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: #34d399;
}

.teacher-shell .teacher-follow-focus::before { background: #fb7185; }
.teacher-shell .teacher-grade-focus::before { background: #f59e0b; }

.teacher-shell .teacher-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.teacher-shell .teacher-panel-head strong {
  color: #111827;
  font-size: 20px;
  font-weight: 950;
}

.teacher-shell .teacher-panel-head strong::before {
  display: none;
}

.teacher-shell .teacher-panel-head span,
.teacher-shell .teacher-panel-head button {
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(226, 232, 240, 0.84);
  border-radius: 999px;
  color: #98a2b3;
  background: rgba(255,255,255,0.66);
  font-size: 12px;
  font-weight: 850;
}

.teacher-shell .teacher-empty-state {
  display: grid;
  place-items: center;
  min-height: 260px !important;
  padding: 32px 18px;
  text-align: center;
}

.teacher-shell .teacher-empty-state i {
  width: 76px;
  height: 76px;
  color: #10b981;
  border-radius: 999px;
}

.teacher-shell .teacher-follow-card,
.teacher-shell .teacher-leave-item {
  border-radius: 16px;
  background: rgba(255,255,255,0.70);
}

.teacher-shell .teacher-link-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 24px auto 0;
  color: #7d3cff;
  background: transparent;
  box-shadow: none;
}

.teacher-shell .teacher-class-panel {
  padding: 24px !important;
  border-radius: 20px;
}

.teacher-shell .teacher-class-panel .section-title {
  margin: 0 0 18px;
  padding-left: 0 !important;
  color: #111827;
  font-size: 20px;
  font-weight: 950;
}

.teacher-shell .teacher-class-panel .section-title::after {
  display: none;
}

.teacher-shell .class-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.teacher-shell .class-overview-card {
  min-height: 160px;
  padding: 20px;
  border: 1px solid rgba(125, 60, 255, 0.14);
  border-radius: 17px;
  background: rgba(255,255,255,0.66);
}

.teacher-shell .teacher-class-panel + .panel {
  border-radius: 20px;
}

.teacher-shell .teacher-class-panel + .panel .section-title {
  padding: 20px 24px 14px !important;
  color: #111827;
}

.teacher-shell .teacher-page-kpis {
  gap: 20px;
}

.teacher-shell .teacher-page-kpi {
  min-height: 126px;
  padding: 24px 26px 22px 36px;
  border-radius: 18px;
  background: rgba(255,255,255,0.64);
  box-shadow: 0 22px 62px rgba(125,60,255,0.075), inset 0 1px 0 rgba(255,255,255,0.72);
}

.teacher-shell .teacher-tool-panel {
  min-height: 78px;
  padding: 17px 20px;
  border-radius: 18px;
}

.teacher-shell .teacher-grade-list,
.teacher-shell .teacher-leave-cards {
  gap: 16px;
  padding: 22px;
  border-radius: 20px;
}

.teacher-shell .teacher-grade-card,
.teacher-shell .teacher-leave-row {
  min-height: 92px;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
}

.teacher-shell .teacher-intent-list {
  border-radius: 20px;
}

.teacher-shell .teacher-intent-list th,
.teacher-shell .teacher-score-panel th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(16px);
}

.teacher-shell .teacher-intent-list td,
.teacher-shell .teacher-score-panel td {
  background: rgba(255,255,255,0.52);
}

@media (max-width: 1480px) {
  .teacher-shell .workbench-hero {
    grid-template-columns: 1fr;
  }

  .teacher-shell .workbench-hero > div:first-child {
    padding-right: 0;
    border-right: 0;
  }

  .teacher-shell .workbench-task-grid,
  .teacher-shell .teacher-page-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Fix stacked text and center all small pills in teacher dashboard cards. */
.teacher-shell .workbench-task {
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  grid-template-rows: auto 34px auto !important;
  align-items: center !important;
  row-gap: 6px !important;
}

.teacher-shell .workbench-task i {
  grid-column: 1 !important;
  grid-row: 1 / 4 !important;
  align-self: center !important;
}

.teacher-shell .workbench-task span {
  grid-column: 2 !important;
  grid-row: 1 !important;
  position: static !important;
  display: block !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

.teacher-shell .workbench-task strong {
  grid-column: 2 !important;
  grid-row: 2 !important;
  position: static !important;
  display: flex !important;
  align-items: center !important;
  height: 34px !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.teacher-shell .workbench-task small {
  grid-column: 2 !important;
  grid-row: 3 !important;
  position: static !important;
  display: block !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

.teacher-shell .workbench-task em,
.teacher-shell .workbench-task.red em,
.teacher-shell .workbench-task.amber em,
.teacher-shell .teacher-panel-head span,
.teacher-shell .teacher-panel-head button,
.teacher-shell .teacher-soft-badge,
.teacher-shell .tag {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 24px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

.teacher-shell .workbench-task em,
.teacher-shell .workbench-task.red em,
.teacher-shell .workbench-task.amber em {
  height: 24px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

/* Keep the teacher sidebar and main column from overlapping. */
.shell.teacher-shell {
  grid-template-columns: 258px minmax(0, 1fr) !important;
}

.teacher-shell .sidebar {
  position: relative !important;
  z-index: 3 !important;
  width: auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.teacher-shell .brand {
  min-width: 0 !important;
}

.teacher-shell .brand-text {
  min-width: 0 !important;
}

.teacher-shell .brand-text strong,
.teacher-shell .brand-text span {
  display: block !important;
  max-width: 168px !important;
}

.teacher-shell .main {
  position: relative !important;
  z-index: 1 !important;
  min-width: 0 !important;
}

/* Instructor UI inspired by the provided teacher-side mockups. */
.shell.instructor-shell {
  grid-template-columns: 258px minmax(0, 1fr) !important;
  color: #111827;
  background: #f8f4ff;
}

.instructor-shell .sidebar {
  position: relative;
  z-index: 3;
  width: auto;
  padding: 26px 16px 18px;
  border-right: 1px solid rgba(125, 60, 255, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(251,247,255,0.74));
  backdrop-filter: blur(28px);
  box-shadow: 18px 0 60px rgba(125, 60, 255, 0.055);
}

.instructor-shell .brand {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  min-height: 56px;
  gap: 12px;
}

.instructor-shell .brand::before {
  content: "系";
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  background: linear-gradient(145deg, #7d3cff 0%, #8b5cf6 62%, #b794ff 100%);
  box-shadow: 0 16px 32px rgba(125, 60, 255, 0.30);
}

.instructor-shell .brand span {
  display: block;
  max-width: 168px;
  color: #111827;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 950;
}

.instructor-shell .brand span::after {
  content: "CAMPUS OA V1.0";
  display: block;
  margin-top: 3px;
  color: #98a2b3;
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.instructor-shell .nav {
  gap: 10px;
  margin-top: 46px;
}

.instructor-shell .nav button {
  position: relative;
  min-height: 48px;
  padding: 0 14px 0 16px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #667085;
  background: transparent;
  font-size: 15px;
  font-weight: 850;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.instructor-shell .nav button:hover {
  color: #7d3cff;
  background: rgba(125, 60, 255, 0.055);
  transform: translateX(2px);
}

.instructor-shell .nav button.active {
  color: #7d3cff;
  border-color: rgba(125, 60, 255, 0.10);
  background: linear-gradient(90deg, rgba(125, 60, 255, 0.13), rgba(255,255,255,0.55));
}

.instructor-shell .nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: #7d3cff;
}

.instructor-shell .nav .ui-icon {
  width: 19px;
  height: 19px;
}

.instructor-shell .sidebar-footer {
  min-height: 74px;
  margin-top: auto;
  padding: 12px 14px;
  border: 0;
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.045);
}

.instructor-shell .avatar-mini {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #7d3cff;
  background: rgba(125, 60, 255, 0.13);
}

.instructor-shell .main {
  min-width: 0;
  background:
    radial-gradient(circle at 70% -10%, rgba(125, 60, 255, 0.12), transparent 34%),
    linear-gradient(135deg, #fbfaff 0%, #f4edff 48%, #ffffff 100%);
}

.instructor-shell .topbar {
  height: 66px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(125, 60, 255, 0.08);
  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(24px);
  box-shadow: none;
}

.instructor-shell .topbar > strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 14px;
  font-weight: 750;
}

.instructor-shell .topbar > strong::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.instructor-shell .icon-btn,
.instructor-shell #logoutBtn {
  height: 42px;
  min-width: 42px;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}

.instructor-shell .content {
  gap: 28px;
  padding: 40px 32px 58px;
}

.instructor-shell .page-title {
  min-height: 82px;
  margin: 0;
  align-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.instructor-shell .page-title::before,
.instructor-shell .page-title h2::after {
  display: none;
}

.instructor-shell .page-title h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: 0;
}

.instructor-shell .page-title p {
  margin: 0;
  color: #667085;
  font-size: 15px;
  font-weight: 650;
}

.instructor-shell .page-title .primary,
.instructor-shell .instructor-panel-head .primary,
.instructor-shell .instructor-filters button,
.instructor-shell .form-footer .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #7d3cff, #9b5cff);
  box-shadow: 0 20px 40px rgba(125, 60, 255, 0.24);
}

.instructor-shell .page-title .primary .ui-icon {
  width: 19px;
  height: 19px;
}

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

.instructor-stat {
  position: relative;
  min-height: 138px;
  padding: 26px 28px;
  border: 1px solid rgba(255,255,255,0.84);
  border-radius: 18px;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(28px);
  box-shadow: 0 24px 70px rgba(125, 60, 255, 0.08), inset 0 1px 0 rgba(255,255,255,0.76);
  overflow: hidden;
}

.instructor-stat::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  opacity: 0.16;
  background: #7d3cff;
}

.instructor-stat span,
.instructor-stat strong,
.instructor-stat small {
  display: block;
}

.instructor-stat span {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.instructor-stat strong {
  margin-top: 14px;
  color: #111827;
  font-size: 38px;
  line-height: 1;
  font-weight: 950;
}

.instructor-stat small {
  margin-top: 8px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 850;
}

.instructor-stat.purple strong { color: #111827; }
.instructor-stat.green strong { color: #16a34a; }
.instructor-stat.blue strong { color: #3b82f6; }
.instructor-stat.red strong { color: #ef4444; }
.instructor-stat.amber strong { color: #f97316; }
.instructor-stat.purple::after { background: #7d3cff; }
.instructor-stat.green::after { background: #34d399; }
.instructor-stat.blue::after { background: #60a5fa; }
.instructor-stat.red::after { background: #fb7185; }
.instructor-stat.amber::after { background: #fb923c; }

.instructor-shell .panel,
.instructor-schedule-panel,
.instructor-attendance-panel,
.instructor-filter-panel,
.instructor-request-panel {
  border: 1px solid rgba(255,255,255,0.84);
  border-radius: 22px;
  background: rgba(255,255,255,0.64);
  backdrop-filter: blur(28px);
  box-shadow: 0 28px 74px rgba(125, 60, 255, 0.09), inset 0 1px 0 rgba(255,255,255,0.76);
  overflow: hidden;
}

.instructor-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px 18px;
}

.instructor-panel-head strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-size: 19px;
  font-weight: 950;
}

.instructor-panel-head strong .ui-icon {
  width: 18px;
  height: 18px;
  color: #7d3cff;
}

.instructor-panel-head span {
  display: block;
  margin-top: 7px;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 650;
}

.instructor-panel-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.instructor-panel-head input,
.instructor-panel-head button,
.instructor-filters select {
  height: 42px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 13px;
  background: rgba(255,255,255,0.78);
  color: #111827;
  font-weight: 750;
}

.instructor-panel-head button:not(.primary) {
  padding: 0 18px;
  color: #7d3cff;
}

.instructor-shell .timetable-wrap {
  margin: 0;
  padding: 0 26px 26px;
  overflow: auto;
}

.instructor-shell .timetable {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0 14px;
}

.instructor-shell .timetable th,
.instructor-shell .timetable td {
  border: 0;
  background: transparent;
}

.instructor-shell .timetable thead th {
  height: 42px;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.instructor-shell .timetable thead th.today-col {
  color: #7d3cff;
}

.instructor-shell .timetable tbody th {
  width: 84px;
  padding: 14px 8px 14px 0;
  color: #111827;
  vertical-align: top;
}

.instructor-shell .timetable tbody th span {
  display: block;
  margin-top: 5px;
  color: #98a2b3;
  font-size: 12px;
}

.instructor-shell .timetable td {
  min-width: 142px;
  padding: 0 8px;
}

.instructor-shell .empty-slot {
  display: grid;
  place-items: center;
  min-height: 110px;
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(255,255,255,0.34);
}

.instructor-shell .timetable-slot {
  display: grid;
  align-content: space-between;
  width: 100%;
  min-height: 110px;
  padding: 16px 14px;
  border: 1px solid rgba(125, 60, 255, 0.18);
  border-radius: 14px;
  color: #7d3cff;
  background: rgba(125, 60, 255, 0.07);
  box-shadow: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.instructor-shell .timetable-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(125, 60, 255, 0.13);
}

.instructor-shell .timetable-slot.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #7d3cff, #a855f7);
  box-shadow: 0 18px 40px rgba(125, 60, 255, 0.24);
}

.instructor-shell .timetable-slot strong {
  font-size: 13px;
  font-weight: 950;
}

.instructor-shell .timetable-slot span {
  color: inherit;
  font-size: 12px;
  font-weight: 750;
  opacity: 0.86;
}

.instructor-attendance-panel,
.instructor-request-panel {
  padding-bottom: 20px;
}

.instructor-attendance-panel table,
.instructor-request-panel table,
.instructor-gradebook table {
  width: calc(100% - 52px);
  margin: 0 26px 20px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
}

.instructor-attendance-panel th,
.instructor-request-panel th,
.instructor-gradebook th {
  height: 54px;
  padding: 0 18px;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  background: rgba(248,250,252,0.76);
}

.instructor-attendance-panel td,
.instructor-request-panel td,
.instructor-gradebook td {
  height: 64px;
  padding: 14px 18px;
  border-top: 1px solid rgba(226,232,240,0.72);
  background: rgba(255,255,255,0.50);
}

.instructor-attendance-panel select,
.instructor-attendance-panel input,
.instructor-gradebook input {
  height: 40px;
  border: 1px solid rgba(226,232,240,0.92);
  border-radius: 12px;
  background: rgba(255,255,255,0.78);
}

.instructor-filter-panel {
  padding: 24px;
}

.instructor-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.8fr) 96px;
  align-items: end;
  gap: 18px;
}

.instructor-filters label {
  display: grid;
  gap: 8px;
}

.instructor-filters label span {
  color: #98a2b3;
  font-size: 13px;
  font-weight: 850;
}

.instructor-gradebook {
  margin-top: 28px;
  border: 1px solid rgba(255,255,255,0.76);
  border-radius: 20px;
  background: rgba(255,255,255,0.48);
  overflow: hidden;
}

.instructor-gradebook .form-footer {
  padding: 0 26px 24px;
  justify-content: flex-end;
}

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

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

/* Prevent dashboard cards from being squeezed on narrower desktop widths. */
.teacher-shell .workbench-task-grid,
.teacher-shell .teacher-page-kpis,
.instructor-stats {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)) !important;
}

.teacher-shell .workbench-kpis {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}

.teacher-shell .workbench-task,
.teacher-shell .teacher-page-kpi,
.instructor-stat {
  min-width: 0 !important;
  overflow: hidden !important;
}

.teacher-shell .workbench-task {
  min-height: 142px !important;
}

.teacher-shell .teacher-page-kpi,
.instructor-stat {
  min-height: 136px !important;
}

.teacher-shell .workbench-task span,
.teacher-shell .teacher-page-kpi span,
.instructor-stat span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.teacher-shell .workbench-task small,
.teacher-shell .teacher-page-kpi small,
.instructor-stat small {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.teacher-shell .workbench-hero {
  grid-template-columns: minmax(280px, 0.82fr) minmax(560px, 1.58fr) !important;
}

.teacher-shell .workbench-hero,
.teacher-shell .teacher-focus-panel,
.instructor-schedule-panel,
.instructor-filter-panel,
.instructor-attendance-panel {
  min-width: 0 !important;
}

.instructor-shell .timetable-wrap,
.teacher-shell .wide-table,
.teacher-shell .teacher-intent-list,
.teacher-shell .teacher-score-panel .wide-table {
  overflow-x: auto !important;
}

.instructor-shell .timetable {
  min-width: 1280px !important;
  table-layout: fixed !important;
}

.instructor-shell .timetable tbody th {
  width: 96px !important;
}

.instructor-shell .timetable td {
  width: 168px !important;
  min-width: 168px !important;
}

.instructor-shell .timetable-slot {
  min-width: 150px !important;
  min-height: 118px !important;
}

.instructor-shell .timetable-slot strong,
.instructor-shell .timetable-slot span {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.instructor-filters {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) minmax(96px, 120px) !important;
}

@media (max-width: 1480px) {
  .teacher-shell .workbench-hero {
    grid-template-columns: 1fr !important;
  }
}

/* Instructor pages should scroll as pages, not as clipped inner cards. */
.instructor-shell .panel,
.instructor-shell .panel:has(> table),
.instructor-shell .panel:has(> .toolbar + table),
.instructor-shell .panel:has(> .wide-table),
.instructor-shell .panel:has(> .mini-table),
.instructor-shell .panel:has(> form > table),
.instructor-schedule-panel,
.instructor-attendance-panel,
.instructor-filter-panel,
.instructor-request-panel {
  max-height: none !important;
  overflow: visible !important;
}

.instructor-shell .timetable-wrap {
  max-height: none !important;
  min-height: 300px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding-bottom: 30px !important;
}

.instructor-shell .timetable {
  margin-bottom: 0 !important;
}

.instructor-shell .timetable tbody tr {
  min-height: 132px !important;
}

.instructor-shell .timetable th,
.instructor-shell .timetable td {
  height: auto !important;
}

.instructor-shell .empty-slot,
.instructor-shell .timetable-slot {
  min-height: 118px !important;
}

.instructor-attendance-panel table,
.instructor-request-panel table,
.instructor-gradebook table {
  display: table !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Unified glass modal system */
.modal-mask {
  padding: 28px !important;
  background:
    radial-gradient(circle at 18% 12%, rgba(125, 60, 255, 0.18), transparent 30%),
    radial-gradient(circle at 82% 82%, rgba(20, 184, 166, 0.12), transparent 28%),
    rgba(15, 23, 42, 0.50) !important;
  backdrop-filter: blur(16px) saturate(120%) !important;
}

.modal:not(.placement-modal) {
  display: flex !important;
  flex-direction: column !important;
  width: min(860px, calc(100vw - 56px)) !important;
  max-height: calc(100vh - 56px) !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.76) !important;
  border-radius: 24px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 244, 255, 0.91)),
    rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(18px) saturate(126%) !important;
  box-shadow: 0 34px 90px rgba(43, 32, 78, 0.32) !important;
  animation: modalFadeInUp 180ms ease-out both;
}

.modal.wide:not(.placement-modal) {
  width: min(1160px, calc(100vw - 56px)) !important;
}

.modal:not(.placement-modal) header {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  min-height: 82px !important;
  padding: 22px 26px 18px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.66) !important;
  background:
    radial-gradient(circle at 14% 0%, rgba(125, 60, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.58)) !important;
}

.modal:not(.placement-modal) header::before {
  content: "";
  position: absolute;
  left: 26px;
  bottom: -1px;
  width: 58px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7d3cff, #14b8a6);
}

.modal:not(.placement-modal) header h3 {
  margin: 0 !important;
  color: #101828 !important;
  font-size: 22px !important;
  line-height: 1.18 !important;
  font-weight: 920 !important;
}

.modal:not(.placement-modal) header button {
  flex: 0 0 auto !important;
  min-width: 66px !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(125, 60, 255, 0.12) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.76) !important;
  color: #111827 !important;
  font-weight: 850 !important;
  box-shadow: 0 12px 26px rgba(76, 57, 138, 0.10) !important;
}

.modal:not(.placement-modal) header button:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 60, 255, 0.26) !important;
  box-shadow: 0 16px 32px rgba(76, 57, 138, 0.14) !important;
}

.modal:not(.placement-modal) .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;
  padding: 24px 26px !important;
  background: transparent !important;
}

.modal:not(.placement-modal) footer {
  position: sticky !important;
  bottom: 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 18px 26px 22px !important;
  border: 0 !important;
  border-top: 1px solid rgba(226, 232, 240, 0.72) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(14px) !important;
}

.modal:not(.placement-modal) footer button {
  min-width: 94px !important;
  min-height: 42px !important;
  border-radius: 14px !important;
  font-weight: 900 !important;
}

.modal:not(.placement-modal) footer button.primary {
  border-color: transparent !important;
  background: linear-gradient(135deg, #7d3cff, #5f20f0) !important;
  color: #fff !important;
  box-shadow: 0 18px 36px rgba(125, 60, 255, 0.28) !important;
}

.modal:not(.placement-modal) .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

.modal:not(.placement-modal) .field {
  display: grid !important;
  gap: 8px !important;
}

.modal:not(.placement-modal) .field label {
  color: #475467 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 880 !important;
}

.modal:not(.placement-modal) input,
.modal:not(.placement-modal) select,
.modal:not(.placement-modal) textarea {
  width: 100% !important;
  min-height: 46px !important;
  border: 1px solid rgba(203, 213, 225, 0.82) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.88) !important;
  color: #111827 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04) !important;
}

.modal:not(.placement-modal) input:focus,
.modal:not(.placement-modal) select:focus,
.modal:not(.placement-modal) textarea:focus {
  border-color: rgba(125, 60, 255, 0.66) !important;
  box-shadow: 0 0 0 4px rgba(125, 60, 255, 0.12) !important;
  outline: none !important;
}

.modal:not(.placement-modal) textarea {
  min-height: 96px !important;
  resize: vertical !important;
}

.modal:not(.placement-modal) input[type="file"] {
  display: flex !important;
  align-items: center !important;
  padding: 7px 10px !important;
  color: #64748b !important;
}

.modal:not(.placement-modal) input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(125, 60, 255, 0.12);
  color: #5f20f0;
  font-weight: 880;
}

.modal:not(.placement-modal) select[multiple] {
  min-height: 132px !important;
  padding: 10px !important;
}

.modal:not(.placement-modal) .muted {
  color: #667085 !important;
  line-height: 1.65 !important;
}

.modal:not(.placement-modal) .error {
  margin-top: 16px !important;
  border: 1px solid rgba(248, 113, 113, 0.28) !important;
  border-radius: 16px !important;
  background: rgba(255, 241, 242, 0.88) !important;
  color: #991b1b !important;
  font-weight: 820 !important;
}

.modal:not(.placement-modal) .follow-history,
.modal:not(.placement-modal) .rule-list,
.modal:not(.placement-modal) .analysis,
.modal:not(.placement-modal) .summary-toolbar,
.modal:not(.placement-modal) .stats-grid {
  margin-top: 18px !important;
}

.modal:not(.placement-modal) .follow-item,
.modal:not(.placement-modal) .rule-item,
.modal:not(.placement-modal) .analysis-section,
.modal:not(.placement-modal) .summary-group,
.modal:not(.placement-modal) .stat-card {
  border: 1px solid rgba(226, 232, 240, 0.72) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.70) !important;
  box-shadow: 0 16px 34px rgba(79, 70, 129, 0.08) !important;
}

.modal:not(.placement-modal) .photo-upload-row {
  align-items: center !important;
  gap: 16px !important;
  padding: 14px !important;
  border: 1px solid rgba(226, 232, 240, 0.72) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.58) !important;
}

@keyframes modalFadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.operation-log-panel table {
  table-layout: fixed;
}

.health-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px;
}

.health-score {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px solid rgba(125, 60, 255, 0.16);
  border-radius: 24px;
  background: radial-gradient(circle at 50% 26%, rgba(125, 60, 255, 0.16), transparent 52%), rgba(255, 255, 255, 0.72);
}

.health-score span,
.health-score em {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.health-score strong {
  color: #111827;
  font-size: 64px;
  line-height: 1;
}

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

.health-summary-grid div,
.health-metric {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.health-summary-grid span,
.health-metric span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.health-summary-grid strong,
.health-metric strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 28px;
  line-height: 1;
}

.health-metric.danger strong {
  color: #dc2626;
}

.health-issues {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.health-issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 92px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 42px rgba(79, 70, 129, 0.08);
}

.health-issue span {
  color: #334155;
  font-weight: 850;
}

.health-issue strong {
  font-size: 28px;
}

.health-issue em {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.health-issue.fail { border: 1px solid rgba(248, 113, 113, 0.46); }
.health-issue.fail strong { color: #dc2626; }
.health-issue.warn { border: 1px solid rgba(251, 191, 36, 0.46); }
.health-issue.warn strong { color: #d97706; }
.health-issue.ok { border: 1px solid rgba(34, 197, 94, 0.34); }
.health-issue.ok strong { color: #16a34a; }

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

.health-section {
  padding-bottom: 16px;
}

.health-section .health-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 18px 12px;
}

.health-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.health-row,
.health-service-row {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.health-row strong {
  color: #111827;
}

.health-row small,
.health-service-row small {
  margin-left: 8px;
  color: #64748b;
  font-size: 12px;
}

.health-row span,
.health-service-row span + small {
  color: #64748b;
}

.health-row.danger {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(255, 241, 242, 0.62);
}

.health-service-row {
  margin: 0 18px 12px;
}

.health-empty {
  margin: 0 18px 18px;
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.42);
  border-radius: 16px;
  color: #64748b;
  background: rgba(255, 255, 255, 0.46);
  font-weight: 780;
  text-align: center;
}

.health-empty.big {
  grid-column: 1 / -1;
  margin: 0;
}

.log-summary {
  max-width: 100%;
  color: #334155;
  line-height: 1.55;
  word-break: break-word;
}

.log-detail {
  margin-top: 8px;
}

.log-detail summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(125, 60, 255, 0.10);
  color: #6d28d9;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.log-detail pre {
  max-height: 220px;
  margin: 10px 0 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.82);
  color: #334155;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 720px) {
  .health-hero,
  .health-grid-layout {
    grid-template-columns: 1fr;
  }

  .health-summary-grid,
  .health-issues,
  .health-section .health-metrics {
    grid-template-columns: 1fr;
  }

  .modal-mask {
    padding: 14px !important;
  }

  .modal:not(.placement-modal),
  .modal.wide:not(.placement-modal) {
    width: calc(100vw - 28px) !important;
    max-height: calc(100vh - 28px) !important;
    border-radius: 22px !important;
  }

  .modal:not(.placement-modal) header,
  .modal:not(.placement-modal) .modal-body,
  .modal:not(.placement-modal) footer {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .modal:not(.placement-modal) .form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Final anti-compression layer: cards must never hide their own content. */
.stats-grid,
.todo-grid,
.health-issues,
.health-summary-grid,
.health-metrics,
.workbench-task-grid,
.reminder-grid,
.teacher-class-grid {
  align-items: stretch !important;
  grid-auto-rows: minmax(max-content, auto) !important;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
}

.todo-grid,
.workbench-task-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
}

.health-issues {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.health-summary-grid,
.health-metrics,
.health-section .health-metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}

.stat-card,
.todo-card,
.health-issue,
.health-metric,
.workbench-task,
.reminder-card,
.teacher-class-card,
.health-row,
.health-service-row {
  height: auto !important;
  min-height: 124px !important;
  overflow: visible !important;
  align-content: start !important;
  white-space: normal !important;
}

.todo-card,
.health-issue,
.workbench-task {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

.stat-card span,
.stat-card strong,
.stat-card small,
.todo-card span,
.todo-card strong,
.todo-card em,
.health-issue span,
.health-issue strong,
.health-issue em,
.health-metric span,
.health-metric strong,
.workbench-task span,
.workbench-task strong,
.workbench-task small,
.reminder-card span,
.reminder-card strong,
.reminder-card em {
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: break-word !important;
}

.panel.health-section,
.teacher-focus-panel,
.reminder-panel,
.teacher-class-panel {
  height: auto !important;
  min-height: 220px !important;
  overflow: visible !important;
}

.health-hero {
  min-height: 240px !important;
}

.health-score {
  min-height: 210px !important;
}

/* Global readability and scroll contract.
   Content should not be clipped by decorative cards; pages scroll first, long
   tables/modals scroll only when they genuinely exceed the viewport. */
body,
button,
input,
select,
textarea {
  line-height: 1.5 !important;
}

p,
span,
small,
em,
strong,
label,
button,
td,
th,
li,
summary {
  min-width: 0;
}

.panel,
.card,
.stat-card,
.todo-card,
.workbench-task,
.reminder-card,
.teacher-focus-panel,
.teacher-class-panel,
.teacher-tool-panel,
.teacher-leave-cards,
.teacher-score-panel,
.instructor-schedule-panel,
.instructor-attendance-panel,
.instructor-filter-panel,
.instructor-request-panel {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.panel p,
.panel span,
.panel small,
.panel em,
.panel strong,
.card p,
.card span,
.card small,
.card em,
.card strong,
.stat-card span,
.stat-card small,
.todo-card span,
.todo-card em,
.workbench-task span,
.workbench-task small,
.teacher-focus-panel span,
.teacher-focus-panel small,
.teacher-focus-panel em,
.teacher-class-panel span,
.teacher-class-panel small,
.reminder-card span,
.reminder-card small,
.health-section span,
.health-section small,
.health-section em {
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.section-title,
.card-title,
.teacher-panel-head,
.instructor-panel-head,
.modal header,
.modal footer,
.toolbar,
.summary-toolbar,
.status-row,
.actions,
.intentional-actions {
  min-height: max-content !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.section-title strong,
.card-title strong,
.teacher-panel-head strong,
.instructor-panel-head strong,
.modal header h3 {
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow: visible !important;
}

.tag,
.pill,
.badge,
.status-badge,
.soft-badge,
.teacher-soft-badge,
.health-badge,
.mini-badge,
.modal header button,
.modal footer button,
.toolbar button,
.summary-toolbar button,
.intentional-actions button,
.teacher-panel-head button,
.instructor-panel-head button {
  min-height: 34px !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  text-align: center !important;
}

.wide-table,
.mini-table,
.timetable-wrap,
.operation-log-panel {
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.wide-table table,
.mini-table table,
.operation-log-panel table {
  min-width: max-content;
}

table th,
table td {
  height: auto !important;
  min-height: 54px !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  vertical-align: middle !important;
  line-height: 1.45 !important;
  white-space: normal;
}

.modal:not(.placement-modal) {
  display: flex !important;
  flex-direction: column !important;
  max-height: calc(100vh - 56px) !important;
  overflow: hidden !important;
}

.modal:not(.placement-modal) .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.modal:not(.placement-modal) header,
.modal:not(.placement-modal) footer {
  flex: 0 0 auto !important;
}

.modal textarea,
.modal select[multiple] {
  resize: vertical;
}

/* Class-master dashboard sample page cleanup.
   Keep one clear decision surface: overview, task shortcuts, focused work,
   class cards and attendance detail. Duplicate legacy lists stay hidden here. */
.teacher-shell .workbench-columns,
.teacher-shell .reminder-panel,
.teacher-shell .teacher-class-panel + .panel + .stats-grid,
.teacher-shell .teacher-class-panel + .panel + .stats-grid + .panel {
  display: none !important;
}

.teacher-shell .workbench-hero {
  min-height: 190px !important;
  padding: 34px 36px !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 86% 0%, rgba(125, 60, 255, 0.15), transparent 34%),
    rgba(255, 255, 255, 0.70) !important;
  box-shadow:
    0 28px 80px rgba(125, 60, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

.teacher-shell .workbench-hero h3 {
  margin: 12px 0 12px !important;
  font-size: clamp(28px, 2.15vw, 40px) !important;
  line-height: 1.12 !important;
}

.teacher-shell .workbench-kpis span {
  display: grid !important;
  align-content: center !important;
  gap: 8px !important;
  min-height: 118px !important;
  padding: 22px 24px !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.62) !important;
}

.teacher-shell .workbench-kpis b {
  font-size: clamp(28px, 2vw, 36px) !important;
  line-height: 1 !important;
}

.teacher-shell .workbench-task-grid {
  gap: 20px !important;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)) !important;
}

.teacher-shell .workbench-task {
  min-height: 148px !important;
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  gap: 8px 16px !important;
  padding: 24px 26px !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  border-left: 5px solid #34d399 !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.68) !important;
  box-shadow: 0 22px 64px rgba(125, 60, 255, 0.08) !important;
}

.teacher-shell .workbench-task.red {
  border-left-color: #fb7185 !important;
}

.teacher-shell .workbench-task.amber {
  border-left-color: #f59e0b !important;
}

.teacher-shell .workbench-task i {
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
}

.teacher-shell .workbench-task span {
  align-self: end !important;
  color: #667085 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

.teacher-shell .workbench-task strong {
  align-self: center !important;
  font-size: 34px !important;
  line-height: 1 !important;
}

.teacher-shell .workbench-task small {
  align-self: start !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.teacher-shell .workbench-task em {
  position: static !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
  align-self: start !important;
  min-height: 28px !important;
  padding: 6px 12px !important;
}

.teacher-shell .teacher-focus-panel {
  min-height: 260px !important;
  padding: 30px 36px !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 92% 0%, rgba(125, 60, 255, 0.10), transparent 30%),
    rgba(255, 255, 255, 0.72) !important;
  box-shadow:
    0 26px 72px rgba(125, 60, 255, 0.085),
    inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

.teacher-shell .teacher-leave-focus {
  min-height: 320px !important;
}

.teacher-shell .teacher-panel-head {
  margin-bottom: 22px !important;
}

.teacher-shell .teacher-panel-head strong {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 22px !important;
  line-height: 1.25 !important;
}

.teacher-shell .teacher-panel-head strong::before {
  content: "" !important;
  display: inline-block !important;
  width: 7px !important;
  height: 28px !important;
  border-radius: 999px !important;
  background: #34d399 !important;
}

.teacher-shell .teacher-follow-focus .teacher-panel-head strong::before {
  background: #fb7185 !important;
}

.teacher-shell .teacher-grade-focus .teacher-panel-head strong::before {
  background: #f59e0b !important;
}

.teacher-shell .teacher-empty-state {
  min-height: 220px !important;
  padding: 28px 18px !important;
}

.teacher-shell .teacher-empty-state.slim {
  min-height: 140px !important;
}

.teacher-shell .teacher-follow-card,
.teacher-shell .teacher-leave-item {
  min-height: 104px !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(226, 232, 240, 0.70) !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.74) !important;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.045) !important;
}

.teacher-shell .teacher-mini-table {
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.66) !important;
}

.teacher-shell .teacher-mini-table th,
.teacher-shell .teacher-mini-table td {
  height: auto !important;
  min-height: 68px !important;
  padding: 18px 16px !important;
}

.teacher-shell .teacher-class-panel {
  padding: 28px !important;
  border-radius: 28px !important;
}

.teacher-shell .class-overview-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 18px !important;
}

.teacher-shell .class-overview-card {
  min-height: 190px !important;
  padding: 22px !important;
  border-radius: 24px !important;
}

.teacher-shell .class-metrics {
  row-gap: 8px !important;
}

.teacher-shell .teacher-class-panel + .panel {
  padding-bottom: 18px !important;
  border-radius: 28px !important;
}

.teacher-shell .teacher-class-panel + .panel .section-title {
  min-height: 68px !important;
  padding: 22px 28px 12px !important;
  font-size: 20px !important;
}

.teacher-shell .teacher-class-panel + .panel .wide-table {
  padding: 0 22px 20px !important;
}

/* Emergency layout repair for class-master pages after visual review. */
.teacher-shell .teacher-class-panel ~ .stats-grid,
.teacher-shell .teacher-class-panel ~ .stats-grid ~ .panel {
  display: none !important;
}

.teacher-shell .teacher-class-panel {
  min-height: auto !important;
  overflow: hidden !important;
}

.teacher-shell .teacher-class-panel .section-title {
  min-height: 44px !important;
  margin-bottom: 18px !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.72) !important;
}

.teacher-shell .class-overview-grid {
  align-items: stretch !important;
}

.teacher-shell .class-overview-card {
  position: relative !important;
  height: auto !important;
  min-height: 168px !important;
  overflow: hidden !important;
  align-content: start !important;
}

.teacher-shell .class-overview-card em {
  margin-top: 4px !important;
  color: #667085 !important;
  font-style: normal !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.teacher-shell .class-metrics {
  grid-template-columns: repeat(5, minmax(52px, 1fr)) !important;
  gap: 8px 10px !important;
}

.teacher-shell .class-metrics b,
.teacher-shell .class-metrics small {
  min-width: 0 !important;
  text-align: center !important;
}

.teacher-shell .teacher-intent-list,
.teacher-shell .teacher-score-panel,
.teacher-shell .teacher-grade-list {
  max-height: none !important;
  overflow: visible !important;
}

.teacher-shell .teacher-intent-list {
  padding: 18px 18px 20px !important;
  border-radius: 26px !important;
}

.teacher-shell .teacher-intent-list .wide-table,
.teacher-shell .teacher-intent-list table,
.teacher-shell .teacher-score-panel .wide-table {
  max-height: none !important;
  overflow-y: visible !important;
}

.teacher-shell .teacher-intent-list table {
  min-width: 1220px !important;
}

.teacher-shell .intentional-table th:nth-child(8),
.teacher-shell .intentional-table td:nth-child(8) {
  width: 260px !important;
}

.teacher-shell .intentional-table .intentional-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(92px, 1fr)) !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 220px !important;
}

.teacher-shell .intentional-table .intentional-actions button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 0 10px !important;
  border-radius: 12px !important;
  white-space: nowrap !important;
}

.teacher-shell .teacher-tool-panel {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) minmax(132px, max-content) !important;
  align-items: end !important;
  gap: 14px !important;
}

.teacher-shell .teacher-intent-toolbar {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 220px) minmax(112px, max-content) minmax(132px, max-content) !important;
}

.teacher-shell .teacher-tool-panel button,
.teacher-shell .teacher-tool-panel .primary {
  min-width: 132px !important;
  min-height: 46px !important;
  padding: 0 18px !important;
  white-space: nowrap !important;
}

.teacher-shell .teacher-tool-panel select,
.teacher-shell .teacher-tool-panel input {
  min-height: 46px !important;
}

.teacher-shell .teacher-page-kpis {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
}

.teacher-shell .teacher-page-kpi {
  min-height: 132px !important;
}

@media (max-width: 1100px) {
  .teacher-shell .teacher-intent-toolbar,
  .teacher-shell .teacher-tool-panel {
    grid-template-columns: 1fr !important;
  }

  .teacher-shell .teacher-tool-panel button,
  .teacher-shell .teacher-tool-panel .primary {
    width: 100% !important;
  }
}

/* Class-master V2 pages: isolated structure, no legacy page collisions. */
.teacher-shell .cm-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.teacher-shell .cm-page-head h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.15;
}

.teacher-shell .cm-page-head p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  font-weight: 700;
}

.teacher-shell .cm-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.teacher-shell .cm-head-actions input,
.teacher-shell .cm-toolbar input,
.teacher-shell .cm-toolbar select {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.84);
  background: rgba(255,255,255,0.74);
}

.teacher-shell .cm-hero,
.teacher-shell .cm-panel,
.teacher-shell .cm-toolbar,
.teacher-shell .cm-tabs,
.teacher-shell .cm-leave-list {
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 28px;
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(26px);
  box-shadow: 0 26px 72px rgba(125,60,255,0.08), inset 0 1px 0 rgba(255,255,255,0.78);
}

.teacher-shell .cm-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(520px, 1.4fr);
  gap: 28px;
  align-items: center;
  min-height: 190px;
  padding: 34px 36px;
}

.teacher-shell .cm-hero span {
  color: #7d3cff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.teacher-shell .cm-hero h3 {
  margin: 10px 0;
  color: #111827;
  font-size: 36px;
  line-height: 1.12;
  font-weight: 950;
}

.teacher-shell .cm-hero p {
  margin: 0;
  color: #667085;
  line-height: 1.7;
  font-weight: 700;
}

.teacher-shell .cm-hero-metrics,
.teacher-shell .cm-kpi-grid,
.teacher-shell .cm-task-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.teacher-shell .cm-hero-metrics span,
.teacher-shell .cm-kpi,
.teacher-shell .cm-task {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(226,232,240,0.72);
  border-left: 5px solid #7d3cff;
  background: rgba(255,255,255,0.66);
  text-align: left;
}

.teacher-shell .cm-hero-metrics b,
.teacher-shell .cm-kpi strong,
.teacher-shell .cm-task strong {
  color: #111827;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
}

.teacher-shell .cm-hero-metrics small,
.teacher-shell .cm-kpi small,
.teacher-shell .cm-task small,
.teacher-shell .cm-kpi span,
.teacher-shell .cm-task span {
  color: #667085;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 850;
}

.teacher-shell .cm-kpi-grid,
.teacher-shell .cm-task-grid,
.teacher-shell .cm-focus-grid,
.teacher-shell .cm-panel,
.teacher-shell .cm-toolbar,
.teacher-shell .cm-tabs,
.teacher-shell .cm-leave-list {
  margin-top: 24px;
}

.teacher-shell .cm-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.teacher-shell .cm-panel {
  padding: 28px;
  overflow: visible;
}

.teacher-shell .cm-panel.green,
.teacher-shell .cm-task.green,
.teacher-shell .cm-kpi.green { border-left-color: #34d399; }
.teacher-shell .cm-panel.red,
.teacher-shell .cm-task.red,
.teacher-shell .cm-kpi.red { border-left-color: #fb7185; }
.teacher-shell .cm-panel.amber,
.teacher-shell .cm-task.amber,
.teacher-shell .cm-kpi.amber { border-left-color: #f59e0b; }
.teacher-shell .cm-panel.blue,
.teacher-shell .cm-kpi.blue { border-left-color: #60a5fa; }
.teacher-shell .cm-panel.purple,
.teacher-shell .cm-kpi.purple { border-left-color: #7d3cff; }

.teacher-shell .cm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.teacher-shell .cm-panel-head strong {
  color: #111827;
  font-size: 20px;
  font-weight: 950;
}

.teacher-shell .cm-panel-head span,
.teacher-shell .cm-panel-head button,
.teacher-shell .cm-empty button,
.teacher-shell .cm-person-row button,
.teacher-shell .cm-exam-card button,
.teacher-shell .cm-leave-actions button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(226,232,240,0.82);
  background: rgba(255,255,255,0.76);
  color: #7d3cff;
  font-weight: 900;
  white-space: nowrap;
}

.teacher-shell .cm-person-row,
.teacher-shell .cm-leave-card,
.teacher-shell .cm-exam-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 94px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(226,232,240,0.74);
  background: rgba(255,255,255,0.72);
}

.teacher-shell .cm-person-row + .cm-person-row,
.teacher-shell .cm-leave-card + .cm-leave-card,
.teacher-shell .cm-exam-card + .cm-exam-card {
  margin-top: 12px;
}

.teacher-shell .cm-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(125,60,255,0.12);
  color: #7d3cff;
  font-size: 20px;
  font-weight: 950;
}

.teacher-shell .cm-avatar.danger {
  background: rgba(251,113,133,0.12);
  color: #f43f5e;
}

.teacher-shell .cm-person-row strong,
.teacher-shell .cm-leave-main strong,
.teacher-shell .cm-exam-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111827;
  font-size: 16px;
  font-weight: 950;
}

.teacher-shell .cm-person-row span,
.teacher-shell .cm-person-row em,
.teacher-shell .cm-leave-main span,
.teacher-shell .cm-leave-main p,
.teacher-shell .cm-exam-card span {
  margin: 4px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
  font-style: normal;
  font-weight: 700;
}

.teacher-shell .cm-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  color: #667085;
}

.teacher-shell .cm-empty i {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: #10b981;
  border-radius: 999px;
  background: rgba(16,185,129,0.10);
}

.teacher-shell .cm-empty strong {
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}

.teacher-shell .cm-class-grid,
.teacher-shell .cm-exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.teacher-shell .cm-class-card {
  min-height: 178px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(125,60,255,0.18);
  background: rgba(255,255,255,0.66);
  text-align: left;
}

.teacher-shell .cm-class-card.active {
  border-color: rgba(125,60,255,0.46);
  box-shadow: 0 18px 48px rgba(125,60,255,0.13);
}

.teacher-shell .cm-class-card strong {
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}

.teacher-shell .cm-class-card span,
.teacher-shell .cm-class-card em {
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
  font-style: normal;
  font-weight: 750;
}

.teacher-shell .cm-class-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid rgba(226,232,240,0.76);
}

.teacher-shell .cm-class-metrics b,
.teacher-shell .cm-class-metrics small {
  text-align: center;
}

.teacher-shell .cm-class-metrics b {
  color: #111827;
  font-size: 20px;
  font-weight: 950;
}

.teacher-shell .cm-class-metrics small {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 850;
}

.teacher-shell .cm-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 112px 132px;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
}

.teacher-shell .cm-toolbar.grades {
  grid-template-columns: minmax(280px, 1fr) 132px;
}

.teacher-shell .cm-toolbar button,
.teacher-shell .cm-toolbar .primary {
  min-height: 46px;
  border-radius: 16px;
  font-weight: 950;
}

.teacher-shell .cm-toolbar .primary,
.teacher-shell .cm-table-shell button,
.teacher-shell .cm-leave-actions button:not(:disabled) {
  color: #fff;
  background: linear-gradient(135deg, #7d3cff, #9b5cff);
  box-shadow: 0 14px 32px rgba(125,60,255,0.24);
}

.teacher-shell .cm-table-shell {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.teacher-shell .cm-table-shell table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.teacher-shell .cm-table-shell.compact table {
  min-width: 620px;
}

.teacher-shell .cm-intent-table {
  min-width: 1220px !important;
}

.teacher-shell .cm-table-shell th,
.teacher-shell .cm-table-shell td {
  height: auto !important;
  padding: 16px 14px !important;
  border-bottom: 1px solid rgba(226,232,240,0.70);
  color: #334155;
  line-height: 1.45;
  vertical-align: middle;
}

.teacher-shell .cm-table-shell th {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 950;
}

.teacher-shell .cm-table-shell td strong,
.teacher-shell .cm-table-shell td small,
.teacher-shell .cm-table-shell th small {
  display: block;
  line-height: 1.45;
}

.teacher-shell .cm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  gap: 10px;
  width: 210px;
}

.teacher-shell .cm-actions button {
  min-height: 36px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.teacher-shell .cm-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.teacher-shell .cm-badge.green { color: #059669; background: rgba(52,211,153,0.14); }
.teacher-shell .cm-badge.amber { color: #f97316; background: rgba(251,146,60,0.14); }
.teacher-shell .cm-badge.blue { color: #2563eb; background: rgba(96,165,250,0.14); }
.teacher-shell .cm-badge.red { color: #f43f5e; background: rgba(251,113,133,0.14); }
.teacher-shell .cm-badge.gray { color: #64748b; background: rgba(148,163,184,0.14); }

.teacher-shell .cm-table-footer {
  padding-top: 14px;
  color: #98a2b3;
  font-size: 13px;
  font-weight: 800;
}

.teacher-shell .cm-leave-list {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.teacher-shell .cm-leave-card {
  grid-template-columns: 54px minmax(0, 1fr) minmax(240px, auto);
  align-items: center;
}

.teacher-shell .cm-leave-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.teacher-shell .cm-leave-actions button:disabled,
.teacher-shell .cm-actions button:disabled {
  opacity: 0.42;
  box-shadow: none;
}

.teacher-shell .cm-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 20px;
}

.teacher-shell .cm-tabs button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 900;
}

.teacher-shell .cm-tabs button.active {
  color: #7d3cff;
  border-color: rgba(125,60,255,0.38);
  background: rgba(125,60,255,0.10);
}

@media (max-width: 1380px) {
  .teacher-shell .cm-hero,
  .teacher-shell .cm-focus-grid {
    grid-template-columns: 1fr;
  }

  .teacher-shell .cm-hero-metrics,
  .teacher-shell .cm-kpi-grid,
  .teacher-shell .cm-task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .teacher-shell .cm-page-head,
  .teacher-shell .cm-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .teacher-shell .cm-hero-metrics,
  .teacher-shell .cm-kpi-grid,
  .teacher-shell .cm-task-grid,
  .teacher-shell .cm-toolbar,
  .teacher-shell .cm-toolbar.grades {
    grid-template-columns: 1fr;
  }

  .teacher-shell .cm-leave-card,
  .teacher-shell .cm-person-row,
  .teacher-shell .cm-exam-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .teacher-shell .cm-leave-actions,
  .teacher-shell .cm-person-row > button,
  .teacher-shell .cm-exam-card > button,
  .teacher-shell .cm-exam-card > em {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
