/* ===== Window Titlebar Controls ===== */
.window-control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: relative;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.window-control__symbol {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--transition-base);
  color: rgba(0, 0, 0, 0.7);
}

.window-control:hover .window-control__symbol {
  opacity: 1;
}

.window-control--close {
  background: #FF5F57;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.window-control--close:hover {
  background: #FF4B42;
}

.window-control--minimize {
  background: #FEBC2E;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.window-control--minimize:hover {
  background: #FDB31F;
}

.window-control--maximize {
  background: #28C840;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.window-control--maximize:hover {
  background: #20B638;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn__icon {
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn--primary:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

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

.btn--premium {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.btn--premium:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35);
}

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

.btn--ghost {
  padding: 10px;
  color: var(--color-text-secondary);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--color-border-light);
  color: var(--color-text);
}

.btn--block {
  width: 100%;
}

/* ===== KPI Grid ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  animation: fadeInUp 0.5s ease-out 0.1s both;
}

.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.kpi-card:hover::before {
  transform: scaleX(1);
}

.kpi-card--goal::before { background: var(--color-accent); }
.kpi-card--current::before { background: var(--color-success); }
.kpi-card--countdown::before { background: var(--color-warning); }

.kpi-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.kpi-card__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.kpi-card__icon {
  width: 22px;
  height: 22px;
  color: var(--color-text-tertiary);
}

.kpi-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.kpi-card__hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-text-tertiary);
}

/* ===== Score Ring ===== */
.score-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.score-ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring__track,
.score-ring__progress {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.score-ring__track {
  stroke: var(--color-border-light);
}

.score-ring__progress {
  stroke: var(--color-accent);
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.score-ring__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-ring__value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  font-family: var(--font-mono);
}

.score-ring__unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  margin-top: 4px;
}

/* ===== Current Score ===== */
.current-score {
  display: flex;
  align-items: center;
  gap: 12px;
}

.current-score__from,
.current-score__to {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  font-family: var(--font-mono);
}

.current-score__from {
  color: var(--color-text-tertiary);
  position: relative;
}

.current-score__from::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  background: var(--color-text-tertiary);
  border-radius: 2px;
}

.current-score__to {
  color: var(--color-success);
}

.current-score__arrow {
  width: 24px;
  height: 24px;
  color: var(--color-text-tertiary);
}

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}

.score-badge--up {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.score-badge__icon {
  width: 14px;
  height: 14px;
}

/* ===== Countdown ===== */
.countdown {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.countdown__value {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-warning);
  font-family: var(--font-mono);
}

.countdown__unit {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.countdown__bar {
  width: 100%;
  height: 6px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 8px;
}

.countdown__progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-warning) 0%, #FBBF24 100%);
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Recommend Section ===== */
.section--recommend {
  animation: fadeInUp 0.5s ease-out 0.2s both;
}

.recommend-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommend-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  position: relative;
}

.recommend-card:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  transform: translateX(4px);
}

.recommend-card__icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recommend-card__icon-wrap--blue {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.recommend-card__icon-wrap--indigo {
  background: rgba(99, 102, 241, 0.1);
  color: #6366F1;
}

.recommend-card__icon-wrap--amber {
  background: var(--color-warning-soft);
  color: var(--color-gold);
}

.recommend-card__icon {
  width: 24px;
  height: 24px;
}

.recommend-card__content {
  flex: 1;
  min-width: 0;
}

.recommend-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.recommend-card__meta {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.recommend-card__arrow {
  width: 18px;
  height: 18px;
  color: var(--color-text-tertiary);
  transition: transform var(--transition-base);
}

.recommend-card:hover .recommend-card__arrow {
  transform: translateX(4px);
  color: var(--color-accent);
}

/* ===== Insights Grid ===== */
.insights-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  animation: fadeInUp 0.5s ease-out 0.3s both;
}

.insights-grid--reverse {
  grid-template-columns: 0.8fr 1.2fr;
}

.legend-inline {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--color-text-secondary);
  gap: 4px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ===== Subject Detail Grid ===== */
.subject-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.subject-detail {
  padding: 14px 16px;
  background: var(--color-border-light);
  border-radius: var(--radius-md);
}

.subject-detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.subject-detail__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.subject-detail__scores {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.subject-detail__current {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
}

.subject-detail__dash {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.subject-detail__trend {
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
}

.subject-detail__trend--up { color: var(--color-success); }
.subject-detail__trend--down { color: var(--color-danger); }

.subject-detail__trend-mini {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--color-text-tertiary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.subject-detail__bar {
  width: 100%;
  height: 8px;
  background: var(--color-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.subject-detail__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s ease-out;
}

.subject-detail__stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.subject-detail__stats span:first-child {
  font-weight: 600;
  color: var(--color-text-tertiary);
}

.insight-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.chart-wrap {
  position: relative;
  height: 240px;
  margin-bottom: 16px;
}

.chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

.chart-footer__label {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.chart-footer__value {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

.trend-up {
  color: var(--color-success);
}

/* ===== Weakness List ===== */
.weakness-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.weakness-item {
  position: relative;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  cursor: pointer;
  overflow: hidden;
}

.weakness-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.weakness-item--danger {
  background: var(--color-danger-soft);
  border-color: rgba(239, 68, 68, 0.15);
}

.weakness-item--danger:hover {
  border-color: var(--color-danger);
}

.weakness-item--warning {
  background: var(--color-warning-soft);
  border-color: rgba(245, 158, 11, 0.15);
}

.weakness-item--warning:hover {
  border-color: var(--color-warning);
}

.weakness-item__main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.weakness-item__subject {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.weakness-item__subject--math {
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-accent);
}

.weakness-item__subject--science {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
}

.weakness-item__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.weakness-item__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.weakness-item__lock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gold);
}

.weakness-item__lock-icon {
  width: 14px;
  height: 14px;
}

.weakness-cta {
  margin-top: 6px;
}

/* ===== Utility ===== */
.icon {
  width: 20px;
  height: 20px;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--color-border-light);
  border-radius: var(--radius-md);
  width: fit-content;
}

.tab {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.tab:hover {
  color: var(--color-text);
}

.tab--active {
  background: var(--color-surface);
  color: var(--color-accent);
  box-shadow: var(--color-shadow-sm);
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.filter-options {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-border-light);
  border: 1px solid transparent;
  transition: all var(--transition-base);
  cursor: pointer;
}

.filter-chip:hover {
  color: var(--color-text);
  background: var(--color-border);
}

.filter-chip--active {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

/* ===== Tags ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tag--blue { background: var(--color-accent-soft); color: var(--color-accent); }
.tag--green { background: var(--color-success-soft); color: var(--color-success); }
.tag--amber { background: var(--color-warning-soft); color: var(--color-gold); }
.tag--red { background: var(--color-danger-soft); color: var(--color-danger); }
.tag--gray { background: var(--color-border-light); color: var(--color-text-secondary); }

/* ===== Data Table ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

.data-table th {
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-border-light);
  font-size: 13px;
}

.data-table tbody tr {
  transition: background var(--transition-base);
}

.data-table tbody tr:hover {
  background: var(--color-border-light);
}

.data-table__cell--score {
  font-weight: 700;
  font-family: var(--font-mono);
}

.data-table__cell--trend-up {
  color: var(--color-success);
}

.data-table__cell--trend-down {
  color: var(--color-danger);
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

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

.card-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== Course Card ===== */
.course-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--color-shadow-lg);
  border-color: var(--color-accent);
}

.course-card__cover {
  position: relative;
  height: 150px;
  background: var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.course-card__cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card__cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.85) 100%);
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.course-card__cover--orange {
  background: #B45309;
}
.course-card__cover--green {
  background: #065F46;
}
.course-card__cover--purple {
  background: #6D28D9;
}

/* ===== Course Cover Art ===== */
.course-card__cover-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-card__art-circle {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
}

.course-card__art-circle--mic {
  width: 50px;
  height: 50px;
}

.course-card__art-waves {
  position: relative;
  width: 120px;
  height: 60px;
}

.course-card__art-label {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 2px;
}

.course-card__play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base);
}

.course-card:hover .course-card__play {
  transform: scale(1.1);
}

.course-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.course-card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.course-card__tagline {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.course-card__targets {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.course-card__target {
  font-size: 12px;
  color: var(--color-accent);
  font-weight: 600;
}

.course-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.course-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.course-card__meta svg {
  width: 14px;
  height: 14px;
}


.course-card__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.course-card__teacher-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.course-card__rating {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gold);
}

.course-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}

.course-card__btn {
  padding: 8px 18px;
  font-size: 13px;
  flex-shrink: 0;
}

.course-card__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-danger);
}

.course-card__price--free {
  color: var(--color-success);
}

.course-card__original {
  font-size: 12px;
  color: var(--color-text-tertiary);
  text-decoration: line-through;
  margin-left: 6px;
}

.course-card__students {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-left: 12px;
}

.course-card__footer-left {
  display: flex;
  align-items: center;
}

/* ===== Teacher Info (Enhanced) ===== */
.course-card__teacher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
  margin-bottom: 0;
  flex: 1;
}

.course-card__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.course-card__avatar-bg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.course-card__teacher-info {
  flex: 1;
  min-width: 0;
}

.course-card__teacher-aside {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 4px;
}

.course-card__teacher-link {
  font-size: 11px;
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.course-card__teacher-link:hover {
  text-decoration: underline;
}

.course-card__teacher-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.course-card__teacher-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.course-card__teacher-creds {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gold);
  flex-shrink: 0;
}

.course-card__rating svg {
  width: 14px;
  height: 14px;
}

/* ===== Teacher Detail Page ===== */
.teacher-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 0;
}

.teacher-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  margin-bottom: 24px;
}

.teacher-page__back:hover {
  text-decoration: underline;
}

.teacher-page__header {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.teacher-page__avatar {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.teacher-page__right {
  flex: 1;
}

.teacher-page__name {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.teacher-page__tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.teacher-page__subjects {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.teacher-page__rating {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 12px;
}

.teacher-page__intro {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.teacher-page__section {
  padding: 20px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.teacher-page__section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-light);
}

.teacher-page__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.teacher-page__list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.6;
}

.teacher-page__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-top: 7px;
  flex-shrink: 0;
}

.teacher-page__dot--gold {
  background: var(--color-gold);
}

.teacher-page__result {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  padding: 14px 18px;
  background: var(--color-accent-soft);
  border-radius: var(--radius-md);
  line-height: 1.6;
}

.teacher-page__cta {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.modal-overlay--visible .modal {
  transform: scale(1);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.modal__title {
  font-size: 18px;
  font-weight: 700;
}

.modal__close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__close:hover {
  background: var(--color-border-light);
  color: var(--color-text);
}

.modal__body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  background: var(--color-border-light);
}

/* ===== Paper Card ===== */
.paper-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.paper-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

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

.paper-card__info {
  flex: 1;
  min-width: 0;
}

.paper-card__code {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.paper-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 8px;
}

.paper-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.paper-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.paper-card__status--new {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.paper-card__status--done {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.paper-card__status--incomplete {
  background: var(--color-warning-soft);
  color: var(--color-gold);
}

.paper-card__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 14px;
  background: var(--color-border-light);
  border-radius: var(--radius-md);
}

.paper-card__meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.paper-card__meta-label {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.paper-card__meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.paper-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.paper-card__score {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.paper-card__score-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
}

.paper-card__score-label {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.paper-card__start {
  padding: 8px 16px;
  font-size: 13px;
}

/* ===== Exam Table of Contents / Difficulty Distribution ===== */
.exam-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.exam-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 16px;
  background: var(--color-border-light);
  border-radius: var(--radius-md);
}

.exam-stat__value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
}

.exam-stat__label {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ===== Empty State ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state__icon {
  width: 72px;
  height: 72px;
  color: var(--color-text-tertiary);
  margin-bottom: 20px;
}

.empty-state__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.empty-state__desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 320px;
}

/* ===== Page Header ===== */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-header__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.page-header__subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.page-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== Form Controls ===== */
.search-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-width: 260px;
}

.search-input svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-tertiary);
}

.search-input input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--color-text);
  width: 100%;
}

.search-input input::placeholder {
  color: var(--color-text-tertiary);
}

/* ===== Exam Taking Specific ===== */
.exam-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  flex-shrink: 0;
}

.exam-topbar__subject {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}

.exam-topbar__timer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.exam-topbar__timer svg {
  width: 18px;
  height: 18px;
}

.exam-topbar__timer--warning {
  background: var(--color-danger);
  animation: pulse-danger 1s ease-in-out infinite;
}

@keyframes pulse-danger {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.exam-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: 0;
  overflow: hidden;
}

.exam-question {
  padding: 32px;
  overflow-y: auto;
  min-height: 0;
}

.exam-question__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.exam-question__number {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

.exam-question__mark {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-border-light);
  border: 1px solid transparent;
  transition: all var(--transition-base);
}

.exam-question__mark:hover {
  color: var(--color-warning);
  border-color: var(--color-warning);
  background: var(--color-warning-soft);
}

.exam-question__mark--active {
  color: var(--color-warning);
  background: var(--color-warning-soft);
  border-color: var(--color-warning);
}

.exam-question__body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 32px;
}

.exam-question__body p {
  margin-bottom: 16px;
}

.exam-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exam-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.exam-option:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.exam-option--selected {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.exam-option__label {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.exam-option--selected .exam-option__label {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

.exam-option__text {
  font-size: 15px;
  color: var(--color-text);
  padding-top: 4px;
}

.exam-panel {
  background: var(--color-border-light);
  border-left: 1px solid var(--color-border);
  padding: 20px;
  overflow-y: auto;
  min-height: 0;
}

.exam-panel__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
}

.exam-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.exam-grid__item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

.exam-grid__item--default {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.exam-grid__item--default:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.exam-grid__item--answered {
  background: var(--color-success);
  color: var(--color-text-inverse);
}

.exam-grid__item--marked {
  background: var(--color-warning);
  color: var(--color-text-inverse);
}

.exam-grid__item--current {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-soft);
}

.exam-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.exam-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.exam-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.exam-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.exam-toolbar__nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== Subject Score Card ===== */
.subject-score {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.subject-score:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.subject-score__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.subject-score__icon--listening { background: var(--color-accent-soft); color: var(--color-accent); }
.subject-score__icon--reading { background: rgba(139, 92, 246, 0.12); color: #8B5CF6; }
.subject-score__icon--speaking { background: var(--color-success-soft); color: var(--color-success); }
.subject-score__icon--writing { background: var(--color-warning-soft); color: var(--color-gold); }

.subject-score__info {
  flex: 1;
}

.subject-score__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.subject-score__accuracy {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.subject-score__value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
}

/* ===== Efficiency Grid ===== */
.efficiency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.efficiency-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all var(--transition-base);
}

.efficiency-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.efficiency-card--highlight {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.efficiency-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.efficiency-card__main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.efficiency-card__score {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
}

.efficiency-card__time {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.efficiency-card__bar {
  width: 100%;
  height: 6px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}

.efficiency-card__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s ease-out;
}

.efficiency-card__hint {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ===== Diagnosis Preview (locked content) ===== */
.diagnosis-preview {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.diagnosis-preview__body {
  padding: 28px;
  filter: grayscale(100%);
  opacity: 0.35;
  user-select: none;
  pointer-events: none;
}

.diagnosis-preview__lock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.75) 35%, rgba(255,255,255,0.92) 100%);
  padding: 32px;
}

.diagnosis-preview__lock-content {
  text-align: center;
  max-width: 420px;
}

.diagnosis-preview__lock-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  color: var(--color-gold);
}

.diagnosis-preview__lock-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.diagnosis-preview__lock-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.diagnosis-section {
  margin-bottom: 28px;
}

.diagnosis-section:last-child {
  margin-bottom: 0;
}

.diagnosis-section__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-light);
}

.diagnosis-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.diagnosis-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.diagnosis-tag--weak {
  border-color: rgba(239, 68, 68, 0.25);
  background: var(--color-danger-soft);
}

.diagnosis-tag--stable {
  border-color: rgba(16, 185, 129, 0.25);
  background: var(--color-success-soft);
}

.diagnosis-tag__subject {
  color: var(--color-text);
}

.diagnosis-tag__value {
  font-family: var(--font-mono);
  font-weight: 700;
}

.diagnosis-tag__trend {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.diagnosis-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diagnosis-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-border-light);
  border-radius: var(--radius-md);
}

.diagnosis-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.diagnosis-item__dot--danger { background: var(--color-danger); }
.diagnosis-item__dot--warning { background: var(--color-warning); }
.diagnosis-item__dot--success { background: var(--color-success); }

.diagnosis-item__content strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  display: block;
  margin-bottom: 4px;
}

.diagnosis-item__content p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.diagnosis-plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diagnosis-plan__item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-left: 3px solid var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.diagnosis-plan__step {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
  padding-top: 2px;
}

.diagnosis-plan__content strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  display: block;
  margin-bottom: 4px;
}

.diagnosis-plan__content p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

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

.diagnosis-feedback__item {
  padding: 16px;
  background: var(--color-border-light);
  border-radius: var(--radius-md);
}

.diagnosis-feedback__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.diagnosis-feedback__subject {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.diagnosis-feedback__score {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-accent);
}

.diagnosis-feedback__dims {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.diagnosis-feedback__dims span {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.diagnosis-feedback__comment {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.diagnosis-compare {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diagnosis-compare__row {
  display: grid;
  grid-template-columns: 160px 1fr 40px;
  align-items: center;
  gap: 16px;
}

.diagnosis-compare__label {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.diagnosis-compare__bar {
  height: 10px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.diagnosis-compare__fill {
  height: 100%;
  border-radius: var(--radius-full);
}

.diagnosis-compare__fill--you { background: var(--color-accent); }
.diagnosis-compare__fill--target { background: var(--color-success); }
.diagnosis-compare__fill--peer { background: var(--color-text-tertiary); }

.diagnosis-compare__value {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
  text-align: right;
}

.diagnosis-section__note {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* ===== Diagnosis Matrix (Question Type Accuracy) ===== */
.diagnosis-matrix {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diagnosis-matrix__category {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.diagnosis-matrix__badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
}

.diagnosis-matrix__summary {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.diagnosis-matrix__sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px 2px;
}

.diagnosis-matrix__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.diagnosis-matrix__cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  min-height: 74px;
}

.diagnosis-matrix__cell span {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.diagnosis-matrix__cell strong {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
}

.diagnosis-matrix__cell--weak {
  border-color: rgba(239, 68, 68, 0.25);
  background: var(--color-danger-soft);
}

.diagnosis-matrix__cell--weak strong { color: var(--color-danger); }

.diagnosis-matrix__cell--stable {
  border-color: rgba(245, 158, 11, 0.25);
  background: var(--color-warning-soft);
}

.diagnosis-matrix__cell--stable strong { color: var(--color-gold); }

.diagnosis-matrix__cell--strong {
  border-color: rgba(16, 185, 129, 0.25);
  background: var(--color-success-soft);
}

.diagnosis-matrix__cell--strong strong { color: var(--color-success); }

/* ===== Diagnosis Rubric Bars (Speaking / Writing) ===== */
.diagnosis-rubric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.diagnosis-rubric__row {
  display: grid;
  grid-template-columns: 130px 1fr 36px;
  align-items: center;
  gap: 10px;
}

.diagnosis-rubric__dim {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.diagnosis-rubric__bar {
  height: 8px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.diagnosis-rubric__fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

.diagnosis-rubric__row b {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
  text-align: right;
}

/* ===== Diagnosis Compare Breakdown ===== */
.diagnosis-compare__breakdown {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diagnosis-compare__breakdown-row {
  display: grid;
  grid-template-columns: 60px 1fr 36px 100px;
  align-items: center;
  gap: 14px;
}

.diagnosis-compare__breakdown-row > span:first-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}

.diagnosis-compare__breakdown-row b {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
  text-align: right;
}

.diagnosis-compare__target {
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: right;
}

/* ===== Mistake Review (Free) ===== */
.mistake-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
}

.mistake-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition-base);
}

.mistake-tab:hover {
  background: var(--color-border-light);
  color: var(--color-text);
}

.mistake-tab--active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: rgba(37, 99, 235, 0.2);
}

.mistake-panel--hidden {
  display: none;
}

.mistake-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mistake-item {
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.mistake-item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.mistake-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.mistake-item__q {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-mono);
}

.mistake-item__time {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-left: auto;
}

.mistake-item__question {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 10px;
}

.mistake-item__answer {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.mistake-item__wrong {
  font-size: 13px;
  color: var(--color-danger);
  font-weight: 600;
}

.mistake-item__correct {
  font-size: 13px;
  color: var(--color-success);
  font-weight: 600;
}

.mistake-item__options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.mistake-item__options span {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-border-light);
}

.mistake-item__options .selected-wrong {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  font-weight: 600;
}

.mistake-item__options .selected-correct {
  background: var(--color-success-soft);
  color: var(--color-success);
  font-weight: 600;
}

.mistake-item__actions {
  display: flex;
  gap: 10px;
}

.btn--sm {
  padding: 6px 12px;
  font-size: 12px;
}

.mistake-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.mistake-summary__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--color-border-light);
  border-radius: var(--radius-md);
}

.mistake-summary__item strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.mistake-summary__item span {
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* ===== Mistake Deep Analysis (Premium) ===== */
.diagnosis-mistake {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.diagnosis-mistake__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.diagnosis-mistake__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-border-light);
  border-bottom: 1px solid var(--color-border);
}

.diagnosis-mistake__subject {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.diagnosis-mistake__count {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-accent);
}

.diagnosis-mistake__body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diagnosis-mistake__type {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diagnosis-mistake__type .diagnosis-tag {
  padding: 5px 10px;
  font-size: 12px;
}

.diagnosis-mistake__body p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.diagnosis-mistake__body p strong {
  color: var(--color-text);
}

/* ===== Membership Lock Block ===== */
.lock-block {
  position: relative;
  padding: 24px;
  background: var(--color-border-light);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
}

.lock-block__icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--color-gold);
}

.lock-block__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.lock-block__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

/* ===== Progress Bar ===== */
.progress {
  width: 100%;
  height: 8px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

/* ===== History List ===== */
.history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  margin-bottom: 12px;
}

.history-item:last-child {
  margin-bottom: 0;
}

.history-item:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.history-item__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  flex-shrink: 0;
}

.history-item__icon--blue { background: var(--color-accent-soft); color: var(--color-accent); }
.history-item__icon--purple { background: rgba(139,92,246,0.12); color: #8B5CF6; }
.history-item__icon--green { background: var(--color-success-soft); color: var(--color-success); }
.history-item__icon--amber { background: var(--color-warning-soft); color: var(--color-gold); }

.history-item__info {
  flex: 1;
  min-width: 0;
}

.history-item__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.history-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.dot-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot--good { background: var(--color-success); }
.dot--up { background: var(--color-text-tertiary); }
.dot--down { background: var(--color-danger); }
.dot--none { background: var(--color-border); }

.history-item__score {
  text-align: right;
  flex-shrink: 0;
}

.history-item__score-value {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
}

.history-item__score-unit {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.history-item__breakdown {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.score-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  background: var(--color-border-light);
}

.history-item__arrow {
  width: 18px;
  height: 18px;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.history-item:hover .history-item__arrow {
  transform: translateX(4px);
  color: var(--color-accent);
}

/* ===== VIP Page ===== */
.vip-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #FEF9C3 0%, #FDE68A 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
}

.vip-status__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vip-status__icon svg {
  width: 26px;
  height: 26px;
}

.vip-status__body {
  flex: 1;
}

.vip-status__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.vip-status__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.vip-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.vip-plan {
  position: relative;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
  transition: all var(--transition-base);
}

.vip-plan:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.vip-plan--free {
  border-color: var(--color-border);
}

.vip-plan--basic {
  border-color: var(--color-accent);
}

.vip-plan--premium {
  border-color: var(--color-gold);
  background: linear-gradient(180deg, #FFFBEB 0%, #fff 60%);
}

.vip-plan__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--color-border-light);
  color: var(--color-text-secondary);
}

.vip-plan__badge--blue {
  background: var(--color-accent);
  color: #fff;
}

.vip-plan__badge--gold {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
}

.vip-plan__icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.vip-plan__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.vip-plan__price {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.vip-plan__amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
}

.vip-plan__per {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-bottom: 20px;
}

.vip-plan__features {
  list-style: none;
  text-align: left;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vip-plan__feature {
  font-size: 13px;
  color: var(--color-text-secondary);
  padding-left: 24px;
  position: relative;
}

.vip-plan__feature::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.vip-plan__feature--yes::before {
  content: '\\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  background: var(--color-success-soft);
  color: var(--color-success);
}

.vip-plan__feature--no::before {
  content: '—';
  background: var(--color-border-light);
  color: var(--color-text-tertiary);
}

/* ===== Points Grid ===== */
.points-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.points-grid--two {
  grid-template-columns: repeat(2, 1fr);
}

.points-card {
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
}

.points-card__value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-accent);
  margin-bottom: 6px;
}

.points-card__label {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.points-card__hint {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.points-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}

.points-actions__sep {
  color: var(--color-border);
}

/* ===== VIP Table ===== */
.vip-table-wrap {
  overflow-x: auto;
}

.vip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.vip-table th,
.vip-table td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--color-border-light);
}

.vip-table th {
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-border-light);
}

.vip-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
}

.vip-table__highlight {
  background: var(--color-warning-soft);
}

.check {
  font-weight: 700;
}

.check--yes { color: var(--color-success); }
.check--no { color: var(--color-text-tertiary); }

/* ===== Order ===== */
.order-placeholder {
  text-align: center;
  padding: 40px;
  background: var(--color-border-light);
  border-radius: var(--radius-md);
}

.order-placeholder__text {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

/* ===== Profile Page ===== */
.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.profile-card__avatar {
  position: relative;
  flex-shrink: 0;
}

.profile-card__avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-card__avatar-badge {
  position: absolute;
  bottom: -2px;
  right: -6px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  background: var(--color-border-light);
  color: var(--color-text-secondary);
}

.profile-card__info {
  flex: 1;
}

.profile-card__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.profile-card__email {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.profile-card__stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}

.profile-card__stats b {
  color: var(--color-text);
  font-weight: 700;
}

.profile-card__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.profile-stat {
  text-align: center;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.profile-stat__value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-accent);
  margin-bottom: 6px;
}

.profile-stat__label {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.profile-goal {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.profile-goal__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
}

.profile-goal__row:last-child {
  border-bottom: none;
}

.profile-goal__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.profile-goal__control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-goal__value {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
}

.profile-goal__unit {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.profile-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-base);
}

.profile-list__item:last-child {
  border-bottom: none;
}

.profile-list__item:hover {
  background: var(--color-border-light);
}

.profile-list__item--link {
  cursor: pointer;
}

.profile-list__item--danger:hover {
  background: var(--color-danger-soft);
}

.profile-list__main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-list__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.profile-list__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.profile-list__desc {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.profile-list__arrow {
  width: 18px;
  height: 18px;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

.profile-list--base .profile-list__item:last-child {
  border-bottom: none;
  color: var(--color-danger);
  font-weight: 600;
}

/* ===== Toggle ===== */
.toggle {
  cursor: pointer;
}

.toggle__track {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-base);
}

.toggle__track--on {
  background: var(--color-accent);
}

.toggle__track--off {
  background: var(--color-border);
}

.toggle__thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform var(--transition-base);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle__track--on .toggle__thumb {
  transform: translateX(20px);
}

/* ===== Quick Settings Panel ===== */
.quick-settings {
  position: absolute;
  top: 48px;
  right: 0;
  width: 240px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: all var(--transition-base);
}

.quick-settings--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.quick-settings__arrow {
  position: absolute;
  top: -6px;
  right: 14px;
  width: 10px;
  height: 10px;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  transform: rotate(45deg);
}

.quick-settings__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  transition: background var(--transition-base);
  cursor: pointer;
}

.quick-settings__item:last-child {
  border-bottom: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.quick-settings__item:hover {
  background: var(--color-border-light);
}

.quick-settings__label {
  font-weight: 500;
  color: var(--color-text);
}

.quick-settings__value {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.quick-settings__arrow-icon {
  width: 14px;
  height: 14px;
  color: var(--color-text-tertiary);
}

.quick-settings__item--link .quick-settings__label {
  color: var(--color-accent);
  font-weight: 600;
}

/* ===== Quick Volume Row ===== */
.quick-volume {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
  gap: 10px;
}

.quick-volume__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  flex-shrink: 0;
  min-width: 40px;
}

.quick-volume__slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-border);
  border-radius: var(--radius-full);
  outline: none;
  min-width: 0;
}

.quick-volume__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.quick-volume__value {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

.quick-volume__mute {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--transition-base);
}

.quick-volume__mute:hover {
  opacity: 1;
}

/* ===== Button Variants ===== */
.btn--danger {
  background: var(--color-danger);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn--danger:hover {
  background: #DC2626;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

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

/* ===== Radio Card ===== */
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.radio-card:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.radio-card--active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.radio-card__indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition-base);
}

.radio-card--active .radio-card__indicator {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.radio-card__indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-inverse);
  transform: scale(0);
  transition: transform var(--transition-base);
}

.radio-card--active .radio-card__indicator::after {
  transform: scale(1);
}

.radio-card__content {
  flex: 1;
}

.radio-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.radio-card__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ===== Setup Page ===== */
.setup-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.setup-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setup-summary__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.setup-summary__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.setup-summary__code {
  font-size: 13px;
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
}

.setup-summary__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setup-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--color-border-light);
  border-radius: var(--radius-md);
}

.setup-meta__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setup-meta__label {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.setup-meta__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.setup-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--color-warning-soft);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
}

.setup-notice__icon {
  width: 20px;
  height: 20px;
  color: var(--color-gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.setup-notice__text {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.setup-notice__text strong {
  color: var(--color-text);
}

/* ===== Audio Check ===== */
.audio-check {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.audio-check__action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.audio-check__record-time {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--color-danger);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.audio-check__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.audio-check__icon {
  font-size: 22px;
  flex-shrink: 0;
}

.audio-check__info {
  flex: 1;
  min-width: 0;
}

.audio-check__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.audio-check__status {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.audio-check__status--ready {
  color: var(--color-success);
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
}

.audio-check__volume {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.audio-check__vol-icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-tertiary);
}

.audio-check__slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-border);
  border-radius: var(--radius-full);
  outline: none;
}

.audio-check__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
}

.audio-check__vol-value {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  width: 32px;
  text-align: right;
}

.audio-check__hint {
  font-size: 12px;
  color: var(--color-text-tertiary);
  line-height: 1.5;
  padding: 0 4px;
}

.setup-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.setup-mode__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== TOEFL Test (mirroring actTest.vue) ===== */
:root {
  --toeflMaxWidth: 1180px;
  --toeflHeaderBg: #071732;
}

.test_main {
  width: 100%;
  height: 100%;
}

.test_box {
  width: 100%;
  height: 100%;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.test_header {
  width: 100%;
  height: 60px;
  background: var(--toeflHeaderBg);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.test_header_main {
  width: 100%;
  max-width: var(--toeflMaxWidth);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.header_left {
  display: flex;
  align-items: center;
}

.header_logo {
  padding-right: 10px;
  position: relative;
  display: flex;
  align-items: center;
}

.header_logo::after {
  content: '';
  width: 2px;
  height: 25px;
  background: rgba(38, 47, 64, 1);
}

.header_time {
  color: #fff;
  font-size: 14px;
  margin: 0 10px;
  line-height: 20px;
}

.header_time div:first-child {
  font-weight: 700;
}

.header_btn {
  display: flex;
}

.header_btn > div {
  height: 36px;
  line-height: 36px;
  cursor: pointer;
  background-image: linear-gradient(#f7f8fa 0%, #e7e9ec 100%);
  border: 1px solid #bfbfbf;
  border-radius: 5px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: bold;
  margin-right: 10px;
  color: #333;
  user-select: none;
}

.header_btn > div:hover {
  background: #dbdfe4;
}

.header_btn > div.disabled {
  cursor: default;
  background-image: none;
  opacity: 0.65;
  box-shadow: none;
}

.header_right {
  display: flex;
  align-items: center;
}

.header_right > * {
  font-size: 11px;
  height: 36px;
  line-height: 36px;
  margin-left: 5px;
  border-radius: 5px;
  box-sizing: border-box;
}

.header_right .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background-image: linear-gradient(#fff 0%, #e6e6e6 100%);
  border: 1px solid #ccc;
  color: #333;
  font-size: 11px;
  font-weight: bold;
  height: 36px;
  line-height: 36px;
  cursor: pointer;
  user-select: none;
}

.header_right .btn:hover {
  background: #e6e6e6;
}

.header_right .btn.disabled {
  opacity: 0.65;
  cursor: default;
}

.btn-group {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.btn-group .dropdown-toggle {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background-image: linear-gradient(#fff 0%, #e6e6e6 100%);
  border: 1px solid #ccc;
  color: #333;
  font-size: 11px;
  font-weight: bold;
  height: 36px;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
}

.btn-group .dropdown-toggle:hover {
  background: #e6e6e6;
}

.btn-group > .btn {
  margin-left: 0;
  border-radius: 0;
  border-right: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background-image: linear-gradient(#fff 0%, #e6e6e6 100%);
  border: 1px solid #ccc;
  color: #333;
  font-size: 13px;
  font-weight: bold;
  height: 36px;
  cursor: pointer;
  user-select: none;
}

.btn-group > .btn:hover {
  background: #e6e6e6;
}

.btn-group > .btn:first-child {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.btn-group > .btn:last-child {
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  border-right: 1px solid #ccc;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 160px;
  padding: 5px 0;
  margin: 2px 0 0;
  list-style: none;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  display: none;
}

.btn-group.open .dropdown-menu {
  display: block;
}

.dropdown-menu > li > a {
  display: block;
  padding: 6px 20px;
  font-weight: normal;
  line-height: 20px;
  color: #333;
  white-space: nowrap;
  text-decoration: none;
}

.dropdown-menu > li > a:hover {
  color: #fff;
  background-color: #e42a22;
}

.clock {
  width: 75px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 5px;
  margin-left: 10px;
  position: relative;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  background: #fff;
}

.clock_progress {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.clock_bar {
  position: absolute;
  background: #ddd;
  height: 100%;
  top: 0;
  left: 0;
  transition: width 1s linear;
}

.clock_text {
  position: relative;
  z-index: 2;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  font-family: var(--font-mono);
}

.clock.paused .clock_text {
  display: none;
}

.clock.paused::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") center no-repeat;
  background-size: 25%;
}

.test_body {
  width: 100%;
  max-width: var(--toeflMaxWidth);
  flex: 1;
  margin-top: 10px;
  background: #fff;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  padding: 30px 40px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}

.qtext-outer {
  max-width: var(--toeflMaxWidth);
  margin: auto;
}

.question-stem p {
  margin-bottom: 20px;
}

.alternatives {
  display: table;
  width: 100%;
  margin-top: 20px;
}

.mc-alt {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.radio {
  display: flex;
  cursor: pointer;
  position: relative;
  width: 100%;
  align-items: flex-start;
}

.radio input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 2px 10px 0 0;
  flex: none;
  cursor: pointer;
}

.radio .options {
  display: inline-block;
}

.radio .options p {
  margin: 0;
  padding: 0;
}

.test_page {
  width: 100%;
  max-width: var(--toeflMaxWidth);
  padding: 12px 0;
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-shrink: 0;
}

.page {
  display: flex;
  align-items: center;
  height: 28px;
}

.page_prev,
.page_next,
.page_list_item {
  flex: none;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #4d4d4d;
  background: #fff;
  border: 1px solid #ddd;
  border-right: none;
  font-size: 12px;
  user-select: none;
}

.page_prev:hover,
.page_next:hover,
.page_list_item:hover {
  color: #fff;
  background: #ec2629;
}

.page_prev {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}

.page_next {
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
  border-right: 1px solid #ddd;
}

.page_list {
  flex: 1;
  display: flex;
  align-items: center;
}

.page_list_item.active_page {
  color: #fff !important;
  background: #ec2629;
}

.page_list_item.answered_page {
  color: #4d4d4d;
  background: #e8e8e8;
  font-weight: bold;
}

.page_list_item.marked_page .flagIcon {
  position: absolute;
  bottom: 28px;
  width: 28px;
  padding: 3px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px 3px 0 0;
  border: 1px solid #ddd;
  border-right: none;
  background-color: #eceee9;
  font-size: 10px;
}

.flag {
  flex: none;
  width: 100px;
  display: flex;
  justify-content: flex-end;
}

.flag .btn {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background-image: linear-gradient(#fff 0%, #e6e6e6 100%);
  border: 1px solid #ccc;
  color: #333;
  font-size: 11px;
  font-weight: bold;
  height: 36px;
  line-height: 36px;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
}

.flag .btn:hover {
  background: #e6e6e6;
}

.flag .btn.flagged {
  background: #f59e0b;
  border-color: #d97706;
  color: #fff;
}

/* ===== TOEFL Modal Override ===== */
.toefl-modal-overlay .modal {
  max-width: 520px;
}

.toefl-modal .modal__body h5 {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 10px;
}

.toefl-modal .modal__body h5:last-child {
  margin-bottom: 0;
}

.toefl-modal .btn--primary {
  background: var(--color-accent);
}

/* ===== Fullscreen Nav Modal ===== */
.modal-overlay--fullscreen {
  padding: 40px;
}

.modal-overlay--fullscreen .modal {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  display: flex;
  flex-direction: column;
}

.modal-overlay--fullscreen .modal__body {
  flex: 1;
  overflow-y: auto;
}

/* ===== My Courses / Owned Course Cards ===== */
.course-card--owned,
.course-card--purchased {
  border-left: 3px solid var(--color-accent);
}

.course-card--expired {
  border-left-color: var(--color-text-tertiary);
  opacity: 0.92;
}

.course-card--expired .course-card__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
}

.course-progress {
  margin-bottom: 14px;
  padding: 12px;
  background: var(--color-border-light);
  border-radius: var(--radius-sm);
}

.course-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.course-progress__label {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.course-progress__value {
  font-weight: 700;
  color: var(--color-accent);
}

.course-progress__bar {
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.course-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.course-progress__last {
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* ===== Owned Course List (Learning Management) ===== */
.owned-course-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.owned-course {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.owned-course:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.owned-course--expired {
  border-left: 3px solid var(--color-text-tertiary);
  opacity: 0.95;
}

.owned-course__cover {
  position: relative;
  width: 140px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-border-light);
}

.owned-course__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.owned-course__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
}

.owned-course__badge--green {
  background: rgba(16, 185, 129, 0.92);
}

.owned-course__badge--gray {
  background: rgba(100, 116, 139, 0.92);
}

.owned-course__badge--red {
  background: rgba(239, 68, 68, 0.92);
}

.owned-course__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.owned-course__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: 4px;
}

.owned-course__subtitle {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.owned-course__subtitle--expired {
  color: var(--color-danger);
  font-weight: 600;
}

.owned-course__progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.owned-course__progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.owned-course__valid {
  color: var(--color-text-tertiary);
}

.owned-course__valid--expired {
  color: var(--color-danger);
  font-weight: 600;
}

.owned-course__actions {
  flex-shrink: 0;
}

/* ===== Learning Tips ===== */
.learning-tips {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.learning-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.learning-tip__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.learning-tip__icon .fas {
  color: var(--color-accent);
}

.learning-tip__content {
  flex: 1;
  min-width: 0;
}

.learning-tip__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.learning-tip__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Tag secondary */
.tag--secondary {
  background: var(--color-border-light);
  color: var(--color-text-secondary);
}
