* {
  box-sizing: border-box;
}

:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-press: #1d4ed8;
  --accent-soft: #eff6ff;
  --warn: #b45309;
  --ok: #166534;
  --danger: #b91c1c;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  background-image: radial-gradient(
    ellipse 120% 80% at 100% -20%,
    rgba(37, 99, 235, 0.06),
    transparent 50%
  );
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 14px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #93c5fd);
  vertical-align: middle;
}

h1 {
  font-size: 1.35rem;
  margin: 4px 0 6px;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card--accent {
  border-color: #dbeafe;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.06);
}

.card--soft {
  background: #fafbfc;
  border-style: dashed;
}

.page-head {
  margin-bottom: 1rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.page-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #93c5fd);
  border-radius: 2px;
}

.page-head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1rem;
  margin: 0 0 12px;
  font-weight: 600;
}

.subnav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0.35rem;
  margin: 0 0 12px;
  padding-bottom: 2px;
}

.subnav.subnav--bar {
  overflow: visible;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.subnav::-webkit-scrollbar {
  display: none;
}

.subnav-link {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  position: relative;
}

.subnav-link:hover {
  color: var(--text);
  background: rgba(37, 99, 235, 0.06);
}

.subnav-link.is-active {
  color: #1d4ed8;
}

.subnav-link.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: #93c5fd;
}

.subnav--bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding-bottom: 2px;
}

.subnav-links {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.subnav-links::-webkit-scrollbar {
  display: none;
}

.subnav-logout {
  flex: 0 0 auto;
}

.btn-ghost--nav {
  font-size: 0.82rem;
  padding: 5px 10px;
  white-space: nowrap;
}

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

.toolbar-hint {
  font-size: 0.88rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.textarea {
  min-height: 88px;
  resize: vertical;
  font-family: inherit;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge--primary {
  background: #dbeafe;
  color: #1e40af;
}

.badge--soft {
  background: #f3f4f6;
  color: #374151;
}

.badge--warn {
  background: #fef3c7;
  color: var(--warn);
}

.badge--ok {
  background: #dcfce7;
  color: var(--ok);
}

.badge--muted {
  background: #f3f4f6;
  color: #6b7280;
}

.lesson-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lesson-grid-two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.lesson-card {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lesson-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.07);
}

.lesson-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.lesson-time {
  font-size: 0.88rem;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.lesson-title {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
}

.lesson-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.lesson-notes {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cancel-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.small {
  font-size: 0.88rem;
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
}

.template-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.template-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.template-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.btn-ghost--danger {
  color: var(--danger);
  border-color: #fecaca;
}

.btn-ghost--danger:hover {
  background: #fef2f2;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.menu-link {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.menu-link:hover {
  border-color: #bfdbfe;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.06);
}

.menu-link strong {
  display: block;
  margin-bottom: 2px;
}

.menu-link span {
  color: var(--muted);
  font-size: 0.92rem;
}

.label {
  display: block;
  margin: 2px 0 6px;
  font-size: 0.92rem;
  color: #374151;
}

.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 1px solid #cfd5de;
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.btn {
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

a.btn,
a.btn:link,
a.btn:visited {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn--plain {
  text-decoration: none;
}

.btn:active {
  background: var(--primary-press);
}

.btn-ghost {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: #bfdbfe;
}

.inline-form {
  display: inline;
}

.flash-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.flash-item {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid transparent;
}

.flash-item.success {
  background: #dcfce7;
  border-color: #86efac;
}

.flash-item.error {
  background: #fee2e2;
  border-color: #fca5a5;
}

.flash-item.warning {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: 0;
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.btn-ghost--blue {
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* 学员上课记录页：档案概览（紧凑） */
.student-lessons-overview {
  margin-bottom: 12px;
  padding: 12px 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.student-lessons-overview__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line, #e5e7eb);
}

.student-lessons-overview__head-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.student-lessons-overview__mp-tag {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
  line-height: 1.35;
}

.student-lessons-overview__mp-tag--btn {
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.student-lessons-overview__mp-tag--btn:hover {
  background: #d1fae5;
  border-color: rgba(16, 185, 129, 0.45);
}

.student-mp-overlay-backdrop {
  z-index: 90;
}

.student-mp-overlay-modal {
  z-index: 91;
}

.student-mp-dialog-card {
  margin: 0 16px 24px;
  padding: 18px 18px 16px;
  max-width: 400px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
}

.student-mp-dialog-card__title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.student-mp-dialog-card__text {
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155;
}

/* 剪贴板不可用时展示链接供手动复制（非可编辑输入框） */
.student-mp-dialog-card__url-plain {
  margin: 0 0 16px;
  padding: 10px 12px;
  font-size: 0.72rem;
  line-height: 1.45;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  box-sizing: border-box;
  font-family: ui-monospace, monospace;
  color: #475569;
  word-break: break-all;
  user-select: all;
}

.student-mp-dialog-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.student-mp-dialog-card__actions--single {
  justify-content: stretch;
}

.student-mp-dialog-card__actions--single .btn {
  width: 100%;
}

.student-lessons-overview__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

.student-mp-bind-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin: 0;
  padding: 2px 0;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: #64748b;
  text-align: left;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.student-mp-bind-trigger:hover {
  color: #475569;
  background: rgba(148, 163, 184, 0.12);
}

.student-mp-bind-trigger:active {
  background: rgba(148, 163, 184, 0.18);
}

.student-mp-bind-trigger__icon {
  flex-shrink: 0;
  display: block;
}

.student-mp-bind-trigger__hint {
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
}

@media (min-width: 640px) {
  .student-mp-bind-trigger__hint {
    white-space: nowrap;
  }
}

.student-lessons-overview__head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.student-lessons-overview__edit {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
}

.student-lessons-overview__body {
  display: grid;
  gap: 10px;
}

.student-lessons-panel--span {
  grid-column: 1 / -1;
}

@media (min-width: 880px) {
  .student-lessons-overview__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.student-lessons-panel {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e8edf3;
}

.student-lessons-panel--perms {
  padding-bottom: 11px;
}

.student-lessons-panel__title {
  margin: 0 0 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
}

.student-lessons-dl {
  margin: 0;
}

.student-lessons-dl__row {
  display: grid;
  grid-template-columns: minmax(72px, 32%) 1fr;
  gap: 6px 10px;
  padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.82rem;
  line-height: 1.35;
}

.student-lessons-dl__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.student-lessons-dl__row dt {
  margin: 0;
  color: #64748b;
  font-weight: 500;
}

.student-lessons-dl__row dd {
  margin: 0;
  color: #0f172a;
  word-break: break-word;
}

.student-lessons-dl__hint {
  font-size: 0.72rem;
  margin-left: 2px;
}

.student-lessons-dl__rem--low {
  font-weight: 700;
  color: #b91c1c;
  font-variant-numeric: tabular-nums;
}

.student-lessons-dl__money {
  font-weight: 700;
  color: #0f766e;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}

.student-lessons-code {
  font-size: 0.88em;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
}

.student-lessons-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.student-lessons-badge--ok {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.student-lessons-badge--muted {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.student-lessons-warn {
  color: #b91c1c;
  font-weight: 600;
}

.student-lessons-notes {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e8edf3;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow-y: auto;
}

.student-lessons-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 6px;
}

@media (min-width: 640px) {
  .student-lessons-perm-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .student-lessons-perm-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.student-lessons-perm-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 5px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e8edf3;
}

.student-lessons-perm-item__name {
  font-size: 0.74rem;
  color: #475569;
  line-height: 1.25;
  min-width: 0;
}

.student-lessons-perm-item__extra {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 500;
  color: #94a3b8;
}

.student-lessons-flag {
  display: inline-block;
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.student-lessons-flag--on {
  background: #ecfdf5;
  color: #15803d;
}

.student-lessons-flag--off {
  background: #f1f5f9;
  color: #94a3b8;
}

.record-shell {
  padding: 14px;
  margin-bottom: 16px;
}

.record-tabbar {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: #f3f4f6;
  border-radius: 12px;
  margin-bottom: 8px;
}

.record-tab {
  flex: 1;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.record-tab.is-active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
}

.record-hint {
  margin: 0 0 10px;
}

/* 老师端课程弹窗：请假 / 取消 切换 */
.teacher-cancel-mode-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}
.teacher-cancel-mode-label {
  flex-shrink: 0;
  font-weight: 600;
}
.teacher-cancel-mode-seg {
  display: inline-flex;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}
.teacher-cancel-mode-btn {
  border: 0;
  margin: 0;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--muted, #64748b);
}
.teacher-cancel-mode-btn.is-active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
}
.lesson-solo-remove-wrap .teacher-cancel-mode-row {
  margin-bottom: 14px;
}

.record-swipe-viewport {
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;
}

.record-swipe-track {
  display: flex;
  width: 300%;
  will-change: transform;
  /* 左右两栏不要强制等高：否则「已完课」条数少时会被「未来课程」撑出大块空白 */
  align-items: flex-start;
}

.record-swipe-pane {
  flex: 0 0 33.333333%;
  box-sizing: border-box;
  padding: 0 2px;
}

/* 供分页 observer 监听，避免 0 高度元素不触发 */
.record-feed-sentinel {
  min-height: 2px;
  width: 100%;
  pointer-events: none;
}

.record-line {
  margin-bottom: 10px;
}

.record-line-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.record-line-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.record-edit-btn {
  flex-shrink: 0;
}

/* 学员上课记录：点按打开与日历一致的课节弹窗 */
button.sl-lesson-row {
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.sl-lesson-row {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 10px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  position: relative;
  overflow: visible;
}
.sl-lesson-row:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}
.sl-lesson-row:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.sl-lesson-row--done {
  border-left: 3px solid #22c55e;
}
.sl-lesson-row--future {
  border-left: 3px solid #3b82f6;
}
.sl-lesson-row--student-leave {
  border-left: 3px solid #d97706;
  background: linear-gradient(180deg, #fffbeb 0%, #fefce8 100%);
}
.sl-lesson-row--student-leave:hover {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

/* 未来课程中的学员请假行：非按钮，不可点开完课弹窗 */
.sl-lesson-row.sl-lesson-row--display-only {
  cursor: default;
}
.sl-lesson-row.sl-lesson-row--display-only:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}
.sl-lesson-row__leave-reason {
  margin-top: 8px;
  line-height: 1.45;
  word-break: break-word;
}
.sl-lesson-row__time {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 6px;
  padding-right: 0.25rem;
}
.sl-lesson-row__meta {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.sl-lesson-row__title-line {
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
  word-break: break-word;
}
.sl-lesson-row__stamp {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.04em;
  pointer-events: none;
  transform: rotate(-12deg);
  transform-origin: right top;
  color: #9f1239;
  background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%);
  border: 1px solid rgba(244, 63, 94, 0.45);
  box-shadow: 0 1px 2px rgba(190, 18, 60, 0.12);
}
.sl-lesson-row--with-stamp .sl-lesson-row__time,
.sl-lesson-row--with-stamp .sl-lesson-row__meta,
.sl-lesson-row--with-stamp .sl-lesson-row__title-line {
  padding-right: 4rem;
}

.record-drawer--collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.38s ease, opacity 0.28s ease, margin 0.28s ease;
  margin-top: 0;
}

.record-line.is-open .record-drawer--collapsed {
  max-height: 720px;
  opacity: 1;
  margin-top: 10px;
}

.record-drawer-form .input,
.record-drawer-form .textarea {
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .container {
    padding: 20px;
  }

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

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

.student-card__row {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: nowrap;
  margin-bottom: 12px;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.student-card__row::-webkit-scrollbar {
  height: 4px;
}

.student-card__row::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.student-card {
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.28s ease;
}

.student-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(37, 99, 235, 0.06);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
  z-index: 0;
}

.student-card:hover::before,
.student-card:focus-visible::before {
  opacity: 1;
}

.student-card > * {
  position: relative;
  z-index: 1;
}

.student-card__name {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(40%, 200px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-card__row .student-meta {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  gap: 6px 8px;
  overflow-x: visible;
  overflow-y: visible;
}

.student-card__row .student-meta__chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.student-card__row .student-meta__chip--muted {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

.student-card__row .student-meta__chip--accent {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}

.student-card__row .student-meta__chip--danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.student-card__row .student-meta .badge {
  margin: 0;
  flex-shrink: 0;
}

.student-card__row .student-card__edit {
  flex: 0 0 auto;
  margin-left: auto;
}

.btn-ghost--sm {
  font-size: 0.82rem;
  padding: 4px 10px;
}

.student-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.student-meta::-webkit-scrollbar {
  height: 4px;
}

.student-meta::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.student-meta__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.student-meta__chip--muted {
  opacity: 0.85;
}

.student-meta__chip--accent {
  color: #166534;
  font-weight: 600;
}

.student-meta .badge {
  flex-shrink: 0;
}

.student-card__actions {
  margin-top: 4px;
}

.cal-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
}

.cal-nav-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 10px;
}

.cal-nav-cluster {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
}

.cal-nav-row .btn-ghost {
  min-width: 40px;
  font-size: 1rem;
  line-height: 1;
}

.cal-title-inline {
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  flex: 1 1 auto;
  min-width: 7em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 480px) {
  .cal-title-inline {
    font-size: 1rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}

/* Teacher dashboard: day timeline above calendar */
.day-timeline-shell {
  margin-bottom: 2px;
}

/* 预留高度，避免悬停提示出现/消失时整页跳动 */
.day-timeline-cursor-slot {
  position: relative;
  min-height: 30px;
  width: 100%;
  flex-shrink: 0;
}

.day-timeline-cursor-flyout {
  position: absolute;
  bottom: 2px;
  left: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: 100%;
  pointer-events: none;
  transform: translateX(-50%);
}

.day-timeline-cursor-flyout[hidden] {
  display: none !important;
}

.day-timeline-cursor-arrow {
  width: 0;
  height: 0;
  margin: 0 0 1px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid rgba(148, 163, 184, 0.75);
  filter: drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.6));
}

.day-timeline-cursor-label {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #64748b;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 5px;
  padding: 2px 7px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
}

.day-timeline-title {
  margin: 0 0 2px;
  font-size: 1.05rem;
}

.day-timeline-hint {
  margin: 0 0 10px;
}

.day-timeline-head {
  position: relative;
  z-index: 0;
}

.day-timeline-scroll {
  position: relative;
  z-index: 10;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -6px;
  padding: 0 6px 6px;
}

.day-timeline-outer {
  min-width: calc(var(--timeline-cols, 14) * 40px);
  --timeline-lanes: 1;
  --timeline-cols: 14;
}

.day-timeline-ruler {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.day-timeline-ruler__inner {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  min-height: 26px;
  align-items: end;
}

.day-timeline-ruler__cell {
  border-left: 1px solid #e2e8f0;
  padding: 2px 0 4px 4px;
  font-size: 10px;
  color: #94a3b8;
  box-sizing: border-box;
}

.day-timeline-ruler__cell:first-child {
  border-left: 0;
  padding-left: 2px;
}

.day-timeline-ruler__label {
  white-space: nowrap;
}

.day-timeline-track {
  position: relative;
  z-index: 2;
  min-height: calc(16px + var(--timeline-lanes, 1) * 44px + 8px);
  background-color: #f8fafc;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(100% / var(--timeline-cols, 14) - 1px),
    rgba(226, 232, 240, 0.95) calc(100% / var(--timeline-cols, 14) - 1px),
    rgba(226, 232, 240, 0.95) calc(100% / var(--timeline-cols, 14))
  );
  border-radius: 0 0 10px 10px;
}

.day-timeline-drag-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: crosshair;
  touch-action: none;
}

.day-timeline-drag-layer--pause {
  cursor: cell;
}

.day-timeline-selection-rubber {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 0;
  box-sizing: border-box;
  border-radius: 6px;
  pointer-events: none;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(37, 99, 235, 0.45);
}

.day-timeline-selection-rubber--pause {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(217, 119, 6, 0.55);
}

body.day-timeline-dragging {
  user-select: none;
}

.day-timeline-blocks {
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  pointer-events: none;
}

.day-timeline-blocks .day-timeline__block {
  pointer-events: auto;
}

.day-timeline-blocks .day-timeline-empty {
  pointer-events: none;
}

.tl-drag-modal-card {
  max-width: 380px;
}

.tl-drag-modal-card--pause {
  border-color: rgba(251, 191, 36, 0.35);
}

.tl-drag-modal-range {
  line-height: 1.45;
}

.tl-drag-modal-err {
  margin: 0;
  font-size: 13px;
  color: #b91c1c;
}

.tl-drag-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.day-timeline-blocks--empty {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-timeline-empty {
  margin: 0;
  text-align: center;
}

.day-timeline__block {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  height: auto;
  margin: 0;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  overflow: visible;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.day-timeline__block-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.28;
  word-break: break-word;
  text-align: center;
}

/* 已完课但有开通学员端反馈的学员未写反馈 */
.day-timeline__feedback-stamp {
  position: absolute;
  left: 3px;
  top: 3px;
  z-index: 2;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
  pointer-events: none;
  transform: rotate(-10deg);
  transform-origin: left top;
}
.day-timeline__feedback-stamp--pending {
  color: #9f1239;
  background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%);
  border: 1px solid rgba(244, 63, 94, 0.45);
  box-shadow: 0 1px 2px rgba(190, 18, 60, 0.12);
}
.day-timeline__block--feedback-pending .day-timeline__block-label {
  padding-top: 10px;
}

/* 挂到 body 的固定层，避免被 .day-timeline-scroll / .cal-wrap 的 overflow 裁切 */
.day-timeline-tooltip-portal {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483645;
  width: max-content;
  max-width: min(260px, 92vw);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-100% - 14px)) translateY(4px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.day-timeline-tooltip-portal--open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, calc(-100% - 8px)) translateY(0);
}

/* 简约面板：细线、轻阴影，无漫画尖角 */
.day-timeline-tooltip-portal .day-timeline__bubble-inner {
  position: relative;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.45;
  color: #334155;
  text-align: left;
  box-shadow:
    0 4px 16px rgba(15, 23, 42, 0.08),
    0 1px 2px rgba(15, 23, 42, 0.04);
}

.day-timeline-tooltip-portal .day-timeline__bubble-inner::before,
.day-timeline-tooltip-portal .day-timeline__bubble-inner::after {
  display: none;
}

.day-timeline-tooltip-portal .day-timeline__bubble-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: baseline;
  margin-bottom: 4px;
}

.day-timeline-tooltip-portal .day-timeline__bubble-row:last-child {
  margin-bottom: 0;
}

.day-timeline-tooltip-portal .day-timeline__bubble-k {
  font-weight: 500;
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}

.day-timeline-tooltip-portal .day-timeline__bubble-v {
  word-break: break-word;
  font-weight: 500;
  color: #334155;
}

.day-timeline__block:hover,
.day-timeline__block:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
  z-index: 19990;
  outline: none;
}

.day-timeline__block--todo {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e3a8a;
}

.day-timeline__block--done {
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  color: #14532d;
}

.day-timeline__block--pause {
  background: #e5e7eb;
  color: #4b5563;
}

@media (hover: none) {
  .day-timeline-tooltip-portal {
    display: none !important;
  }
}

.pending-leaves-workbench-backdrop.modal-backdrop {
  z-index: 80;
  background: rgba(15, 23, 42, 0.48);
}

.pending-leaves-workbench-panel.modal {
  z-index: 81;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.pending-leaves-workbench-card {
  width: 100%;
  max-width: 520px;
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  border-radius: 16px;
}

.pending-leaves-workbench-intro {
  margin: 0 0 14px;
  line-height: 1.5;
  flex-shrink: 0;
}

.pending-leaves-workbench-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
}

.pending-leave-card {
  flex-shrink: 0;
  padding: 14px 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.08);
}

.pending-leave-card__meta {
  font-size: 0.88rem;
  font-weight: 600;
  color: #451a03;
  line-height: 1.45;
  margin-bottom: 10px;
}

.pending-leave-card .teacher-sl-modal__quote {
  margin-bottom: 10px;
}

.pending-leave-card .teacher-sl-modal__chips {
  margin-bottom: 8px;
}

.pending-leave-card .textarea {
  margin-bottom: 8px;
}

.pending-leave-card__submit {
  margin-top: 4px;
  width: 100%;
}

body.pending-leaves-workbench-open {
  overflow: hidden;
}

.teacher-sl-modal__quote {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.teacher-sl-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.teacher-sl-modal__chip {
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.teacher-sl-modal__chip:hover {
  background: var(--accent-soft);
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.teacher-sl-modal__err {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--danger);
}

.pending-leave-card__err {
  margin-top: 8px !important;
}

.student-portal-teacher-reply {
  font-size: 0.82rem;
  color: #1e40af;
  margin-top: 8px;
  line-height: 1.45;
  padding: 8px 10px;
  background: rgba(37, 99, 235, 0.06);
  border-radius: 8px;
  word-break: break-word;
}

.cal-timeline-sep {
  height: 1px;
  background: linear-gradient(90deg, #3b82f6 0, #3b82f6 40px, var(--line) 40px, var(--line) 100%);
  margin: 14px 0 12px;
  border: 0;
}

/* 工作台排课：重名学员的账号/ID 用小徽章与姓名区分 */
.student-checklist {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  max-height: 180px;
  overflow: auto;
  margin-bottom: 12px;
}

.student-check-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed #eef2f7;
}

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

.student-check-item__label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.student-check-item__name {
  font-weight: 600;
  color: #0f172a;
}

.student-check-item__acct {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: #475569;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  padding: 2px 9px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.05);
}

.student-check-item__acct--id {
  color: #64748b;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  border-color: rgba(161, 161, 170, 0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
}

.day-agenda--fadein {
  animation: dayAgendaFadeIn 0.45s ease forwards;
}

@keyframes dayAgendaFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cal-cell--picked {
  outline: 2px solid #2563eb;
  outline-offset: -1px;
  background: #f0f7ff !important;
}

.cal-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.cal-schedule-hit {
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: #1d4ed8;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.15);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.28s ease, box-shadow 0.25s ease, background 0.2s ease;
  pointer-events: none;
}

.cal-cell.hover-add .cal-schedule-hit {
  opacity: 1;
  pointer-events: auto;
}

.cal-cell.hover-add .cal-schedule-hit:hover {
  background: #bfdbfe;
}

@media (hover: none) {
  .cal-schedule-hit {
    opacity: 0.22;
    pointer-events: auto;
    transition: opacity 0.28s ease;
  }

  .cal-cell:active .cal-schedule-hit,
  .cal-cell.hover-add .cal-schedule-hit {
    opacity: 1;
  }
}

.day-agenda {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-agenda__empty {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.day-agenda__row {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.day-agenda__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  box-sizing: border-box;
}

.day-agenda__main--done {
  background: #ecfdf5;
  color: #166534;
}

.day-agenda__main--todo {
  background: #eff6ff;
  color: #1e40af;
}

.day-agenda__chev {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}

.day-agenda__row.is-open .day-agenda__chev {
  transform: rotate(90deg);
}

.day-agenda__sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  opacity: 0;
  border-top: 1px dashed var(--line);
}

.day-agenda__sub:not(.day-agenda__sub--hidden) {
  grid-template-rows: 1fr;
  opacity: 1;
}

.day-agenda__sub-inner {
  overflow: hidden;
  min-height: 0;
}

.day-agenda__member {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.day-agenda__member:last-child {
  border-bottom: 0;
}

.day-agenda__drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.32s ease;
  opacity: 0;
  background: #fafbfc;
  border-top: 1px dashed var(--line);
}

.day-agenda__drawer.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.day-agenda__drawer-inner {
  overflow: hidden;
  min-height: 0;
}

.day-agenda__drawer-inner .record-drawer-form {
  padding: 10px 12px 12px;
}

.day-agenda__group-choice {
  padding: 10px 12px;
  border-top: 1px dashed var(--line);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.day-agenda__group-choice--hidden {
  display: none;
}

.day-agenda__bulk {
  padding: 10px 12px 12px;
  border-top: 1px dashed var(--line);
  background: #fafbfc;
}

.day-agenda__bulk--hidden {
  display: none;
}

.day-agenda__notes-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.day-agenda__notes-toggle:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.day-agenda__notes-chev {
  color: var(--muted);
  font-size: 0.9rem;
}

.day-agenda__notes-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.38s ease, opacity 0.28s ease, margin-top 0.28s ease;
  margin-top: 0;
}

.day-agenda__notes-panel.is-open {
  max-height: 28rem;
  opacity: 1;
  margin-top: 8px;
}

.day-agenda__notes-panel .label:first-child {
  margin-top: 0;
}

.settings-public-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s ease, opacity 0.3s ease, margin 0.3s ease;
  margin: 0;
  padding: 0;
}

.settings-public-panel.is-open {
  max-height: 480px;
  opacity: 1;
  margin-top: 10px;
  padding-top: 4px;
}

.booking-window-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 55%, #eff6ff 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.booking-window-card__time {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
}

.booking-window-card__date {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.booking-window-list--cards {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.booking-window-list--cards li {
  margin: 0;
}

.weekday-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 4px;
}

.weekday-check-grid .check-row {
  margin: 0;
}

.self-booking-preview-slots {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.self-booking-preview-slots li {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 500;
}

.settings-inline-modal {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.settings-inline-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.settings-rules-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-rules-head__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.settings-footer-save {
  margin: 14px 0 20px;
  display: flex;
  justify-content: flex-end;
}

.booking-window-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weekday-check-wrap {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.22s ease;
}

.weekday-check-wrap.is-open {
  max-height: 180px;
  opacity: 1;
}

.settings-date-wrap {
  max-height: 120px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.22s ease, margin 0.22s ease;
}

.settings-date-wrap.is-hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.schedule-datetime-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 640px) {
  .schedule-datetime-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .schedule-datetime-row > div {
    flex: 1;
    min-width: 140px;
  }
}

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

.student-list-toolbar {
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  justify-content: flex-start;
  row-gap: 12px;
}

.student-list-toolbar__search {
  flex: 1 1 auto;
  min-width: min(100%, 200px);
  max-width: min(100%, 440px);
}

.student-list-toolbar__sort {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}

.student-list-search {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  font-size: 0.875rem;
  border-radius: 10px;
}

/* 搜索 + 排序同一行：右侧排序组贴齐该行末尾 */
@media (min-width: 640px) {
  .student-list-toolbar {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .student-list-toolbar__search {
    max-width: 440px;
  }
}

.student-sort-bar__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.student-sort-bar__cluster {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  vertical-align: middle;
  padding: 3px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.student-sort-bar__field {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
  min-width: 7.25rem;
  max-width: 42vw;
  padding: 8px 32px 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.25;
  border: 0;
  border-radius: 9px 0 0 9px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  box-sizing: border-box;
}

.student-sort-bar__field:hover {
  background-color: #f8fafc;
}

.student-sort-bar__field:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35);
  position: relative;
  z-index: 1;
}

.student-sort-bar__order {
  margin: 0;
  padding: 0 14px;
  min-width: 3.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.25;
  border: 0;
  border-radius: 0 9px 9px 0;
  border-left: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.student-sort-bar__order:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.student-sort-bar__order:active {
  background: #dbeafe;
}

.student-sort-bar__order:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  z-index: 1;
}

@media (max-width: 639px) {
  .student-list-toolbar__sort {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .student-sort-bar__cluster {
    flex: 1 1 auto;
    justify-content: stretch;
    min-width: 0;
  }
  .student-sort-bar__field {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }
}

.student-list-pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 0;
  background: none;
  border: none;
}

.student-list-pager__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 12px;
}

.student-list-pager__nums {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.student-list-pager__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 6px 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

a.student-list-pager__link:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.student-list-pager__link--current {
  background: #fff;
  color: #0f172a;
  border-color: #cbd5e1;
  font-weight: 600;
  cursor: default;
}

.student-list-pager__nav {
  min-width: auto;
  padding: 6px 14px;
}

.student-list-pager__gap {
  padding: 0 4px;
  color: var(--muted);
  user-select: none;
}

.student-list-pager__meta {
  margin: 0;
  text-align: center;
}

/* 兼容旧类名（若其它模板仍有引用） */
.student-sort-controls {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
}

.student-sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.student-sort-wrap__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.student-sort-seg {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.student-sort-seg__sep {
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, #cbd5e1, transparent);
  margin: 0 4px;
  flex-shrink: 0;
}

.student-sort-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.student-sort-pill:hover {
  background: #fff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.student-sort-pill.is-active {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border-color: #93c5fd;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
}

.student-sort-pill__arr {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.9;
}

.day-agenda__main--pause {
  background: #f3f4f6;
  color: #4b5563;
}

.remove-tags-label {
  margin-bottom: 6px;
}

.remove-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.remove-tag-pill {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.remove-tag-pill:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.remove-reason-label {
  margin-top: 2px;
  margin-bottom: 6px;
}

.remove-reason-input {
  margin-bottom: 10px;
}

@media (max-width: 520px) {
  .cal-cell {
    padding: 6px 5px 8px;
    min-height: 100px;
    overflow: visible;
  }

  .cal-day-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 2px;
  }

  .cal-day {
    font-size: 11px;
    line-height: 1.2;
  }

  .cal-schedule-hit {
    align-self: stretch;
    text-align: center;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 5px 8px;
    font-size: 10px;
  }

  .cal-events {
    margin-top: 6px;
  }
}

@media (max-width: 640px) {
  .student-card__row {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 6px;
  }

  .student-card__name {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 80px);
    font-size: 0.92rem;
  }

  .student-card__row .student-meta {
    flex: 1 1 100%;
    flex-wrap: wrap;
    max-width: 100%;
    row-gap: 6px;
    column-gap: 6px;
  }

  .student-card__row .student-meta__chip,
  .student-card__row .student-meta .badge {
    font-size: 0.65rem;
    padding: 3px 7px;
  }

  .student-card__row .student-card__edit {
    margin-left: auto;
    flex-shrink: 0;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 40;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal[hidden] {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
  border-radius: 16px 16px 0 0;
}

@media (min-width: 640px) {
  .modal {
    align-items: center;
  }

  .modal-card {
    border-radius: 16px;
  }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Teacher lesson workspace: _lesson_workspace_modals.html + teacher_lesson_workspace.js (dashboard & 学员上课记录) */
.lesson-action-head {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
}

.lesson-action-head__text {
  flex: 1;
  min-width: 0;
}

.lesson-action-members {
  color: #64748b;
  line-height: 1.4;
}

.btn-ghost--blue {
  color: #1d4ed8;
  border-color: #bfdbfe;
  flex-shrink: 0;
}

.btn-ghost.fade-out {
  opacity: 0;
  transition: opacity 0.18s ease;
}

#seriesScopeBackdrop {
  z-index: 54;
}

#seriesScopeModal {
  z-index: 55;
}

.workspace-message-backdrop {
  z-index: 65;
  background: rgba(15, 23, 42, 0.45);
}

.workspace-message-modal {
  z-index: 66;
}

.workspace-message-card {
  max-width: 380px;
  width: calc(100vw - 32px);
  position: relative;
  overflow: hidden;
}

.workspace-message-card__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  border-radius: 2px 0 0 2px;
}

.workspace-message-card__accent--ok {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.workspace-message-card--success {
  border: 1px solid #bbf7d0;
  background: linear-gradient(155deg, #f0fdf4 0%, #ffffff 52%, #fafafa 100%);
  box-shadow: 0 16px 48px rgba(22, 163, 74, 0.14);
}

.workspace-message-card--success .workspace-message-card__title {
  color: #166534;
  letter-spacing: 0.02em;
}

.workspace-message-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 10px;
}

.workspace-message-card__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #22c55e, #16a34a);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.workspace-message-body {
  margin: 0 0 16px;
  line-height: 1.55;
  color: #334155;
  font-size: 0.95rem;
}

.workspace-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 添加学员：标签间距、选中态、底部按钮行 */
.add-student-intro {
  margin: 0 0 10px;
}

.add-student-search {
  margin-bottom: 10px;
}

.add-student-selection-hint {
  display: block;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.45;
}

.add-student-selection-hint--on {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  border-color: #93c5fd;
  color: #1e3a8a;
  font-weight: 500;
}

.add-student-pick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
}

.add-student-pick-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0;
  border-radius: 999px;
  font-size: 0.9rem;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.add-student-pick-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-student-pick-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #2563eb;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.add-student-pick-item.is-active {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  color: #1e3a8a;
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
}

.add-student-pick-item.is-active .add-student-pick-check {
  opacity: 1;
  transform: scale(1);
}

.add-student-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.add-student-actions .btn,
.add-student-actions .btn-ghost {
  flex: 1 1 auto;
  min-width: 120px;
}

@media (max-width: 420px) {
  .add-student-actions {
    flex-direction: column;
  }
  .add-student-actions .btn,
  .add-student-actions .btn-ghost {
    width: 100%;
    min-width: 0;
  }
}

.add-student-empty {
  margin: 0;
  padding: 8px 4px;
}

.completed-remove-backdrop {
  z-index: 56;
  background: rgba(15, 23, 42, 0.45);
}

.completed-remove-modal {
  z-index: 57;
}

.dash-fb-portal-backdrop {
  z-index: 58;
}

.dash-fb-portal-modal {
  z-index: 59;
}

.dash-fb-member-backdrop {
  z-index: 60;
  background: rgba(15, 23, 42, 0.4);
}

.dash-fb-member-modal {
  z-index: 61;
}

.dash-fb-member-modal-card {
  max-width: 460px;
  max-height: 85vh;
  overflow: auto;
}

.dash-fb-mode-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 6px 0 12px;
}

.dash-fb-mode-tab {
  border: 0;
  background: transparent;
  padding: 8px 16px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.dash-fb-mode-tab.is-active {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
  font-weight: 600;
}

.dash-fb-panels-viewport {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
  margin-top: 2px;
}

.dash-fb-panels-track {
  display: flex;
  width: 200%;
  transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.dash-fb-panels-track--show-per {
  transform: translate3d(-50%, 0, 0);
}

.dash-fb-panel {
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  box-sizing: border-box;
  min-width: 0;
}

.dash-fb-panel--unified .stack,
.dash-fb-panel--per .dash-fb-per-panel {
  min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  .dash-fb-panels-track {
    transition: none;
  }
}

.dash-fb-member-strip-wrap {
  margin-top: 6px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.dash-fb-member-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  min-height: 0;
}

.dash-fb-member-chip {
  flex: 0 0 auto;
  width: 112px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
  box-sizing: border-box;
}

.dash-fb-member-chip--done {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.dash-fb-member-chip__name {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
  cursor: pointer;
  padding: 0;
  margin: 0 0 8px;
  line-height: 1.3;
}

.dash-fb-member-chip__meta {
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.dash-fb-member-chip__state {
  color: #64748b;
  line-height: 1.2;
}

.dash-fb-member-chip--done .dash-fb-member-chip__state {
  color: #047857;
  font-weight: 600;
}

.dash-fb-member-chip__fb.btn {
  padding: 5px 12px;
  font-size: 11px;
  border-radius: 8px;
  width: 100%;
}

.dash-fb-member-chip__fb.dash-fb-member-chip__fb--done {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #86efac !important;
  font-weight: 600;
}

.dash-fb-member-chip__change {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
}

.dash-fb-member-chip__change[hidden] {
  display: none !important;
}

.dash-fb-member-modal-actions {
  margin-top: 12px;
}

.completed-remove-card {
  position: relative;
  max-width: 420px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28);
  border: 1px solid #e2e8f0;
}

.completed-remove-card__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
}

.completed-remove-card__head {
  padding-left: 18px;
}

.completed-remove-card__title {
  margin: 0;
  font-size: 1.15rem;
}

.completed-remove-card__subtitle {
  margin: 2px 0 0;
}

.completed-remove-card__body {
  margin: 0 0 20px;
  padding-left: 18px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #334155;
}

.completed-remove-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-left: 18px;
}

.btn--danger-solid {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.35);
}

.btn--danger-solid:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}

.btn--danger-solid:active {
  filter: brightness(0.96);
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.3);
}

.btn--danger-solid:focus-visible {
  outline: 2px solid #fca5a5;
  outline-offset: 2px;
}

.lesson-action-card .lesson-action-tag {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.lesson-action-tag--todo {
  background: #dbeafe;
  color: #1d4ed8;
}

.lesson-action-tag--done {
  background: #dcfce7;
  color: #166534;
}

.lesson-action-tag--pause {
  background: #e5e7eb;
  color: #4b5563;
}

.lesson-action-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.lesson-action-summary__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 14px;
}

.lesson-action-summary__row .muted {
  min-width: 2.5em;
}

.lesson-mode-panel {
  margin-bottom: 8px;
}

.lesson-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.btn-ghost--sm {
  font-size: 12px;
  padding: 5px 10px;
}

.lesson-action-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.lesson-group-extras {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.lesson-sub-panel {
  margin-top: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.lesson-sub-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lesson-reschedule-flow {
  padding-top: 4px;
}

.lesson-complete-form .btn {
  margin-top: 4px;
}

.dash-completed-group-feedback .dash-per-member-fb-form {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.dash-completed-group-feedback .dash-per-member-fb-form:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.complete-fb-mode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.lesson-primary-head {
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.lesson-other-ops-label {
  margin: 14px 0 6px;
  font-weight: 600;
  color: #475569;
}

.lesson-primary-inner {
  position: relative;
  transition:
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
}

.lesson-primary-inner--leaving {
  opacity: 0;
  transform: translateY(-10px);
}

.lesson-primary-inner--entering {
  animation: lessonPrimaryInnerEnter 0.42s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes lessonPrimaryInnerEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.lesson-primary-stage {
  overflow: hidden;
  border-radius: 10px;
  transition: min-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.lesson-primary-stage--pulse {
  animation: lessonStagePulse 0.48s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes lessonStagePulse {
  0% {
    opacity: 0.75;
    transform: scale(0.992);
  }

  60% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.lesson-action-card--wide {
  max-width: min(580px, 96vw) !important;
}

.lesson-sec-btn.is-active {
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  font-weight: 600;
}

.lesson-flow--in {
  animation: lessonFlowIn 0.34s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.lesson-flow--out {
  animation: lessonFlowOut 0.26s ease both;
}

@keyframes lessonFlowIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lessonFlowOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.97;
  }
}

.lesson-remove-sanctuary {
  display: none !important;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: 0;
  pointer-events: none;
}

.pause-remove-slot {
  margin-top: 4px;
}

.tox-tinymce {
  margin-top: 4px !important;
  border-radius: 10px !important;
}

.lesson-feedback--rich .tox-tinymce {
  min-height: 320px;
}

/* 已保存反馈：只读预览（点击「编辑反馈」后再出现编辑器） */
.dash-fb-readonly-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-fb-rendered-content.lesson-feedback-rendered {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  line-height: 1.55;
  color: #1e293b;
  min-height: 120px;
  max-height: min(360px, 48vh);
  overflow: auto;
  word-break: break-word;
}

.dash-fb-rendered-content.lesson-feedback-rendered--plain {
  white-space: pre-wrap;
}

.dash-fb-rendered-content.lesson-feedback-rendered img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.dash-fb-rendered-content.lesson-feedback-rendered a {
  color: #2563eb;
  text-decoration: underline;
}

.dash-fb-rendered-content.lesson-feedback-rendered p {
  margin: 0 0 0.5em;
}

.dash-fb-rendered-content.lesson-feedback-rendered p:last-child {
  margin-bottom: 0;
}

.group-remove-hint {
  margin: 0 0 8px;
  line-height: 1.45;
}

.group-remove-whole-slot-card {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-remove-whole-slot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.group-remove-whole-label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.group-remove-whole-input {
  flex: 1 1 140px;
  min-width: 0;
  margin: 0 !important;
  padding: 7px 10px !important;
  height: 36px !important;
  min-height: 36px !important;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 1.25;
}

.group-remove-whole-tags-row {
  align-items: center;
  gap: 6px;
}

.group-remove-whole-tag-label {
  margin: 0 !important;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.group-whole-slot-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 !important;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.group-whole-slot-tag-pills .remove-tag-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  line-height: 1.35;
}

.group-whole-slot-tag-pills .remove-tag-pill:hover {
  background: #dbeafe;
}

.group-remove-whole-btn {
  width: 100%;
  margin: 2px 0 0 !important;
  padding: 9px 12px !important;
  font-size: 14px;
  min-height: 42px;
  line-height: 1.25;
}

.group-remove-solo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}

.group-remove-solo-title {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.group-remove-solo-search {
  flex: 1;
  min-width: 140px;
  max-width: 240px;
}

.group-remove-solo-search .input {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.group-remove-student-list-outer {
  margin-top: 0;
}

.group-remove-student-list-outer--scroll {
  max-height: min(136px, 38vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  margin-right: -2px;
  border-radius: 10px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.group-remove-student-list-outer--scroll::-webkit-scrollbar {
  width: 6px;
}

.group-remove-student-list-outer--scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}

.group-remove-student-list {
  margin-top: 0;
}

.group-remove-student-strip {
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.group-remove-student-strip:last-child {
  margin-bottom: 0;
}

.group-remove-strip-form {
  margin: 0;
}

.group-remove-strip-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.group-remove-strip-line .group-remove-student-name {
  flex: 0 0 auto;
  max-width: 5.5em;
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-remove-strip-line .group-remove-quick-hint {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.group-remove-strip-line .group-remove-row-tag-pills {
  flex: 1 1 auto;
  min-width: 48px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  margin: 0;
  overflow-x: auto;
  max-width: min(200px, 38vw);
}

.group-remove-strip-line .group-remove-row-tag-pills .remove-tag-pill {
  flex-shrink: 0;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.group-remove-strip-line .group-remove-row-tag-pills .remove-tag-pill:hover {
  background: #dbeafe;
}

.group-remove-strip-line .group-remove-reason-input {
  flex: 0 0 88px;
  width: 88px;
  max-width: 88px;
  min-width: 72px;
  margin: 0;
  box-sizing: border-box;
  font-size: 13px;
}

.group-remove-strip-line .group-remove-cancel-btn {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.group-whole-slot-tag-pills {
  margin-top: 2px;
}

@media (max-width: 400px) {
  .group-remove-strip-line .group-remove-row-tag-pills {
    max-width: min(120px, 32vw);
  }

  .group-remove-strip-line .group-remove-reason-input {
    flex: 0 0 76px;
    width: 76px;
    max-width: 76px;
  }
}

.package-modal-backdrop {
  z-index: 44;
}

.package-modal {
  z-index: 45;
}

.package-modal-card {
  max-width: 420px;
}

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

/* 设置页：暂停约课添加成功 */
.pause-added-success-backdrop {
  z-index: 48;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.pause-added-success-modal {
  z-index: 49;
}

.pause-added-success-card {
  max-width: 400px;
  margin: 0 16px 24px;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  background: #fff;
}

@media (min-width: 640px) {
  .pause-added-success-card {
    margin: 0;
  }
}

.pause-added-success-card__hero {
  padding: 28px 24px 20px;
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 42%, #a7f3d0 100%);
  text-align: center;
}

.pause-added-success-card__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #059669;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.2);
}

.pause-added-success-card__icon {
  display: block;
}

.pause-added-success-card__body {
  padding: 22px 24px 24px;
}

.pause-added-success-card__title {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  text-align: center;
}

.pause-added-success-card__lead {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #334155;
  text-align: center;
}

.pause-added-success-card__hint {
  margin: 0 0 22px;
  line-height: 1.6;
  text-align: center;
}

.pause-added-success-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pause-added-success-card__primary {
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border: 1px solid #047857;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.pause-added-success-card__primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.pause-added-success-card__secondary {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  color: #64748b;
}

.btn-package-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-package-add:hover {
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.btn-package-add:active {
  transform: scale(0.98);
}

.package-pending-hint {
  margin-top: 8px !important;
}

.package-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.ledger-stats-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-align: left;
}

.ledger-stats-btn__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1d4ed8;
  letter-spacing: 0.02em;
}

.ledger-stats-btn__nums {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.ledger-stats-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.ledger-stats-btn--disabled {
  cursor: default;
  opacity: 0.75;
}

.ledger-stats-btn--disabled:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.ledger-stats-btn--disabled .ledger-stats-btn__kicker {
  color: #64748b;
}

.ledger-modal-card {
  max-width: min(720px, 100vw);
}

.ledger-pkg-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ledger-pkg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.ledger-pkg-table th,
.ledger-pkg-table td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.ledger-pkg-table th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--muted);
}

.ledger-pkg-table tr:last-child td {
  border-bottom: 0;
}

.input--table {
  min-width: 0;
  width: 100%;
  max-width: 120px;
  padding: 6px 8px;
  font-size: 0.8rem;
}

.input--datetime {
  max-width: 168px;
}

.ledger-col-drag {
  width: 36px;
}

.ledger-col-actions {
  width: 76px;
  text-align: right;
  white-space: nowrap;
}

.ledger-pkg-del-btn {
  padding: 4px 8px;
  font-size: 0.76rem;
}

.ledger-drag-cell {
  text-align: center;
  vertical-align: middle;
  cursor: grab;
  user-select: none;
  color: #94a3b8;
}

.ledger-drag-handle {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -2px;
}

.ledger-pkg-row--drag {
  opacity: 0.55;
}

.portal-self-booking-row,
.portal-self-leave-row {
  flex-wrap: wrap;
  align-items: center;
}

.portal-inline-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.input--inline-num {
  width: 4.25rem;
  min-height: 40px;
  padding: 8px 10px;
  text-align: center;
}

.settings-welcome-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.announcement-wall__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.announcement-preview {
  line-height: 1.55;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.announcement-preview img,
.legal-page__body img {
  display: block;
  width: auto;
  max-width: min(100%, 760px);
  height: auto;
  margin: 12px auto;
  border-radius: 12px;
  object-fit: contain;
}

.announcement-preview video,
.announcement-preview iframe,
.legal-page__body video,
.legal-page__body iframe {
  display: block;
  max-width: 100%;
  margin: 12px auto;
  border-radius: 12px;
}

.platform-card {
  border-radius: 14px;
}

.platform-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.platform-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 500;
}

.platform-tag--blue {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.platform-msg-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.platform-msg-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.platform-msg-item--teacher {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.platform-msg-item--admin {
  border-color: #c7f9cc;
  background: #f0fdf4;
}

.platform-msg-item__meta {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 4px;
}

.platform-msg-item__body {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 0.92rem;
}

.platform-msg-reply {
  margin-top: 8px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 8px;
  background: #f8fafc;
  border-radius: 8px;
  padding-left: 8px;
  padding-right: 8px;
  padding-bottom: 8px;
}

.platform-chat-scroll {
  max-height: 48vh;
  overflow: auto;
  padding-right: 4px;
}

.platform-message-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.platform-fab-message {
  position: static;
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.booking-window-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.booking-window-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
}

.booking-window-list__item:last-child {
  border-bottom: 0;
}

.strong-flash-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.strong-flash-card {
  width: 100%;
  max-width: 420px;
  padding: 18px 16px;
}

.strong-flash-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 0.95rem;
  color: var(--text);
}

.settings-quick-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bookable-day-block {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.bookable-day-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.bookable-day-title {
  font-size: 1rem;
  margin: 0 0 8px;
}

.bookable-slot-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.bookable-slot-list li {
  font-size: 0.9rem;
}

.ledger-rem-cell {
  font-weight: 600;
  color: #166534;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* —— 续费拦截页 —— */
body.renewal-gate {
  background: linear-gradient(160deg, #e8f0ff 0%, #f8fafc 42%, #eef2ff 100%);
  min-height: 100vh;
}

body.renewal-gate .topbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.renewal-gate__wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 16px 48px;
}

.renewal-gate__card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 26px 24px;
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.renewal-gate__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.renewal-gate__title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.renewal-gate__lead {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.55;
}

.renewal-gate__email {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: #475569;
  font-family: ui-monospace, monospace;
  word-break: break-all;
}

.renewal-gate__body {
  padding: 14px 0 4px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}

.renewal-gate__actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-start;
}

.renewal-gate__actions--split {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.renewal-gate__redeem-toggle {
  font-weight: 600;
}

.renewal-gate__redeem-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.renewal-gate__redeem-form {
  gap: 10px;
}

.renewal-gate__redeem-form .btn {
  margin-top: 4px;
  align-self: flex-start;
}

/* —— 管理员首页 —— */
.admin-dash__hero {
  margin-bottom: 1.25rem;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-dash__title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-dash__lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.admin-metrics {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid rgba(191, 219, 254, 0.85);
  background:
    radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.1), transparent 32%),
    linear-gradient(145deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
}

.admin-metrics__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-metrics__title {
  margin: 0 0 5px;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-metrics__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.admin-metrics__ranges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.admin-metrics__range {
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(255, 255, 255, 0.82);
  color: #475569;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-metrics__range.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.admin-metrics__cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-metrics__stat {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.admin-metrics__stat--muted {
  background: rgba(248, 250, 252, 0.78);
}

.admin-metrics__stat-label,
.admin-metrics__stat-hint {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.admin-metrics__stat-value {
  display: block;
  margin: 5px 0 4px;
  color: #0f172a;
  font-size: 1.38rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.admin-metrics__chart-wrap {
  position: relative;
  height: 260px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.admin-dash__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.admin-dash__tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.admin-dash__tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
}

.admin-dash__tile--highlight {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(145deg, #fff, #f0f7ff);
}

.admin-dash__tile-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.admin-dash__tile-title {
  font-weight: 600;
  font-size: 1.02rem;
}

.admin-dash__tile-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.admin-dash__logout {
  margin-top: 8px;
}

.admin-code-inline {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 8px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 0.78rem;
  word-break: break-all;
}

@media (max-width: 900px) {
  .admin-metrics__head {
    flex-direction: column;
  }

  .admin-metrics__ranges {
    justify-content: flex-start;
  }

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

@media (max-width: 560px) {
  .admin-metrics {
    padding: 14px;
  }

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

  .admin-metrics__chart-wrap {
    height: 230px;
  }
}

/* —— 超级管理员数据总览 —— */
.page-head__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.super-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.super-data-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.super-data-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.super-data-tile__label {
  font-weight: 600;
  font-size: 0.95rem;
}

.super-data-tile__slug {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.super-data-table-wrap {
  padding: 0;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* —— 管理端：平台留言聊天气泡 + 可滚动 —— */
.admin-pm-chat-wrap {
  max-height: min(42vh, 360px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-pm-thread {
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 12px;
}

.admin-pm-thread:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.admin-pm-thread-head {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.admin-pm-thread-bubbles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.chat-bubble {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
}

.chat-bubble__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  opacity: 0.85;
}

.chat-bubble__text {
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble--them {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.chat-bubble--them .chat-bubble__label {
  color: #64748b;
}

.chat-bubble--me {
  align-self: flex-end;
  background: linear-gradient(145deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1px solid #86efac;
  border-top-right-radius: 4px;
  box-shadow: 0 1px 2px rgba(22, 101, 52, 0.08);
}

.chat-bubble--me .chat-bubble__label {
  color: #166534;
  text-align: right;
}

.admin-pm-reply-form {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.admin-pm-reply-input {
  flex: 1 1 200px;
  min-height: 44px;
  resize: vertical;
}

/* —— 管理端：平台留言（类微信左右分栏） —— */
.admin-pm-wechat {
  display: flex;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  height: min(72vh, 640px);
  min-height: 420px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

.admin-pm-wechat__sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #f7f7f7;
  border-right: 1px solid var(--line);
}

.admin-pm-wechat__sidebar-head {
  flex-shrink: 0;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--line);
  background: #f0f0f0;
}

.admin-pm-wechat__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-pm-wechat__empty {
  padding: 16px 14px;
  margin: 0;
  font-size: 0.85rem;
}

.admin-pm-wechat__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.admin-pm-wechat__item:hover {
  background: #ededed;
}

.admin-pm-wechat__item.is-active {
  background: #07c160;
  color: #fff;
}

.admin-pm-wechat__item.is-active .muted,
.admin-pm-wechat__item.is-active .admin-pm-wechat__item-time,
.admin-pm-wechat__item.is-active .admin-pm-wechat__item-account,
.admin-pm-wechat__item.is-active .admin-pm-wechat__item-snippet {
  color: rgba(255, 255, 255, 0.88) !important;
}

.admin-pm-wechat__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.admin-pm-wechat__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
}

.admin-pm-wechat__item.is-active .admin-pm-wechat__avatar {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.admin-pm-wechat__unread-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fa5151;
  border: 2px solid #f7f7f7;
  box-sizing: content-box;
}

.admin-pm-wechat__item.is-active .admin-pm-wechat__unread-dot {
  border-color: #07c160;
}

.admin-pm-wechat__item-meta {
  flex: 1;
  min-width: 0;
}

.admin-pm-wechat__item-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-pm-wechat__item-name {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-pm-wechat__item-time {
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}

.admin-pm-wechat__item-account {
  margin-top: 2px;
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-pm-wechat__item-snippet {
  margin-top: 4px;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.admin-pm-wechat__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #ededed;
}

.admin-pm-wechat__main-head {
  flex-shrink: 0;
  padding: 10px 16px;
  border-bottom: 1px solid #d4d4d4;
  background: #f5f5f5;
}

.admin-pm-wechat__main-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-pm-wechat__main-title {
  font-weight: 700;
  font-size: 1rem;
}

.admin-pm-wechat__main-sub {
  font-size: 0.8rem;
}

.admin-pm-wechat__messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 16px;
}

.admin-pm-wechat__placeholder {
  margin: 24px 0;
  text-align: center;
}

.admin-pm-wechat__msg-block {
  margin-bottom: 14px;
}

.admin-pm-wechat__msg-ts {
  text-align: center;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

.admin-pm-wechat__bubble {
  max-width: 78%;
}

.admin-pm-wechat__composer {
  flex-shrink: 0;
  border-top: 1px solid #d4d4d4;
  background: #f5f5f5;
  padding: 10px 12px;
}

.admin-pm-wechat__composer-inner {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.admin-pm-wechat__composer-input {
  flex: 1;
  min-height: 44px;
  resize: none;
}

.admin-pm-wechat__composer-send {
  flex-shrink: 0;
}

/* —— 老师端：账号区升级会员按钮 —— */
.platform-card__head--split {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.platform-card__head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.platform-account-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.platform-account-info {
  min-width: 0;
  flex: 1 1 auto;
}

.platform-tag-row--account {
  margin-top: 12px;
}

.platform-account-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  min-width: 124px;
}

.platform-upgrade-btn {
  width: 100%;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  color: #422006;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 55%, #f59e0b 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 4px 14px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.platform-upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 6px 18px rgba(245, 158, 11, 0.42);
}

.platform-upgrade-btn:active {
  transform: translateY(0);
}

.platform-activation-open-btn {
  width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.32);
  background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 3px 10px rgba(59, 130, 246, 0.14);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.platform-activation-open-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ffffff 0%, #e7f0ff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 5px 14px rgba(59, 130, 246, 0.2);
}

.platform-activation-open-btn:active {
  transform: translateY(0);
}

@media (max-width: 760px) {
  .platform-account-layout {
    flex-direction: column;
  }

  .platform-account-actions {
    width: 100%;
    min-width: 0;
  }
}

.platform-upgrade-scroll {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 6px;
}

/* —— 超级管理员：会员表 —— */
.super-members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.super-members-table th,
.super-members-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.super-members-table th {
  background: #f8fafc;
  font-weight: 600;
  white-space: nowrap;
}

.activation-code-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activation-code-btn--dim {
  color: #6b7280;
  border-color: #d1d5db;
  background: #f3f4f6;
}

.super-members-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* —— 超级管理员：老师管理 —— */
.super-teachers-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.super-teachers-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.super-teachers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.super-teachers-table th,
.super-teachers-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.super-teachers-table th {
  background: #f8fafc;
  font-weight: 600;
  white-space: nowrap;
}

.super-teacher-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 180px;
  color: inherit;
  text-decoration: none;
}

.super-teacher-tag:hover strong {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.super-teacher-tag__avatar,
.super-teacher-profile__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
  font-weight: 700;
  flex-shrink: 0;
}

.super-teacher-tag small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
}

.super-teacher-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.super-teacher-status--active,
.super-teacher-status--vip {
  background: #dcfce7;
  color: #166534;
}

.super-teacher-status--trial {
  background: #eff6ff;
  color: #1d4ed8;
}

.super-teacher-status--expired,
.super-teacher-status--inactive {
  background: #fef2f2;
  color: #b91c1c;
}

.super-teacher-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.1), transparent 28%),
    linear-gradient(145deg, #ffffff, #f8fbff);
}

.super-teacher-profile__main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.super-teacher-profile__avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 1.25rem;
}

.super-teacher-profile__name {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.super-teacher-profile__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.super-teacher-login-btn {
  min-width: 150px;
  white-space: nowrap;
}

.super-teacher-login-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.super-teacher-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.super-teacher-kv {
  display: grid;
  gap: 9px;
  margin: 0;
}

.super-teacher-kv div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
}

.super-teacher-kv div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.super-teacher-kv dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.super-teacher-kv dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
}

.super-teacher-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.super-teacher-stat {
  padding: 14px;
}

.super-teacher-stat span,
.super-teacher-stat small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.super-teacher-stat strong {
  display: block;
  margin: 5px 0 4px;
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1.1;
}

.super-teacher-lesson-list {
  display: grid;
  gap: 8px;
}

.super-teacher-lesson {
  padding: 10px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.super-teacher-lesson strong,
.super-teacher-lesson span,
.super-teacher-lesson small {
  display: block;
}

.super-teacher-lesson span {
  margin-top: 3px;
  color: #334155;
  word-break: break-word;
}

.super-teacher-lesson small {
  margin-top: 4px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .super-teacher-profile {
    align-items: stretch;
    flex-direction: column;
  }

  .super-teacher-login-btn {
    width: 100%;
  }

  .super-teacher-detail-grid,
  .super-teacher-stats {
    grid-template-columns: 1fr;
  }

  .super-teacher-kv div {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}

.super-admin-perm-form {
  min-width: 340px;
  padding: 12px;
  border: 1px solid #e6edf8;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.super-admin-perm-form--row {
  width: 100%;
  margin-top: 2px;
}

.super-admin-edit-panel {
  width: 100%;
}

.super-admin-edit-panel__summary {
  list-style: none;
  cursor: pointer;
  color: #1d4ed8;
  font-size: 0.84rem;
  font-weight: 600;
  user-select: none;
  padding: 6px 2px;
}

.super-admin-edit-panel__summary::-webkit-details-marker {
  display: none;
}

.super-admin-edit-panel__summary::before {
  content: "\25b6";
  display: inline-block;
  margin-right: 6px;
  font-size: 0.72rem;
  transition: transform 0.15s ease;
}

.super-admin-edit-panel[open] .super-admin-edit-panel__summary::before {
  transform: rotate(90deg);
}

.super-admin-perm-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.super-admin-perm-form__checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .super-admin-perm-form__grid,
  .super-admin-perm-form__checks {
    grid-template-columns: 1fr;
  }
}

.input--inline {
  width: auto;
  min-width: 72px;
  max-width: 140px;
  padding: 5px 8px;
  font-size: 0.82rem;
}

.btn--xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 8px;
}

.btn--sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.super-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.super-data-table th,
.super-data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.super-data-table th {
  background: #f8fafc;
  font-weight: 600;
  white-space: nowrap;
}

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

.super-data-table__act {
  white-space: nowrap;
  width: 1%;
}

.super-data-pager {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.super-data-pager__btn {
  font-size: 0.85rem;
  padding: 6px 12px;
}

.super-data-edit-form {
  max-width: 720px;
}

.super-data-field {
  margin-bottom: 4px;
}

.super-data-field--accent {
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px dashed var(--line);
}

.super-data-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* —— 平台首页：首屏落地页 —— */
body.home-page {
  background: #f7fbff;
  background-image:
    radial-gradient(ellipse 55% 40% at 82% 18%, rgba(78, 145, 255, 0.16), transparent 58%),
    radial-gradient(ellipse 45% 34% at 24% 20%, rgba(147, 197, 253, 0.14), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  overflow-x: hidden;
}

body.home-page .topbar {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(219, 229, 244, 0.9);
  backdrop-filter: blur(18px);
}

body.home-page .topbar .container {
  max-width: none;
  padding-left: clamp(24px, 5vw, 64px);
  padding-right: clamp(24px, 5vw, 64px);
}

body.home-page .brand {
  font-size: 1.12rem;
  letter-spacing: 0;
  color: #0b1736;
}

body.home-page #mainShell {
  max-width: none;
  min-height: calc(100vh - 57px);
  padding: 0;
}

.home-landing {
  position: relative;
  min-height: calc(100vh - 57px);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 250, 255, 0.88) 56%, rgba(225, 238, 255, 0.92) 100%);
}

.home-landing::before,
.home-landing::after {
  content: "";
  position: absolute;
  inset: auto -8% -24% auto;
  width: 76%;
  height: 58%;
  border-radius: 50% 0 0 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.32), rgba(55, 132, 255, 0.12));
  transform: rotate(-8deg);
  pointer-events: none;
}

.home-landing::after {
  inset: 8% -18% auto auto;
  width: 58%;
  height: 42%;
  opacity: 0.5;
  transform: rotate(-16deg);
}

.home-landing__shell {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  min-height: calc(100vh - 57px);
  margin: 0 auto;
  padding: clamp(58px, 9vh, 92px) clamp(22px, 4vw, 54px) clamp(48px, 8vh, 86px);
  display: grid;
  grid-template-columns: minmax(650px, 1.18fr) minmax(330px, 0.82fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  transform: translateY(-58px);
}

.home-landing__copy {
  min-width: 0;
}

.home-landing__eyebrow {
  margin: 0 0 22px;
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: #2f7dff;
}

.home-landing__title {
  margin: 0;
  max-width: none;
  color: #071634;
  font-size: clamp(2.55rem, 4.55vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  white-space: nowrap;
}

.home-landing__title span {
  color: #2f7dff;
}

.home-landing__lead {
  margin: 22px 0 0;
  max-width: 520px;
  color: #51627f;
  font-size: clamp(1.02rem, 1.55vw, 1.22rem);
  line-height: 1.75;
}

.home-landing__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
}

.home-landing__cta {
  min-width: 128px;
  min-height: 48px;
  padding: 11px 26px;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 700;
}

.home-landing__cta--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2f7dff, #1f5dff);
  box-shadow: 0 16px 30px rgba(47, 125, 255, 0.28);
}

.home-landing__cta--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f66dc;
  border: 1px solid rgba(47, 125, 255, 0.58);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 26px rgba(67, 112, 186, 0.08);
}

.home-landing__features {
  list-style: none;
  max-width: 760px;
  margin: 40px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid rgba(195, 211, 236, 0.72);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 22px;
}

.home-landing__feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  color: #566782;
  font-size: 0.92rem;
  line-height: 1.5;
}

.home-landing__feature-mark {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 0.58em;
  border-radius: 50%;
  background: #2f7dff;
  box-shadow: 0 0 0 4px rgba(47, 125, 255, 0.12);
}

.home-landing__feature-text {
  min-width: 0;
  white-space: nowrap;
}

.home-landing__visual {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-visual {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1.2;
  display: grid;
  place-items: center;
  --home-board-x: 0px;
  --home-board-y: 0px;
  --home-board-rz: 0deg;
  --home-chat-x: 0px;
  --home-chat-y: 0px;
  --home-calendar-x: 0px;
  --home-calendar-y: 0px;
  --home-clock-y: 0px;
  --home-orb-large-x: 0px;
  --home-orb-large-y: 0px;
  --home-orb-small-x: 0px;
  --home-orb-small-y: 0px;
  --home-wave-one-y: 0px;
  --home-wave-two-y: 0px;
}

.home-visual__board {
  position: relative;
  width: 78%;
  aspect-ratio: 1.22;
  border: 1px solid rgba(83, 147, 255, 0.42);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(219, 235, 255, 0.88) 0 21%, rgba(255, 255, 255, 0.82) 21% 100%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(218, 235, 255, 0.84));
  box-shadow:
    0 36px 70px rgba(57, 117, 216, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform:
    perspective(900px)
    rotateX(7deg)
    rotateY(-12deg)
    rotateZ(calc(-2deg + var(--home-board-rz)))
    translate3d(var(--home-board-x), var(--home-board-y), 0);
  will-change: transform;
}

.home-visual__board::before {
  content: "";
  position: absolute;
  inset: 21% 0 auto;
  height: 1px;
  background: rgba(73, 137, 248, 0.18);
}

.home-visual__dot {
  position: absolute;
  top: 7.5%;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4aa4ff, #2f66ff);
  box-shadow: 0 5px 12px rgba(47, 102, 255, 0.28);
}

.home-visual__dot--one {
  left: 9%;
}

.home-visual__dot--two {
  left: 16%;
}

.home-visual__dot--three {
  left: 23%;
  opacity: 0.62;
}

.home-visual__chat {
  position: absolute;
  left: -11%;
  top: 34%;
  width: 58px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, #2f7dff, #1f5dff);
  box-shadow: 0 18px 32px rgba(47, 125, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: translate3d(var(--home-chat-x), var(--home-chat-y), 0);
  will-change: transform;
}

.home-visual__chat::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -8px;
  border-width: 9px 0 0 12px;
  border-style: solid;
  border-color: transparent transparent transparent #1f5dff;
}

.home-visual__chat span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.home-visual__play {
  position: absolute;
  left: 18%;
  top: 33%;
  width: 108px;
  height: 82px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(114, 164, 255, 0.15);
  display: grid;
  place-items: center;
}

.home-visual__play span {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: linear-gradient(135deg, #5c8cff, #2e72ff);
  box-shadow: 0 14px 26px rgba(47, 125, 255, 0.28);
  position: relative;
}

.home-visual__play span::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 13px;
  border-left: 13px solid #ffffff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.home-visual__lines {
  position: absolute;
  left: 48%;
  top: 36%;
  width: 32%;
  display: grid;
  gap: 13px;
}

.home-visual__lines span {
  height: 10px;
  border-radius: 999px;
  background: rgba(126, 166, 228, 0.34);
}

.home-visual__lines span:first-child {
  width: 64%;
  background: linear-gradient(90deg, #2f7dff, rgba(84, 150, 255, 0.66));
}

.home-visual__lines span:nth-child(2) {
  width: 92%;
}

.home-visual__lines span:nth-child(3) {
  width: 72%;
}

.home-visual__calendar {
  position: absolute;
  right: -5%;
  top: 28%;
  width: 104px;
  height: 116px;
  padding: 28px 14px 14px;
  border-radius: 15px;
  background: linear-gradient(180deg, #ffffff, #e9f3ff);
  box-shadow: 0 24px 38px rgba(47, 125, 255, 0.2);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  transform: translate3d(var(--home-calendar-x), var(--home-calendar-y), 0);
  will-change: transform;
}

.home-visual__calendar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 24px;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(90deg, #6aa3ff, #2f7dff);
}

.home-visual__calendar span {
  border-radius: 4px;
  background: rgba(73, 137, 248, 0.22);
}

.home-visual__clock {
  position: absolute;
  right: 29%;
  bottom: 17%;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #eaf4ff);
  box-shadow: 0 22px 32px rgba(47, 125, 255, 0.17);
  transform: translate3d(0, var(--home-clock-y), 0);
  will-change: transform;
}

.home-visual__clock::before,
.home-visual__clock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  border-radius: 99px;
  background: #2f7dff;
  transform-origin: 50% 100%;
}

.home-visual__clock::before {
  height: 19px;
  transform: translate(-50%, -100%) rotate(0deg);
}

.home-visual__clock::after {
  height: 16px;
  transform: translate(-50%, -100%) rotate(118deg);
}

.home-visual__orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 25%, #ffffff, #85baff 48%, #2f7dff 100%);
  box-shadow: 0 22px 42px rgba(47, 125, 255, 0.24);
}

.home-visual__orb--large {
  right: 2%;
  bottom: 12%;
  width: 74px;
  height: 74px;
  transform: translate3d(var(--home-orb-large-x), var(--home-orb-large-y), 0);
  will-change: transform;
}

.home-visual__orb--small {
  right: 0;
  top: 19%;
  width: 48px;
  height: 48px;
  opacity: 0.5;
  transform: translate3d(var(--home-orb-small-x), var(--home-orb-small-y), 0);
  will-change: transform;
}

.home-visual__wave {
  position: absolute;
  inset: auto -6% -11% -6%;
  height: 40%;
  border-radius: 50% 50% 0 0;
  border-top: 1px solid rgba(114, 164, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent);
  transform: translate3d(0, var(--home-wave-one-y), 0) rotate(-9deg);
  will-change: transform;
}

.home-visual__wave--two {
  inset: auto -11% 2% 8%;
  height: 32%;
  opacity: 0.62;
  transform: translate3d(0, var(--home-wave-two-y), 0) rotate(-12deg);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .home-visual__board,
  .home-visual__chat,
  .home-visual__calendar,
  .home-visual__clock,
  .home-visual__orb,
  .home-visual__wave {
    will-change: auto;
  }
}

@media (min-width: 1700px) {
  .home-landing__shell {
    max-width: min(1760px, calc(100vw - 160px));
    grid-template-columns: minmax(780px, 1.12fr) minmax(500px, 0.88fr);
    gap: clamp(64px, 5vw, 108px);
    padding: clamp(52px, 7vh, 78px) clamp(56px, 5vw, 92px) clamp(56px, 7vh, 88px);
    transform: translateY(-72px);
  }

  .home-landing__eyebrow {
    margin-bottom: 24px;
    font-size: 0.88rem;
  }

  .home-landing__title {
    font-size: clamp(4.15rem, 4.2vw, 5.05rem);
  }

  .home-landing__lead {
    max-width: 620px;
    font-size: clamp(1.18rem, 1.2vw, 1.38rem);
  }

  .home-landing__cta {
    min-width: 150px;
    min-height: 56px;
    padding: 13px 32px;
    font-size: 1.08rem;
  }

  .home-landing__features {
    max-width: 920px;
    margin-top: 44px;
    padding-top: 30px;
    gap: 18px 30px;
  }

  .home-landing__feature {
    gap: 12px;
    font-size: 1.02rem;
  }

  .home-visual {
    width: min(100%, 700px);
  }
}

@media (max-width: 900px) {
  .home-landing__shell {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 46px;
    transform: none;
  }

  .home-landing__visual {
    order: -1;
  }

  .home-visual {
    width: min(84vw, 460px);
  }

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

  .home-landing__title {
    white-space: normal;
  }

  .home-landing__feature-text {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  body.home-page .topbar .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .home-landing__shell {
    padding: 34px 20px 48px;
    gap: 30px;
  }

  .home-landing__visual {
    display: none;
  }

  .home-landing__actions {
    align-items: stretch;
  }

  .home-landing__cta,
  .home-landing__cta--ghost {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }

  .home-landing__features {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* —— 平台配置：首页卖点行 —— */
.home-feature-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-feature-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.home-feature-row .input {
  flex: 1 1 220px;
  min-width: 0;
  margin-bottom: 0;
}

.home-feature-remove {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* —— 认证：邮箱 + 发送验证码 —— */
.auth-email-block {
  margin-bottom: 2px;
}

.auth-email-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.auth-email-row .input {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-send-code-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 0;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
}

.auth-send-code-btn:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: #bfdbfe;
}

.auth-send-code-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.auth-send-code-hint {
  margin: 6px 0 0;
  min-height: 1.25em;
}

.auth-send-code-hint--ok {
  color: var(--ok);
}

.auth-send-code-hint--err {
  color: var(--danger);
}

@media (max-width: 420px) {
  .auth-email-row {
    flex-wrap: wrap;
  }
  .auth-send-code-btn {
    width: 100%;
    justify-content: center;
  }
}

.auth-link-subtle {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}

.auth-link-subtle:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* —— 认证页（登录/注册/法律文档）：轻量高级感 —— */
body.auth-skin {
  background: linear-gradient(165deg, #f8fafc 0%, #eef2f7 48%, #f1f5f9 100%);
  min-height: 100vh;
}

body.auth-skin .topbar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.auth-page {
  width: 100%;
  max-width: min(440px, 100vw - 32px);
  margin: 0 auto;
  padding: 28px 16px 56px;
  box-sizing: border-box;
}

/* 大屏：加宽容器，避免中间一条过窄 */
@media (min-width: 640px) {
  .auth-page--login {
    max-width: min(520px, 92vw);
  }
  .auth-page--register {
    max-width: min(600px, 92vw);
  }
  .auth-page--legal {
    max-width: min(720px, 94vw);
  }
}

@media (min-width: 1024px) {
  .auth-page--login {
    max-width: min(480px, 38vw);
  }
  .auth-page--register {
    max-width: min(680px, 44vw);
  }
  .auth-page--legal {
    max-width: min(800px, 52vw);
  }
}

@media (min-width: 1440px) {
  .auth-page--login {
    max-width: 520px;
  }
  .auth-page--register {
    max-width: 720px;
  }
  .auth-page--legal {
    max-width: 840px;
  }
}

.auth-page__head {
  margin-bottom: 22px;
  text-align: center;
}

.auth-page__title {
  margin: 0 0 10px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.25;
}

.auth-page__subtitle {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #64748b;
}

.auth-page__banner {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #92400e;
}

.auth-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px 26px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 16px 48px rgba(15, 23, 42, 0.07);
}

.auth-reg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-reg-field__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  min-height: 0;
}

.auth-reg-field__head .auth-register-form__label {
  margin: 0;
  flex: 0 1 auto;
}

.auth-reg-field__head .auth-field-hint {
  margin: 0;
  min-height: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: right;
  max-width: min(100%, 220px);
  flex: 1 1 auto;
}

.auth-reg-field__head .auth-field-hint:empty {
  display: none;
}

.auth-register-form__label {
  margin-top: 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}

.auth-register-form__input {
  border-radius: 12px;
  border-color: #e2e8f0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-register-form__input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auth-register-form.auth-card.stack > .auth-reg-field:first-of-type .auth-reg-field__head .label,
.auth-register-form.auth-card > .auth-reg-field:first-of-type .auth-reg-field__head .label {
  margin-top: 0;
}

.auth-agree-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.auth-agree-row__checkbox {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: #2563eb;
  cursor: pointer;
}

.auth-agree-row__label {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #475569;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
}

.auth-agree-row__label a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.auth-agree-row__label a:hover {
  color: #1d4ed8;
}

.auth-field-error {
  margin: -4px 0 0;
  font-size: 0.8125rem;
  color: #b91c1c;
}

.auth-field-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;
}

.auth-agree-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.auth-agree-wrap .auth-field-hint {
  margin: 0;
  font-size: 0.75rem;
  padding-left: 27px;
}

.auth-agree-wrap .auth-field-hint:empty {
  display: none;
}

.auth-field-hint--ok {
  color: #15803d;
}

.auth-field-hint--bad {
  color: #b91c1c;
}

.profile-page-subtitle {
  line-height: 1.55;
}

.profile-rebind-phone-trigger {
  display: inline;
  margin: 0 0 0 8px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.78rem;
  color: #94a3b8;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  vertical-align: baseline;
}

.profile-rebind-phone-trigger:hover:not(:disabled) {
  color: #64748b;
}

.profile-rebind-phone-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  text-decoration: none;
}

.profile-rebind-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.profile-rebind-modal__close {
  flex-shrink: 0;
  margin: -6px -8px 0 0;
  font-size: 1.35rem;
  line-height: 1;
  padding: 4px 10px;
}

.profile-rebind-modal__err {
  display: none;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.85rem;
}

.auth-reg-modal-backdrop.profile-rebind-backdrop {
  z-index: 1300;
}

.auth-reg-modal.profile-rebind-modal {
  z-index: 1310;
}

.auth-reg-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.auth-reg-modal {
  position: fixed;
  z-index: 1210;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(400px, calc(100vw - 32px));
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.12),
    0 24px 64px rgba(15, 23, 42, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.auth-reg-modal__title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.auth-reg-modal__body {
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
}

.auth-reg-modal__list {
  margin: 0;
  padding-left: 1.1em;
  color: #b91c1c;
  font-size: 0.875rem;
}

.auth-reg-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.auth-reg-modal__actions .btn {
  min-width: 96px;
}

.auth-register-submit {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}

.auth-page__footer {
  margin-top: 22px;
  text-align: center;
}

.auth-page__footer a {
  font-weight: 500;
}

/* 登录页：与新版首页统一的轻量 SaaS 视觉 */
body.auth-login-skin {
  background:
    radial-gradient(ellipse 54% 36% at 78% 16%, rgba(80, 145, 255, 0.15), transparent 62%),
    radial-gradient(ellipse 38% 28% at 18% 24%, rgba(147, 197, 253, 0.13), transparent 68%),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  overflow-x: hidden;
}

body.auth-login-skin .topbar {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(219, 229, 244, 0.9);
  backdrop-filter: blur(18px);
}

body.auth-login-skin .topbar .container {
  max-width: none;
  padding-left: clamp(24px, 4vw, 54px);
  padding-right: clamp(24px, 4vw, 54px);
}

body.auth-login-skin .brand {
  font-size: 1.12rem;
  color: #0b1736;
  letter-spacing: 0;
}

body.auth-login-skin #mainShell {
  max-width: none;
  min-height: calc(100vh - 89px);
  padding: 0;
}

body.auth-login-skin .flash-list {
  width: min(620px, calc(100vw - 40px));
  margin: 18px auto 0;
  position: relative;
  z-index: 3;
}

.auth-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #51627f;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.auth-topbar-link:hover {
  color: #2563eb;
  border-color: rgba(147, 197, 253, 0.58);
  background: rgba(255, 255, 255, 0.74);
}

.auth-topbar-link__icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-login-shell {
  position: relative;
  min-height: calc(100vh - 89px);
  padding: clamp(48px, 8vh, 78px) 20px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.auth-login-shell::before,
.auth-login-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50% 0 0 0;
  opacity: 0.65;
}

.auth-login-shell::before {
  right: -12%;
  bottom: -24%;
  width: 72%;
  height: 54%;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.38), rgba(55, 132, 255, 0.12));
  transform: rotate(-8deg);
}

.auth-login-shell::after {
  left: -20%;
  bottom: -28%;
  width: 58%;
  height: 42%;
  border-top: 1px solid rgba(114, 164, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent);
  transform: rotate(13deg);
}

.auth-login-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-login-dots {
  position: absolute;
  width: 132px;
  height: 84px;
  opacity: 0.44;
  background-image: radial-gradient(circle, rgba(97, 151, 235, 0.34) 1.5px, transparent 2px);
  background-size: 18px 18px;
}

.auth-login-dots--left {
  left: max(32px, 8vw);
  top: 18%;
}

.auth-login-dots--right {
  right: max(28px, 7vw);
  top: 42%;
}

.auth-login-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 24%, #ffffff, #a9c9ff 48%, #5b98ff 100%);
  box-shadow: 0 24px 46px rgba(47, 125, 255, 0.2);
  opacity: 0.55;
}

.auth-login-orb--one {
  left: 9%;
  bottom: 15%;
  width: 72px;
  height: 72px;
}

.auth-login-orb--two {
  right: 18%;
  top: 31%;
  width: 26px;
  height: 26px;
  opacity: 0.36;
}

.auth-login-soft-card {
  position: absolute;
  display: grid;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(222, 236, 255, 0.7));
  border: 1px solid rgba(147, 197, 253, 0.22);
  box-shadow: 0 26px 52px rgba(47, 125, 255, 0.13);
  transform: rotate(-10deg);
  opacity: 0.72;
}

.auth-login-soft-card--calendar {
  left: 16%;
  top: 30%;
  width: 82px;
  height: 82px;
  padding: 24px 14px 14px;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.auth-login-soft-card--calendar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 22px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, rgba(106, 163, 255, 0.9), rgba(47, 125, 255, 0.9));
}

.auth-login-soft-card--calendar span {
  border-radius: 6px;
  background: rgba(73, 137, 248, 0.18);
}

.auth-login-soft-card--note {
  right: 14%;
  top: 54%;
  width: 88px;
  height: 76px;
  padding: 18px 16px;
  gap: 9px;
  transform: rotate(9deg);
}

.auth-login-soft-card--note span {
  height: 7px;
  border-radius: 999px;
  background: rgba(73, 137, 248, 0.2);
}

.auth-login-soft-card--note span:first-child {
  width: 62%;
  background: rgba(47, 125, 255, 0.45);
}

.auth-page--login {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 40px));
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

.auth-page--login .auth-page__head {
  margin: 0 0 28px;
}

.auth-page--login .auth-page__title {
  margin-bottom: 12px;
  color: #071634;
  font-size: clamp(2rem, 4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: 0;
}

.auth-page--login .auth-page__subtitle {
  color: #64748b;
  font-size: 1rem;
}

.auth-page--login .auth-page__subtitle strong {
  font-weight: 600;
  color: inherit;
}

.auth-login-card {
  width: 100%;
  padding: 38px 44px 40px;
  border-radius: 24px;
  border: 1px solid rgba(193, 211, 238, 0.68);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 24px 62px rgba(72, 111, 175, 0.13);
  backdrop-filter: blur(18px);
}

.auth-login-card.stack {
  gap: 24px;
}

.auth-login-field {
  display: grid;
  gap: 9px;
}

.auth-login-card .auth-register-form__label {
  margin: 0;
  color: #273858;
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-login-input-icon {
  position: absolute;
  left: 17px;
  z-index: 1;
  width: 21px;
  height: 21px;
  color: #7c8daa;
  pointer-events: none;
}

.auth-login-input-icon svg,
.auth-login-password-toggle svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-login-input {
  min-height: 56px;
  margin: 0;
  padding: 14px 50px 14px 52px;
  border-radius: 14px;
  border-color: #d6e1ef;
  background: rgba(248, 251, 255, 0.92);
  color: #0f172a;
  font-size: 1rem;
  box-shadow: 0 10px 24px rgba(74, 105, 154, 0.05) inset;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.auth-login-input:hover {
  border-color: #b8d1f8;
  background: #ffffff;
}

.auth-login-input:focus {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.14),
    0 12px 28px rgba(61, 111, 190, 0.08);
}

.auth-login-password-toggle {
  position: absolute;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #71829d;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.16s ease, background 0.16s ease;
}

.auth-login-password-toggle:hover {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.auth-login-password-toggle svg {
  width: 20px;
  height: 20px;
}

.auth-login-submit {
  min-height: 56px;
  margin-top: 4px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2f7dff, #1f5dff);
  box-shadow: 0 16px 30px rgba(47, 125, 255, 0.28);
  font-size: 1rem;
  letter-spacing: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.auth-login-submit:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #2b73f0, #1d54e8);
  box-shadow: 0 18px 34px rgba(47, 125, 255, 0.32);
}

.auth-page__footer--login {
  width: 100%;
  margin: 26px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #64748b;
}

.auth-page__footer--login a {
  color: #2563eb;
  text-decoration: none;
}

.auth-page__footer--login a:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 1700px) {
  body.auth-login-skin .topbar .container {
    padding-left: clamp(56px, 5vw, 88px);
    padding-right: clamp(56px, 5vw, 88px);
  }

  body.auth-login-skin .brand {
    font-size: 1.18rem;
  }

  body.auth-login-skin .flash-list {
    width: min(700px, calc(100vw - 120px));
  }

  .auth-login-shell {
    padding: clamp(58px, 7vh, 86px) clamp(56px, 5vw, 92px) clamp(56px, 7vh, 88px);
  }

  .auth-login-dots {
    width: 158px;
    height: 100px;
    background-size: 20px 20px;
  }

  .auth-login-dots--left {
    left: max(64px, 10vw);
    top: 20%;
  }

  .auth-login-dots--right {
    right: max(64px, 9vw);
    top: 43%;
  }

  .auth-login-orb--one {
    left: 10%;
    bottom: 14%;
    width: 88px;
    height: 88px;
  }

  .auth-login-orb--two {
    right: 20%;
    top: 32%;
    width: 34px;
    height: 34px;
  }

  .auth-login-soft-card--calendar {
    left: 17%;
    top: 31%;
    width: 98px;
    height: 98px;
    padding: 30px 17px 17px;
    gap: 10px;
  }

  .auth-login-soft-card--calendar::before {
    height: 28px;
  }

  .auth-login-soft-card--note {
    right: 15%;
    top: 55%;
    width: 108px;
    height: 92px;
    padding: 22px 19px;
    gap: 11px;
  }

  .auth-page--login {
    width: min(700px, calc(100vw - 160px));
  }

  .auth-page--login .auth-page__head {
    margin-bottom: 32px;
  }

  .auth-page--login .auth-page__title {
    font-size: clamp(2.65rem, 2.5vw, 3.2rem);
  }

  .auth-page--login .auth-page__subtitle {
    font-size: 1.08rem;
  }

  .auth-login-card {
    padding: 46px 54px 48px;
    border-radius: 28px;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.95) inset,
      0 28px 72px rgba(72, 111, 175, 0.15);
  }

  .auth-login-card.stack {
    gap: 28px;
  }

  .auth-login-card .auth-register-form__label {
    font-size: 0.94rem;
  }

  .auth-login-input-icon {
    left: 20px;
    width: 23px;
    height: 23px;
  }

  .auth-login-input {
    min-height: 62px;
    padding: 17px 58px 17px 58px;
    border-radius: 16px;
    font-size: 1.06rem;
  }

  .auth-login-password-toggle {
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .auth-login-password-toggle svg {
    width: 21px;
    height: 21px;
  }

  .auth-login-submit {
    min-height: 62px;
    border-radius: 16px;
    font-size: 1.08rem;
  }

  .auth-page__footer--login {
    margin-top: 30px;
    font-size: 0.95rem;
  }
}

@media (max-width: 760px) {
  body.auth-login-skin .topbar .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .auth-login-shell {
    justify-content: flex-start;
    min-height: calc(100vh - 73px);
    padding: 42px 18px 28px;
  }

  .auth-login-ambient {
    display: none;
  }

  .auth-page--login {
    width: 100%;
  }

  .auth-page--login .auth-page__head {
    margin-bottom: 22px;
  }

  .auth-login-card {
    padding: 28px 22px 26px;
    border-radius: 20px;
  }

  .auth-page__footer--login {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
  }

}

@media (max-width: 430px) {
  .auth-topbar-link span {
    display: none;
  }

  .auth-topbar-link {
    width: 38px;
    justify-content: center;
    padding: 0;
  }

  .auth-login-input {
    min-height: 54px;
  }
}

/* 法律文档页 */
.legal-page .legal-page__back {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
}

.legal-page .legal-page__back:hover {
  color: #2563eb;
}

.legal-page__h1 {
  text-align: left;
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.legal-page__body .legal-doc h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 1.35em 0 0.5em;
}

.legal-page__body .legal-doc h2:first-child {
  margin-top: 0;
}

.legal-page__body .legal-doc h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 1.1em 0 0.45em;
}

.legal-page__body .legal-doc p {
  margin: 0 0 0.75em;
  line-height: 1.7;
  color: #475569;
  font-size: 0.9rem;
}

.legal-page__body .legal-doc__muted {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 2em !important;
}

.badge--vip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #78350f;
  border: 1px solid #fbbf24;
  font-weight: 600;
  font-size: 0.78rem;
}

.badge--vip-icon {
  font-size: 0.7rem;
  line-height: 1;
  opacity: 0.9;
}

.students-page-title {
  margin-bottom: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.students-active-count {
  font-size: 0.8rem;
  font-weight: 400;
}

.students-summary-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 400;
  max-width: 100%;
}

.students-summary-bar__item {
  white-space: nowrap;
}

.students-summary-bar__sep {
  opacity: 0.55;
  user-select: none;
}

.students-portal-url-btn {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  line-height: 1.45;
  word-break: break-all;
  border-radius: 6px;
}

.students-portal-url-btn:hover .students-portal-url__code,
.students-portal-url-btn:focus-visible .students-portal-url__code {
  background: #e2e8f0;
}

.students-portal-url-btn:focus-visible {
  outline: 2px solid var(--accent, #3b82f6);
  outline-offset: 2px;
}

.students-portal-copy-hint {
  margin-left: 6px;
  font-size: 0.75rem;
  color: var(--ok, #16a34a);
}

.students-portal-url__code {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 6px;
}

.super-members-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.input--search-members {
  min-width: 180px;
  max-width: 260px;
}

/* —— 学员端首页：公告、留言、课表 —— */
.student-portal-page .student-portal-announcement {
  margin-bottom: 14px;
}

/* 公告紧挨下方「老师留言」；留言与日历之间略加大空隙 */
.student-portal-page .student-portal-announcement:has(+ .student-portal-note) {
  margin-bottom: 6px;
}

.student-portal-page .student-portal-note {
  margin-bottom: 22px;
}

.student-portal-page .student-portal-booking-alert {
  margin-bottom: 14px;
}


/* 学员端：权限说明（日历上方，紧凑布局） */
.student-portal-permissions {
  margin: 0 0 10px;
  padding: 8px 10px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.65) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1px solid rgba(59, 130, 246, 0.22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.student-portal-permissions__title {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1e3a5f;
}

.student-portal-permissions__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.student-portal-permissions__item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.student-portal-permissions__badge {
  flex: 0 0 auto;
  min-width: 34px;
  height: 28px;
  padding: 0 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #64748b, #475569);
  line-height: 1.1;
  text-align: center;
}

.student-portal-permissions__badge--book {
  background: linear-gradient(145deg, #3b82f6, #2563eb);
}

.student-portal-permissions__badge--warn {
  background: linear-gradient(145deg, #d97706, #b45309);
}

.student-portal-permissions__item--blocked {
  background: rgba(255, 251, 235, 0.9);
  border-color: rgba(245, 158, 11, 0.35);
}

.student-portal-permissions__body {
  min-width: 0;
  flex: 1;
}

.student-portal-permissions__name {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.student-portal-permissions__desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.42;
  color: #475569;
}

.student-portal-permissions__desc strong {
  color: #1d4ed8;
  font-weight: 700;
}

.student-portal-booking__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.student-portal-booking__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
}

.student-portal-booking__date {
  max-width: 220px;
}

.student-portal-booking__duration {
  max-width: 5.5rem;
}

.student-portal-booking__slots {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-portal-booking__slot-item {
  margin: 0;
}

.student-portal-booking__slot-btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 8px 14px;
  border-color: rgba(59, 130, 246, 0.45);
  color: #1d4ed8;
}

.student-portal-booking__slot-btn:hover {
  background: #eff6ff;
}

.student-portal-booking__empty {
  margin: 0;
  padding: 0;
  list-style: none;
}

.student-portal-cal-cell--bookable {
  cursor: pointer;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.student-portal-cal-cell--bookable:hover {
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.student-portal-cal-cell--booking-selected {
  box-shadow: inset 0 0 0 2px #3b82f6 !important;
  background: rgba(239, 246, 255, 0.95) !important;
}

.student-portal-page .student-portal-note__body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  font-size: 0.95rem;
  color: #1e293b;
}

.student-portal-page-head.page-head--row {
  align-items: flex-start;
}

.student-portal-page-head__welcome {
  min-width: 0;
  flex: 1 1 220px;
}

.student-portal-page-head__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 2px;
}

.student-portal-page-head__greet {
  margin: 0;
  flex: 0 1 auto;
  line-height: 1.25;
}

.student-portal-page-head__subtitle {
  margin-top: 2px;
  margin-bottom: 0;
}

.student-portal-page-head__teacher-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 8px 0 0;
  padding: 5px 10px 5px 8px;
  max-width: 100%;
  width: fit-content;
  border-radius: 999px;
  background: linear-gradient(135deg, #ecfeff 0%, #e0f2fe 55%, #f0f9ff 100%);
  border: 1px solid #7dd3fc;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.12);
  font-size: 0.84rem;
  line-height: 1.35;
  color: #0c4a6e;
}

.student-portal-page-head__teacher-name {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #075985;
}

.student-portal-page-head__teacher-sep {
  color: #7dd3fc;
  font-weight: 600;
}

.student-portal-page-head__teacher-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0369a1;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

/* 学员登录页：与老师端 auth 页同系；副标题一句内嵌老师名 */
.student-portal-login-page .student-portal-login__lead {
  margin: 0;
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #64748b;
  text-align: center;
  letter-spacing: 0.01em;
}

.student-portal-login-page .student-portal-login__name {
  font-weight: 700;
  color: #1d4ed8;
  padding: 0 0.28em;
  margin: 0 0.06em;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.95) 0%, rgba(219, 234, 254, 0.55) 100%);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18);
}

/* 兼容旧结构（若仍有模板引用） */
.student-portal-login__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.student-portal-login__teacher {
  font-weight: 700;
  color: #0f172a;
}

.student-portal-login__sep {
  color: #cbd5e1;
  font-weight: 600;
}

.student-portal-login__hint {
  color: #64748b;
  font-size: 0.9rem;
}

.student-form-field-cap {
  max-width: 420px;
}

.student-dup-username-backdrop {
  z-index: 60;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(3px);
}

.student-dup-username-modal {
  z-index: 61;
}

.student-dup-username-card {
  position: relative;
  max-width: 380px;
  margin: 0 16px 24px;
  padding: 0 0 18px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #fecaca;
  box-shadow: 0 20px 40px -12px rgba(185, 28, 28, 0.2);
}

.student-dup-username-card__accent {
  height: 4px;
  background: linear-gradient(90deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
}

.student-dup-username-card__head {
  padding: 14px 16px 0;
  align-items: flex-start;
}

.student-dup-username-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #991b1b;
  letter-spacing: -0.02em;
}

.student-dup-username-card__body {
  margin: 0;
  padding: 10px 18px 4px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #475569;
}

.student-dup-username-card__actions {
  padding: 14px 18px 0;
  display: flex;
  justify-content: flex-end;
}

.student-dup-username-card__actions .btn {
  min-width: 120px;
  border-radius: 10px;
  font-weight: 600;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border: 1px solid #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.student-portal-page-head__pwd-btn {
  white-space: nowrap;
}

.input--warn {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.student-login-username-feedback {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #b45309;
}

.student-login-username-feedback.is-error {
  color: #b91c1c;
}

.student-portal-page-head__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  padding-top: 2px;
}

.student-portal-page-head__logout {
  margin: 0;
}

.student-portal-head-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}

.student-portal-head-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
}

.student-portal-head-pills--inline {
  gap: 6px;
}

.student-portal-head-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px 9px;
  min-width: 108px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.student-portal-head-pill--compact {
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-width: 0;
  padding: 3px 8px 4px;
  border-radius: 8px;
}

.student-portal-head-pill--accent {
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 55%, #ecfdf5 100%);
  border-color: rgba(16, 185, 129, 0.35);
}

.student-portal-head-pill__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.student-portal-head-pill--compact .student-portal-head-pill__label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  color: #64748b;
}

.student-portal-head-pill--accent .student-portal-head-pill__label {
  color: #047857;
}

.student-portal-head-pill__value {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.15;
}

.student-portal-head-pill--compact .student-portal-head-pill__value {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.student-portal-head-pill--accent .student-portal-head-pill__value {
  color: #065f46;
}

/* 剩余课时 ≤ 老师设置的余课提醒阈值（或欠课时）：与老师端列表红样式一致 */
.student-portal-head-pill--danger {
  background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 55%, #fef2f2 100%);
  border-color: rgba(239, 68, 68, 0.4);
}

.student-portal-head-pill--danger .student-portal-head-pill__label {
  color: #b91c1c;
}

.student-portal-head-pill--danger .student-portal-head-pill__value {
  color: #991b1b;
}

.student-portal-renewal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}

.student-portal-renewal-btn--compact {
  gap: 5px;
  padding: 3px 9px 3px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 8px;
}

.student-portal-renewal-btn:hover {
  background: #f8fafc;
  border-color: var(--primary, #2563eb);
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.student-portal-renewal-btn:active {
  transform: scale(0.98);
}

.student-portal-renewal-btn__icon {
  display: block;
  width: 16px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 2px;
  opacity: 0.88;
  background: repeating-linear-gradient(
    to bottom,
    #64748b 0 2px,
    transparent 2px 4px
  );
}

.student-portal-renewal-btn--compact .student-portal-renewal-btn__icon {
  width: 12px;
  height: 9px;
  background: repeating-linear-gradient(
    to bottom,
    #64748b 0 1.5px,
    transparent 1.5px 3px
  );
}

.student-portal-renewal-btn:hover .student-portal-renewal-btn__icon {
  opacity: 1;
  background: repeating-linear-gradient(
    to bottom,
    var(--primary, #2563eb) 0 2px,
    transparent 2px 4px
  );
}

.student-portal-renewal-btn--compact:hover .student-portal-renewal-btn__icon {
  background: repeating-linear-gradient(
    to bottom,
    var(--primary, #2563eb) 0 1.5px,
    transparent 1.5px 3px
  );
}

.student-portal-modal__panel--renewal {
  width: min(520px, 96vw);
  max-width: 520px;
  max-height: min(88vh, 640px);
}

/* 低于默认 80，便于课后反馈等弹窗叠在本弹窗之上 */
.student-portal-modal--low-units {
  z-index: 79;
}

.student-portal-modal__panel--low-units {
  width: min(400px, 92vw);
  max-width: 400px;
  padding: 22px 22px 18px;
  text-align: center;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: linear-gradient(180deg, #fffbeb 0%, #fff 42%);
  box-shadow:
    0 25px 50px -12px rgba(180, 83, 9, 0.18),
    0 0 0 1px rgba(245, 158, 11, 0.12);
}

.student-portal-low-units__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff7ed, #ffedd5);
  border: 1px solid rgba(251, 146, 60, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
}

.student-portal-low-units__icon::after {
  content: "!";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  font-weight: 800;
  color: #ea580c;
  line-height: 1;
}

.student-portal-low-units__title {
  margin: 0 0 12px;
  font-size: 1.12rem;
  color: #9a3412;
  letter-spacing: -0.02em;
}

.student-portal-low-units__body {
  text-align: left;
  margin-bottom: 4px;
}

.student-portal-low-units__text {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #334155;
}

.student-portal-low-units__hint {
  margin: 0;
  line-height: 1.5;
}

.student-portal-low-units__actions {
  margin-top: 6px;
  justify-content: center;
}

.student-portal-low-units__ok {
  min-width: 120px;
  border-radius: 10px;
  font-weight: 600;
}

.student-portal-renewal-modal__body {
  max-height: min(52vh, 420px);
  overflow: auto;
  margin-bottom: 12px;
  font-size: 0.92rem;
}

.student-portal-billing-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.student-portal-billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.student-portal-billing-table th,
.student-portal-billing-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.student-portal-billing-table th {
  font-weight: 600;
  color: var(--muted);
  background: #f8fafc;
}

.student-portal-billing-table tbody tr:last-child td {
  border-bottom: 0;
}

.student-portal-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.student-portal-cal-grid {
  align-items: stretch;
}

.student-portal-cal-cell {
  min-height: 92px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #fff;
}

.student-portal-cal-cell--empty {
  border: 0;
  background: transparent;
  min-height: 0;
  padding: 0;
}

.student-portal-cal-cell--has {
  background: #fafbff;
}

.student-portal-cal-cell--past {
  background: #eef2f6;
}

.student-portal-cal-cell--past.student-portal-cal-cell--has {
  background: #e8edf4;
}

.student-portal-cal-cell--past .student-portal-cal-daynum {
  color: #94a3b8;
}

.student-portal-cal-dayhead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2px 4px;
  margin-bottom: 2px;
  min-height: 1.1em;
}

.student-portal-cal-daynum {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

.student-portal-cal-no-book-hint {
  font-size: 0.58rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.25;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  max-width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

.student-portal-cal-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.student-cal-event {
  font-size: 0.65rem;
  line-height: 1.25;
  border-radius: 4px;
  padding: 2px 4px;
  text-align: left;
  border: 0;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

button.student-cal-event {
  font-family: inherit;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.student-cal-event--leaveable {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.35);
}

.student-cal-event--leaveable:hover {
  filter: brightness(0.97);
}

.student-cal-event--cal-fb-btn {
  box-shadow: inset 0 0 0 1px rgba(22, 101, 52, 0.38);
}

.student-cal-event--cal-fb-btn:hover {
  filter: brightness(0.97);
}

.student-cal-event--leaveable-block {
  cursor: pointer;
  text-align: left;
}

.student-portal-leave-form {
  display: none;
}

.student-cal-event__time {
  font-weight: 600;
  opacity: 0.95;
}

.student-cal-event__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.student-cal-event--todo {
  background: #e0edff;
  color: #1e40af;
}

.student-cal-event--done {
  background: #dcfce7;
  color: #166534;
}

.student-cal-event--pause {
  background: #e5e7eb;
  color: #4b5563;
}

.student-cal-event--student-left {
  background: #e8eaed;
  color: #6b7280;
}

.student-cal-event__leave-reason {
  font-size: 0.58rem;
  line-height: 1.25;
  opacity: 0.95;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  margin-top: 2px;
  font-weight: 500;
}

.student-cal-event__teacher-reply {
  font-size: 0.55rem;
  line-height: 1.2;
  margin-top: 2px;
  color: #1d4ed8;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.student-cal-event--student-left-block {
  border-left: 3px solid #9ca3af;
}

.student-portal-leave-reason {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.45;
  padding-top: 8px;
  border-top: 1px dashed rgba(107, 114, 128, 0.35);
  word-break: break-word;
}

.student-portal-stack-heading {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  margin: 0;
  letter-spacing: 0.02em;
}

.student-portal-stack-heading--spaced {
  margin-top: 18px;
}

body.student-portal-modal-open {
  overflow: hidden;
}

.student-portal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
}

/* 叠在自助约课弹窗之上 */
.student-portal-modal--confirm {
  z-index: 100;
}

.student-portal-modal__panel--confirm {
  width: min(380px, 92vw);
  max-width: 380px;
  padding: 22px 24px 20px;
}

.student-portal-booking-confirm__lead {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
}

.student-portal-booking-confirm__time {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1e40af;
  text-align: center;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.95) 0%, rgba(255, 255, 255, 0.6) 100%);
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.student-portal-booking-confirm__hint {
  margin: 0 0 16px;
  text-align: center;
  line-height: 1.5;
}

.student-portal-booking-confirm__actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.student-portal-modal[hidden] {
  display: none !important;
}

.student-portal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
}

.student-portal-modal__panel {
  position: relative;
  width: min(400px, 100%);
  max-height: min(90vh, 560px);
  overflow: auto;
  background: var(--surface);
  border-radius: 16px;
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  padding: 20px 22px 18px;
}

.student-portal-modal__panel--feedback {
  width: min(820px, 96vw);
  max-width: 820px;
  max-height: min(92vh, 920px);
}

.student-portal-modal__panel--booking {
  width: min(440px, 94vw);
  max-width: 440px;
}

.student-portal-modal--leave-result {
  z-index: 95;
}

.student-portal-modal--booking-result {
  z-index: 98;
}

.student-portal-modal__panel--leave-result {
  width: min(360px, 92vw);
  max-width: 360px;
  padding: 26px 24px 22px;
  text-align: center;
}

.student-portal-leave-result__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  box-sizing: border-box;
}

.student-portal-modal__panel--leave-result.student-portal-leave-result--success .student-portal-leave-result__icon {
  color: #15803d;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
}

.student-portal-modal__panel--leave-result.student-portal-leave-result--error .student-portal-leave-result__icon {
  color: #b91c1c;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  border: 1px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.1);
}

.student-portal-leave-result__title {
  margin: 0 0 10px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.student-portal-modal__panel--leave-result.student-portal-leave-result--success .student-portal-leave-result__title {
  color: #14532d;
}

.student-portal-modal__panel--leave-result.student-portal-leave-result--error .student-portal-leave-result__title {
  color: #9f1239;
}

.student-portal-leave-result__body {
  margin: 0 0 20px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #64748b;
  text-align: left;
  white-space: pre-line;
}

.student-portal-leave-result__actions {
  justify-content: center;
  margin-top: 4px;
}

.student-portal-booking-modal__slots {
  max-height: min(42vh, 300px);
  overflow: auto;
  margin-top: 4px;
}

.student-portal-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.student-portal-modal__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.student-portal-modal__close {
  border: 0;
  background: rgba(243, 244, 246, 0.9);
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  margin: -4px -4px 0 0;
}

.student-portal-modal__close:hover {
  background: #e2e8f0;
  color: #334155;
}

.student-portal-modal__lead {
  margin: 0 0 14px;
  line-height: 1.5;
}

.student-portal-modal__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.student-portal-modal__textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  border-radius: 10px;
  margin-bottom: 4px;
}

.student-portal-modal__hint {
  margin: 0 0 12px;
}

.student-portal-modal__error {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--danger);
  font-weight: 600;
}

.student-portal-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.student-portal-feedback-modal__body {
  max-height: min(72vh, 720px);
  overflow: auto;
  margin-bottom: 12px;
  line-height: 1.55;
  font-size: 0.98rem;
  color: var(--text);
}

.student-portal-feedback-lesson-meta {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.student-portal-feedback-lesson-meta__line {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--text);
}

.student-portal-feedback-lesson-meta__line:last-child {
  margin-bottom: 0;
}

.student-portal-feedback-lesson-meta__units {
  font-weight: 500;
}

.student-portal-feedback-lesson-meta--solo {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.student-portal-feedback-section__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}

.student-portal-feedback-section__body {
  margin-top: 0;
}

.student-portal-feedback-html {
  word-break: break-word;
}

/* 老师填写或导入的纯文本反馈（非 HTML）：保留换行与连续空格 */
.student-portal-feedback-plain {
  white-space: pre-wrap;
  word-break: break-word;
}

.student-portal-feedback-html img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.student-portal-record--fb {
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  box-sizing: border-box;
}

.student-portal-record--fb:hover {
  filter: brightness(0.98);
}

.student-portal-record--fb:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.student-portal-record__fb-hint {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(22, 101, 52, 0.25);
}

.student-portal-records-fb-opt {
  margin: 8px 0 12px;
}

.student-portal-records-fb-opt__label {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: #475569;
}

/* 学员端课表分页：底部哨兵，保证 IntersectionObserver 可检测 */
.student-portal-lesson-feed-sentinel {
  min-height: 2px;
  width: 100%;
  pointer-events: none;
}

.student-portal-record-dual {
  margin-bottom: 10px;
}

.student-portal-record-dual__inline .student-portal-record--static {
  cursor: default;
  border-radius: 10px 10px 0 0;
  margin-bottom: 0;
}

.student-portal-record-inline-fb {
  padding: 10px 12px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-top: 1px dashed rgba(22, 101, 52, 0.22);
  border-radius: 0 0 10px 10px;
  background: #f8fafc;
}

.student-portal-record-inline-fb__title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

/* 与日历同色：列表整块卡片（改日历 .student-cal-event 色系时此处一并生效） */
.student-cal-event--block {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
}

.student-cal-event--block .student-cal-event--block__date {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.92;
  margin-bottom: 6px;
}

.student-cal-event--block .student-cal-event--block__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-bottom: 4px;
}

.student-cal-event--block .student-cal-event__time {
  font-size: 0.88rem;
  font-weight: 700;
}

.student-cal-event--block .student-cal-event__title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.35;
}

.student-cal-event--block .student-cal-event--block__meta {
  font-size: 0.8rem;
  opacity: 0.88;
  margin: 0;
}

.student-portal-subtabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.student-portal-subtab {
  display: inline-block;
  padding: 10px 6px 10px;
  margin-bottom: -1px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.student-portal-subtab:hover {
  color: #334155;
}

.student-portal-subtab.is-active {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
}

.student-portal-lesson-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 无限滚动列表内的课节卡片：lesson-stack 的 gap 作用不到 #spFutureList 内的子节点 */
#spFutureList,
#spLeaveList {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#spRecordList {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 学员端「未来课程」：左侧时间线 + 节点 */
.student-portal-future-timeline {
  border-left: 3px solid #e2e8f0;
  padding-left: 16px;
  margin-left: 2px;
}

.student-portal-future-timeline > .student-cal-event--block,
.student-portal-future-timeline > button.student-cal-event--block {
  position: relative;
}

.student-portal-future-timeline > .student-cal-event--block::before,
.student-portal-future-timeline > button.student-cal-event--block::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: -21px;
  top: 14px;
  border-radius: 50%;
  background: #3b82f6;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #cbd5e1;
}

.student-portal-future-timeline
  > .student-cal-event--student-left-block::before,
.student-portal-future-timeline
  > button.student-cal-event--student-left-block::before {
  background: #94a3b8;
}

@media (max-width: 520px) {
  .student-portal-cal-cell .student-cal-event__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    font-size: 0.52rem;
    line-height: 1.2;
    color: #475569;
    margin-top: 1px;
  }

  .student-portal-cal-cell .student-cal-event--student-left .student-cal-event__leave-reason {
    -webkit-line-clamp: 3;
    font-size: 0.55rem;
  }

  .student-portal-cal-cell {
    min-height: 78px;
    padding: 3px;
  }

  .student-portal-cal-dayhead {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .student-portal-cal-no-book-hint {
    font-size: 0.52rem;
    line-height: 1.2;
  }

  .student-portal-cal-cell .student-cal-event--block .student-cal-event__title {
    -webkit-line-clamp: 2;
  }
}
