.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
  animation: content-in 220ms ease;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
  gap: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 60%, #faf5ff 100%);
  color: #0f172a;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  padding: 16px 20px;
  overflow: hidden;
  position: relative;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: auto 20px 0 auto;
  width: 140px;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.hero-copy,
.hero-score-card {
  position: relative;
  z-index: 1;
}

.hero-copy .eyebrow {
  color: #0284c7;
  font-weight: 700;
}

.hero-copy h2 {
  margin: 4px 0 6px;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.25;
  color: #0f172a;
  font-weight: 800;
}

.hero-copy p {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hero-score-card {
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px 16px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.06);
}

.hero-score-card span {
  color: #0369a1;
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-score-card strong {
  font-size: 1.85rem;
  line-height: 1;
  color: #0284c7;
  font-weight: 800;
}

.hero-score-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.76rem;
}

.hero-progress {
  background: #e0f2fe;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}

.hero-progress .progress-fill {
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
  height: 100%;
}

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

.metric-card,
.panel,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.metric-card {
  position: relative;
  min-height: 98px;
  padding: 12px 14px;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-content: space-between;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

/* Card 1: Pastel Sky Blue */
.metric-card:nth-child(1) {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
}
.metric-card:nth-child(1) .metric-icon {
  background: #ffffff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}
.metric-card:nth-child(1) strong {
  color: #0369a1;
}

/* Card 2: Pastel Lavender */
.metric-card:nth-child(2) {
  background: linear-gradient(135deg, #faf5ff, #f3e8ff);
  border: 1px solid #e9d5ff;
}
.metric-card:nth-child(2) .metric-icon {
  background: #ffffff;
  color: #9333ea;
  border: 1px solid #e9d5ff;
}
.metric-card:nth-child(2) strong {
  color: #7e22ce;
}

/* Card 3: Pastel Peach */
.metric-card:nth-child(3) {
  background: linear-gradient(135deg, #fffbf5, #ffedd5);
  border: 1px solid #fed7aa;
}
.metric-card:nth-child(3) .metric-icon {
  background: #ffffff;
  color: #ea580c;
  border: 1px solid #fed7aa;
}
.metric-card:nth-child(3) strong {
  color: #c2410c;
}

/* Card 4: Pastel Mint Green */
.metric-card:nth-child(4) {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
}
.metric-card:nth-child(4) .metric-icon {
  background: #ffffff;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
.metric-card:nth-child(4) strong {
  color: #15803d;
}

.metric-card p {
  margin: 6px 0 2px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}

.metric-card strong {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 500;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 16px;
}

/* --- Unified Executive Dashboard Summary Panel --- */
.dashboard-summary-panel {
  padding: 18px 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

.dashboard-summary-panel::before {
  background: linear-gradient(90deg, #0284c7, #38bdf8, #818cf8);
  height: 3px;
}

.dashboard-summary-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.8fr) auto;
  gap: 20px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.summary-meta-block h2 {
  margin: 4px 0 4px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.summary-score-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
}

.summary-score-block .score-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.summary-score-block .score-header span {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0369a1;
}

.summary-score-block .score-header strong {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0284c7;
  line-height: 1;
}

.summary-score-block .recommendation-text {
  margin: 0;
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.3;
}

.summary-actions-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quick-btn:hover {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #0284c7;
  transform: translateX(2px);
}

.quick-btn .icon {
  width: 14px;
  height: 14px;
  color: #0284c7;
}

/* Integrated Metric Strip */
.dashboard-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding-top: 14px;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
}

.metric-item:nth-child(1) {
  background: #f0f9ff;
  border-color: #bae6fd;
}
.metric-item:nth-child(1) strong { color: #0369a1; }

.metric-item:nth-child(2) {
  background: #faf5ff;
  border-color: #e9d5ff;
}
.metric-item:nth-child(2) strong { color: #7e22ce; }

.metric-item:nth-child(3) {
  background: #fffbf5;
  border-color: #fed7aa;
}
.metric-item:nth-child(3) strong { color: #c2410c; }

.metric-item:nth-child(4) {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.metric-item:nth-child(4) strong { color: #15803d; }

.metric-item .metric-info p {
  margin: 0;
  font-size: 0.74rem;
  color: #475569;
  font-weight: 600;
}

.metric-item .metric-info strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
}

.metric-item .metric-info small {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
}

/* 2-Column Balanced Workspace Grid */
.dashboard-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.dashboard-main-col,
.dashboard-side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.student-scores-panel .table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.student-scores-panel table {
  width: 100%;
  min-width: 0 !important;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.student-scores-panel th {
  padding: 7px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  white-space: nowrap;
}

.student-scores-panel td {
  padding: 7px 8px;
  font-size: 0.8rem;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}

.student-scores-panel th:nth-child(1),
.student-scores-panel td:nth-child(1) {
  text-align: left;
}

.student-scores-panel th:nth-child(2),
.student-scores-panel td:nth-child(2) {
  width: 76px;
  text-align: center;
  white-space: nowrap;
}

.student-scores-panel th:nth-child(3),
.student-scores-panel td:nth-child(3) {
  width: 65px;
  text-align: center;
  white-space: nowrap;
}

.student-scores-panel th:nth-child(4),
.student-scores-panel td:nth-child(4) {
  width: 92px;
  text-align: center;
  white-space: nowrap;
}

.student-scores-panel .chip {
  font-size: 0.7rem;
  padding: 1.5px 7px;
  white-space: nowrap;
}

.dashboard-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(310px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  opacity: 0.85;
}

.dashboard-analysis-layout .panel:first-child::before {
  background: linear-gradient(90deg, #38bdf8, #60a5fa);
}

.dashboard-analysis-layout .panel.accent-panel::before {
  background: linear-gradient(90deg, #fb923c, #f59e0b);
}

.dashboard-bottom-grid .panel:first-child::before {
  background: linear-gradient(90deg, #c084fc, #a855f7);
}

.dashboard-bottom-grid .panel:last-child::before {
  background: linear-gradient(90deg, #4ade80, #22c55e);
}

.dashboard-analysis-layout .table-wrap {
  max-height: 360px;
  overflow-y: auto;
}

.accent-panel {
  background: #ffffff;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.panel-heading h2 {
  margin: 4px 0 0;
  font-size: 1.16rem;
}

.panel-heading h3 {
  margin: 2px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.inline-note {
  color: var(--muted);
  font-size: 0.88rem;
}

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

.quick-action {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  min-height: 76px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  padding: 12px 14px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.quick-action:hover {
  transform: translateY(-2px);
  border-color: #7dd3fc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.quick-action .metric-icon {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
}

.quick-action:nth-child(1) .metric-icon {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7;
}

.quick-action:nth-child(2) .metric-icon {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  color: #9333ea;
}

.quick-action:nth-child(3) .metric-icon {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #ea580c;
}

.quick-action:nth-child(4) .metric-icon {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

.quick-action strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
  font-weight: 700;
}

.quick-action small {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 500;
}

.stacked-form {
  display: grid;
  gap: 13px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

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

.primary-button {
  padding: 11px 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(21, 94, 117, 0.18);
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table-wrap.wide {
  max-height: calc(100vh - 190px);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f7f9;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

td {
  font-size: 0.94rem;
}

tbody tr:hover {
  background: #f8fbfd;
}

.score-table th,
.score-table td {
  text-align: center;
}

.score-table th:first-child,
.score-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 190px;
  background: #fff;
  text-align: left;
}

.score-table th:first-child {
  z-index: 3;
  background: #f3f7f9;
}

.score-input {
  width: 74px;
  text-align: center;
  font-weight: 700;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}

.chip.pass {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.chip.good {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

.chip.warn {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.chip.fail {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.chip.info {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.icon-button:hover:not(:disabled) {
  background: var(--red-soft);
  border-color: #f1bdc2;
  color: var(--red);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
  padding: 34px 10px;
}

.insight-list,
.report-card-list,
.bar-list,
.team-grid {
  display: grid;
  gap: 10px;
}

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

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

.insight-item,
.student-report,
.bar-row,
.team-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(20, 33, 43, 0.03);
}

.team-card span {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.team-card strong {
  display: block;
  margin: 2px 0 4px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  word-break: break-word;
}

.team-card p,
.team-card small {
  font-size: 0.72rem;
  line-height: 1.35;
  color: #64748b;
  margin: 0;
}

.insight-item strong,
.student-report strong,
.bar-row strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  line-height: 1.35;
}

.insight-item p.muted,
.compact-row p.muted {
  font-size: 0.74rem;
  color: #64748b;
  margin: 0 0 5px;
  line-height: 1.35;
}

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

.bar-row-head .chip {
  font-size: 0.7rem;
  padding: 1px 7px;
  font-weight: 700;
}

.compact-row p {
  margin: 0 0 5px;
}

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

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ink-soft);
  box-shadow: inset 0 1px 2px rgba(20, 33, 43, 0.08);
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--primary);
  transition: width 180ms ease;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.26), transparent);
}

.progress-fill.pass {
  background: linear-gradient(90deg, #4ade80, #22c55e);
}

.progress-fill.good {
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

.progress-fill.warn {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.progress-fill.fail {
  background: linear-gradient(90deg, #fb7185, #f43f5e);
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.search-box {
  position: relative;
  width: min(300px, 100%);
}

.search-box .icon {
  position: absolute;
  top: 12px;
  left: 11px;
  color: var(--muted);
}

.search-box input {
  padding-left: 38px;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--primary);
}

.timeline-dot.pass,
.timeline-dot.active {
  background: var(--green);
}

.timeline-dot.warn,
.timeline-dot.update {
  background: var(--amber);
}

.timeline-dot.fail,
.timeline-dot.admin,
.timeline-dot.score {
  background: var(--primary);
}

.timeline-item strong {
  display: block;
  margin-bottom: 2px;
}

.timeline-item p {
  margin: 0 0 4px;
}

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: grid;
  gap: 8px;
  width: auto;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(12px);
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast.success {
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.toast.warning {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

@keyframes content-in {
  from {
    transform: translateY(6px);
    opacity: 0;
  }

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

.official-print-document {
  display: none;
}

.official-page {
  color: #000000;
  font-family: "Noto Sans Thai", "TH Sarabun New", "Sarabun", serif;
  line-height: 1.4;
  padding: 0;
  margin: 0 auto;
}

/* Official Government Garuda & Header */
.gov-garuda-header {
  text-align: center;
  margin-bottom: 8px;
}

.gov-school-logo-img {
  display: inline-block;
  max-height: 80px;
  max-width: 120px;
  object-fit: contain;
  margin: 0 auto 4px;
}

.gov-garuda-svg {
  display: inline-block;
  width: 72px;
  height: 68px;
  fill: #000000;
}

.gov-header-text {
  text-align: center;
  margin-bottom: 14px;
}

.gov-title {
  margin: 0 0 4px 0;
  font-size: 16pt;
  font-weight: 700;
  line-height: 1.3;
  color: #000000;
}

.gov-sub {
  margin: 0 0 2px 0;
  font-size: 12pt;
  color: #1a1a1a;
}

.gov-school, .gov-class {
  margin: 0 0 2px 0;
  font-size: 13pt;
  font-weight: 600;
  color: #000000;
}

/* Official Metadata Box */
.gov-meta-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #000000;
  font-size: 11pt;
  margin-bottom: 12px;
}

.gov-meta-table td {
  border: 1px solid #000000;
  padding: 4px 8px;
  color: #000000;
}

/* Official Section Titles */
.gov-section-title {
  font-size: 12pt;
  font-weight: 700;
  margin: 14px 0 5px 0;
  color: #000000;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Official Government Standard Tables */
.gov-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #000000;
  font-size: 10.5pt;
  margin-bottom: 10px;
}

.gov-table th,
.gov-table td {
  border: 1px solid #000000;
  padding: 4px 6px;
  color: #000000;
}

.gov-table th {
  background-color: #f1f5f9;
  text-align: center;
  font-weight: 700;
  vertical-align: middle;
}

.gov-table-total-row {
  background-color: #f8fafc;
  font-weight: 700;
}

.gov-stats-summary {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px dashed #666666;
  padding: 6px 12px;
  background: #fafafa;
  font-size: 10.5pt;
  margin-bottom: 14px;
}

/* Official Dual Signatures Block */
.gov-signatures-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 28px;
  text-align: center;
  font-size: 11.5pt;
  page-break-inside: avoid;
  break-inside: avoid;
}

.gov-sig-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gov-sig-line {
  border-bottom: 1px dotted #000000;
  width: 220px;
  height: 28px;
  margin-bottom: 6px;
}

.gov-sig-name {
  font-weight: 700;
  margin: 0 0 2px 0;
}

.gov-sig-role {
  margin: 0 0 2px 0;
  font-size: 10.5pt;
}

.gov-sig-date {
  margin: 0;
  font-size: 10pt;
  color: #333333;
}

.icon,
.metric-icon svg,
.nav-tab svg,
.ghost-button svg,
.primary-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* --- Report Hub Styling --- */
.official-screen-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  border-bottom: 2px solid #cbd5e1;
}

.official-screen-table td {
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
}

.report-a4-paper-wrapper {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  font-family: "Noto Sans Thai", "TH Sarabun New", serif;
  line-height: 1.5;
}

.report-mode-tab {
  transition: all 0.2s ease;
}

.report-mode-tab:hover {
  color: #0284c7 !important;
}

/* --- Batch Word Import from Excel Styling --- */
.batch-import-panel {
  border: 1px solid #bae6fd;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  margin-bottom: 20px;
}

.batch-import-panel::before {
  background: linear-gradient(90deg, #0284c7, #38bdf8, #818cf8);
  height: 4px;
}

.batch-import-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
  align-items: start;
}

.batch-config-col,
.batch-paste-col {
  display: flex;
  flex-direction: column;
}

.batch-mode-box {
  margin-top: 10px;
}

.batch-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.batch-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.batch-radio-card:hover {
  border-color: #7dd3fc;
  background: #f0f9ff;
}

.batch-radio-card.active {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
}

.batch-radio-card input[type="radio"] {
  width: auto;
  min-height: auto;
  margin-top: 3px;
  accent-color: #0284c7;
}

.batch-radio-card strong {
  display: block;
  font-size: 0.82rem;
  color: #0f172a;
}

.batch-radio-card small {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.3;
}

.batch-paste-col textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 10px 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  font-family: inherit;
  resize: vertical;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.batch-paste-col textarea:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
  outline: none;
}

.batch-preview-box {
  margin-top: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.batch-words-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  padding: 4px 2px;
}

.batch-word-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.batch-word-pill .pill-num {
  font-size: 0.68rem;
  opacity: 0.7;
  font-family: "JetBrains Mono", monospace;
}

/* Format tags for column instructions */
.format-tag {
  display: inline-block;
  padding: 2px 7px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid #bae6fd;
}

.format-tag.text-muted {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #cbd5e1;
}

/* Batch Student Import Preview Table */
.batch-student-preview-table-wrap {
  max-height: 195px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.batch-student-preview-table-wrap table {
  width: 100%;
  font-size: 0.78rem;
  margin: 0;
  border-collapse: collapse;
}

.batch-student-preview-table-wrap th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 7px 9px;
  border-bottom: 1px solid #e2e8f0;
  z-index: 1;
  text-align: left;
}

.batch-student-preview-table-wrap td {
  padding: 6px 9px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.batch-student-preview-table-wrap tr:hover td {
  background: #f0f9ff;
}

@media (max-width: 900px) {
  .batch-import-grid {
    grid-template-columns: 1fr;
  }
  .batch-radio-group {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Clean & Luxury Student Management & Import Styling
   ========================================================================== */
.student-management-panel {
  border: 1px solid #bae6fd;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  margin-bottom: 22px;
  position: relative;
  overflow: visible;
}

.student-management-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #818cf8);
  border-radius: 14px 14px 0 0;
}

/* Segmented Control / Tab Switcher */
.segmented-control {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  gap: 2px;
}

.segment-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.segment-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.segment-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Sleek Format Bar */
.import-format-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 12px;
}

.format-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.format-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
}

.format-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.format-step {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #0369a1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.format-arrow {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Import Textarea Box */
.import-textarea-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.import-textarea-box:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.import-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.import-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

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

.ghost-btn {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ghost-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.import-textarea-box textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #0f172a;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  padding: 2px 0;
}

.import-textarea-box textarea::placeholder {
  color: #94a3b8;
  font-size: 0.8rem;
}

/* Inline Action & Options Bar */
.import-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.import-controls-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-item label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  margin: 0;
}

.control-item select {
  font-size: 0.82rem;
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  min-height: 34px;
}

/* Advanced Settings Popover Details */
.advanced-settings-details {
  position: relative;
  display: inline-block;
}

.advanced-summary-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: all 0.15s ease;
  min-height: 34px;
}

.advanced-summary-btn::-webkit-details-marker {
  display: none;
}

.advanced-summary-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.advanced-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  padding: 14px 16px;
  min-width: 320px;
}

.adv-group {
  margin-bottom: 12px;
}

.adv-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.batch-radio-group.mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.batch-radio-group.mini .batch-radio-card {
  padding: 6px 8px;
  font-size: 0.76rem;
}

.adv-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.adv-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #334155;
  cursor: pointer;
  margin: 0;
}

.adv-check-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 15px;
  accent-color: #0284c7;
}

/* Discreet Tip Bar */
.import-discreet-tip {
  margin-top: 10px;
  padding: 6px 12px;
  background: #f0fdf4;
  border-left: 3px solid #22c55e;
  border-radius: 0 8px 8px 0;
  font-size: 0.76rem;
  color: #166534;
  line-height: 1.4;
}

/* Submit Button in Import */
.import-btn-main {
  padding: 8px 20px;
  font-weight: 700;
  font-size: 0.88rem;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  border-radius: 8px;
}

.import-btn-main:hover {
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

/* Clean Single Student Form */
.clean-student-form {
  padding: 4px 0 0;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 12px;
}

.form-row-3 label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.form-row-3 input,
.form-row-3 select {
  font-size: 0.86rem;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}

.req {
  color: #ef4444;
}

.form-actions-right {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Full-width Student Registry Section */
.student-registry-panel {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

@media (max-width: 860px) {
  .form-row-3 {
    grid-template-columns: 1fr;
  }
  .import-action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .import-controls-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .control-item {
    justify-content: space-between;
  }
}

/* ==========================================================================
   Live Classroom Testing & Screen Presentation Modal
   ========================================================================== */
.live-test-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  background: rgba(15, 23, 42, 0.82) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  animation: liveModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-test-modal.is-hidden {
  display: none !important;
}

@keyframes liveModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.live-test-container {
  width: 96vw;
  max-width: 1240px;
  height: 94vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  border: 1px solid #bae6fd;
}

/* Fullscreen Mode */
.live-test-container:fullscreen,
.live-test-container.is-fullscreen {
  width: 100vw;
  max-width: none;
  height: 100vh;
  border-radius: 0;
  border: none;
}

/* ==========================================================================
   PowerPoint Presenter View Standalone Page (presenter.php)
   ========================================================================== */
body.presenter-page {
  margin: 0 !important;
  padding: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  background: #0f172a !important;
  color: #0f172a !important;
  font-family: "Noto Sans Thai", "Outfit", sans-serif;
  user-select: none;
}

body.presenter-page .live-test-modal {
  position: static !important;
  display: flex !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #0f172a !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  animation: none !important;
  z-index: 1 !important;
}

body.presenter-page .live-test-container {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: #f8fafc;
}

body.presenter-page .live-test-header {
  padding: 6px 14px !important;
  background: #0f172a;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  min-height: 48px;
}

body.presenter-page .live-test-header::before {
  background: linear-gradient(90deg, #0284c7, #38bdf8, #10b981);
  height: 3px;
}

body.presenter-page .live-app-badge {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
  flex-shrink: 0;
  padding: 3px 8px;
  font-size: 0.74rem;
}

body.presenter-page .live-assessment-title {
  color: #f8fafc;
  font-size: 0.88rem !important;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: clamp(120px, 16vw, 240px);
}

body.presenter-page .live-timer-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  flex-shrink: 0;
  padding: 3px 8px;
  font-size: 0.78rem;
}

body.presenter-page .live-station-body {
  height: calc(100vh - 65px) !important;
  max-height: calc(100vh - 65px) !important;
}

/* ==========================================================================
   Live Assessment Progress Banner on Scores & Assessments Page
   ========================================================================== */
.live-progress-banner {
  margin-bottom: 16px;
}

.live-progress-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-left: 5px solid #0284c7;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.live-progress-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.progress-info-group {
  flex: 1;
  min-width: 280px;
}

.progress-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.banner-badge.in-progress {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.banner-badge.finished {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.banner-badge.not-started {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.banner-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  animation: pulseDot 1.5s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.progress-summary-headline {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.progress-sub-note {
  margin: 4px 0 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

.progress-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.resume-action-btn {
  padding: 8px 18px;
  font-size: 0.85rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
}

.resume-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.progress-meter-track {
  width: 100%;
  height: 9px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  margin-bottom: 8px;
}

.progress-meter-fill.done {
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.3s ease;
}

.progress-meter-fill.skipped {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  transition: width 0.3s ease;
}

.progress-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ptag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.ptag.done {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.ptag.skipped {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.ptag.pending {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.ptag.percent {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* ==========================================================================
   Compact & Stunning Assessment Sets Progress Bar (แถบกราฟิกสถานะชุดที่ 1, 2, ... สวยงาม กะทัดรัด)
   ========================================================================== */
.assessment-sets-bar {
  margin-top: 6px;
  width: 100%;
}

/* แสดงแถบสถานะความคืบหน้ารายชุดเฉพาะในหน้าภาพรวม (dashboard) และหน้ารายงาน (reports) เท่านั้น */
body:not([data-active-view="dashboard"]):not([data-active-view="reports"]) .assessment-sets-bar,
body:not([data-active-view="dashboard"]):not([data-active-view="reports"]) #assessmentSetsBar {
  display: none !important;
}

.sets-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.sets-bar-lead {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-right: 8px;
  border-right: 1px solid #e2e8f0;
}

.sets-bar-lead-icon {
  font-size: 1rem;
  line-height: 1;
}

.sets-bar-lead-text {
  display: flex;
  flex-direction: column;
}

.sets-lead-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
  line-height: 1.2;
}

.sets-lead-hint {
  font-size: 0.64rem;
  color: #64748b;
  white-space: nowrap;
  line-height: 1.2;
}

.sets-chips-scroll-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  flex: 1 1 auto;
  padding: 1px 1px;
  scrollbar-width: thin;
}

.sets-chips-scroll-row::-webkit-scrollbar {
  height: 3px;
}

.sets-chips-scroll-row::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.set-progress-chip {
  flex: 1 1 180px;
  min-width: 160px;
  max-width: 270px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  user-select: none;
}

.set-progress-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
  border-color: #94a3b8;
}

.set-progress-chip.is-active {
  border: 1.5px solid #0284c7 !important;
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%) !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.14) !important;
}

.set-progress-chip.completed {
  border-left: 3px solid #10b981;
}

.set-progress-chip.in-progress {
  border-left: 3px solid #f59e0b;
}

.set-progress-chip.pending {
  border-left: 3px solid #cbd5e1;
}

.set-chip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.set-chip-badge-group {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.set-chip-num-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0284c7;
  white-space: nowrap;
  flex-shrink: 0;
}

.set-progress-chip.completed .set-chip-num-badge {
  background: #dcfce7;
  color: #15803d;
}

.set-progress-chip.in-progress .set-chip-num-badge {
  background: #fef3c7;
  color: #b45309;
}

.set-chip-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.set-chip-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.active-pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 5px #0284c7;
  animation: pulseDot 1.5s infinite ease-in-out;
}

.set-chip-meter-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.set-chip-meter-track {
  flex: 1;
  height: 5px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.set-chip-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease-out;
}

.set-chip-meter-fill.completed {
  background: linear-gradient(90deg, #10b981, #059669);
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.3);
}

.set-chip-meter-fill.in-progress {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  box-shadow: 0 0 5px rgba(245, 158, 11, 0.3);
}

.set-chip-meter-fill.pending {
  background: #cbd5e1;
}

.set-chip-percent-val {
  font-size: 0.74rem;
  font-weight: 800;
  min-width: 32px;
  text-align: right;
  line-height: 1;
}

.set-chip-percent-val.completed {
  color: #15803d;
}

.set-chip-percent-val.in-progress {
  color: #b45309;
}

.set-chip-percent-val.pending {
  color: #94a3b8;
}

.set-chip-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-top: 2px;
  border-top: 1px dashed #f1f5f9;
}

.set-chip-count-text {
  font-size: 0.66rem;
  font-weight: 600;
  color: #64748b;
}

.set-chip-cta-btn {
  font-size: 0.66rem;
  font-weight: 700;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: all 0.15s ease;
}

.set-progress-chip:hover .set-chip-cta-btn {
  color: #2563eb;
  transform: translateX(2px);
}

@media (max-width: 768px) {
  .sets-bar-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .sets-bar-lead {
    border-right: none;
    border-bottom: 1px solid #cbd5e1;
    padding-right: 0;
    padding-bottom: 6px;
  }
  .set-progress-chip {
    max-width: 100%;
    min-width: 100%;
  }
}

/* ==========================================================================
   Scores Page: Compact Graphic Assessment Progress Bar & Switcher Strip
   ========================================================================== */
.scores-compact-progress-widget {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scores-sets-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.strip-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #475569;
}

.strip-icon {
  font-size: 0.95rem;
}

.strip-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scores-set-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.scores-set-pill:hover {
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.scores-set-pill.is-active {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff !important;
  border-color: #0284c7;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.3);
}

.scores-set-pill .pill-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0284c7;
}

.scores-set-pill.is-active .pill-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.scores-set-pill .pill-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e293b;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scores-set-pill.is-active .pill-name {
  color: #ffffff;
}

.scores-set-pill .pill-meter {
  display: inline-block;
  width: 40px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.scores-set-pill.is-active .pill-meter {
  background: rgba(255, 255, 255, 0.3);
}

.scores-set-pill .pill-meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.scores-set-pill .pill-meter-fill.completed {
  background: #10b981;
}

.scores-set-pill .pill-meter-fill.in-progress {
  background: #f59e0b;
}

.scores-set-pill .pill-meter-fill.pending {
  background: #94a3b8;
}

.scores-set-pill.is-active .pill-meter-fill {
  background: #ffffff;
}

.scores-set-pill .pill-percent {
  font-size: 0.78rem;
  font-weight: 800;
  min-width: 30px;
  text-align: right;
}

.scores-set-pill .pill-percent.completed {
  color: #059669;
}

.scores-set-pill .pill-percent.in-progress {
  color: #d97706;
}

.scores-set-pill .pill-percent.pending {
  color: #64748b;
}

.scores-set-pill.is-active .pill-percent {
  color: #ffffff !important;
}

.scores-set-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 5px #38bdf8;
}

/* Active Set Highlighted Graphic Progress Bar */
.scores-active-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-left: 5px solid #0284c7;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.scores-active-bar.completed {
  border-left-color: #10b981;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.scores-active-bar.in-progress {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.active-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  min-width: 220px;
}

.active-bar-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0284c7;
  white-space: nowrap;
  flex-shrink: 0;
}

.scores-active-bar.completed .active-bar-badge {
  background: #dcfce7;
  color: #15803d;
}

.scores-active-bar.in-progress .active-bar-badge {
  background: #fef3c7;
  color: #b45309;
}

.active-bar-title-wrap {
  display: flex;
  flex-direction: column;
}

.active-bar-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.active-bar-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 1px;
}

.active-bar-status.completed {
  color: #15803d;
}

.active-bar-status.in-progress {
  color: #b45309;
}

.active-bar-meter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 200px;
  max-width: 320px;
}

.active-bar-meter-track {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.active-bar-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease-out;
}

.active-bar-meter-fill.completed {
  background: linear-gradient(90deg, #10b981, #059669);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.active-bar-meter-fill.in-progress {
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.active-bar-meter-fill.pending {
  background: #cbd5e1;
}

.active-bar-percent-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 48px;
}

.active-bar-percent-num {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.active-bar-percent-box.completed .active-bar-percent-num {
  color: #059669;
}

.active-bar-percent-box.in-progress .active-bar-percent-num {
  color: #d97706;
}

.active-bar-percent-box.pending .active-bar-percent-num {
  color: #64748b;
}

.active-bar-percent-label {
  font-size: 0.64rem;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1;
  margin-top: 2px;
}

.active-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.compact-resume-btn {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border-radius: 7px;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.compact-resume-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(2, 132, 199, 0.35);
}

.compact-reset-btn {
  padding: 5px 10px;
  font-size: 0.74rem;
  color: #64748b;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.compact-reset-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* Modal Header */
.live-test-header {
  padding: 6px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  flex-shrink: 0;
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

.live-test-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #818cf8);
}

.live-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap !important;
  flex-shrink: 1;
  min-width: 0;
}

.live-app-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid #bae6fd;
  flex-shrink: 0;
}

.live-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
  min-width: 0;
}

.live-assessment-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: clamp(120px, 18vw, 240px);
}

/* Mode Switcher */
.live-mode-switcher {
  display: inline-flex;
  background: #f1f5f9;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  gap: 2px;
  flex-shrink: 0;
}

.live-mode-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.live-mode-btn:hover {
  color: #0f172a;
}

.live-mode-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

/* Header Actions */
.live-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
}

/* Hide bulky redundant sync pill in top bar to keep all elements strictly on 1 line */
#liveTeacherSyncPill {
  display: none !important;
}

.live-action-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.live-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.live-close-btn {
  border: 1px solid #fecdd3;
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.live-close-btn:hover {
  background: #fecaca;
  color: #b91c1c;
}

/* ================= Presentation Stage ================= */
.live-presentation-stage {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 20px 18px;
  background: radial-gradient(circle at center top, #f0fdf4 0%, #f8fafc 60%, #f1f5f9 100%);
  position: relative;
  overflow-y: auto;
  box-sizing: border-box;
}

.live-progress-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.live-progress-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-item-badge {
  padding: 3px 12px;
  background: #0284c7;
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.live-skill-badge {
  padding: 3px 10px;
  background: #e2e8f0;
  color: #475569;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.live-item-nav-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 600px;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.live-dot:hover {
  background: #7dd3fc;
  transform: scale(1.3);
}

.live-dot.active {
  background: #0284c7;
  transform: scale(1.4);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.live-dot.scored {
  background: #22c55e;
}

/* Big Word / Textbook Passage Card */
.live-word-card {
  width: 100%;
  max-width: 760px;
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 22px;
  text-align: center;
  border: 1.5px solid #bae6fd;
  box-shadow: 0 12px 30px -10px rgba(2, 132, 199, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  box-sizing: border-box;
}

/* Card Header Info Strip */
.live-card-badge-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.live-content-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.live-item-num-chip {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

/* Word Text with Adaptive Proportions */
.live-word-text {
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin: 6px 0;
  user-select: none;
  word-break: break-word;
}

.live-word-card.is-word .live-word-text {
  font-size: clamp(2.5rem, 5.5vw, 3.8rem);
}

.live-word-card.is-sentence .live-word-text {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.5;
  color: #1e293b;
  font-weight: 700;
}

/* Authentic Thai Textbook Reading Passage Box (ข้อความของหนังสือ) */
.live-book-passage-box {
  width: 100%;
  box-sizing: border-box;
  background: #fffdfa;
  border: 1.5px solid #fed7aa;
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 4px;
  text-align: left;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.03);
}

.book-reader-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #c2410c;
  font-size: 0.82rem;
  font-weight: 700;
  border-bottom: 1px dashed #fed7aa;
  padding-bottom: 6px;
}

.book-passage-content {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.85;
  color: #1c1917;
  font-weight: 500;
  text-indent: 2.2em;
  text-align: justify;
  word-break: break-word;
  font-family: "Noto Sans Thai", serif;
}

.live-word-example {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.4;
}

/* Dictation Prompt Box */
.live-dictation-prompt {
  padding: 8px 0;
}

.dictation-icon {
  font-size: 2.8rem;
  margin-bottom: 4px;
}

.dictation-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #0284c7;
  margin: 0 0 6px;
}

.dictation-sub {
  font-size: 0.95rem;
  color: #475569;
  margin: 0 auto;
  max-width: 520px;
  line-height: 1.5;
}



/* ================= Bottom Teacher Dock ================= */
.live-control-dock {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  flex-shrink: 0;
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.04);
}

.dock-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Student Section */
.dock-student-section {
  display: flex;
  flex-direction: column;
}

.dock-student-picker {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-nav-btn {
  width: 36px;
  height: 38px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.dock-nav-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.dock-student-dropdown {
  min-width: 220px;
  max-width: 280px;
  height: 38px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 10px;
}

.dock-student-score-summary {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 4px;
}

.dock-student-score-summary strong {
  color: #0284c7;
}

/* Scoring Section */
.dock-scoring-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dock-score-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.score-quick-btn {
  border: none;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-quick-btn .btn-key {
  font-size: 0.72rem;
  opacity: 0.75;
  font-weight: 500;
}

.score-quick-btn.pass {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.score-quick-btn.pass:hover {
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.score-quick-btn.fail {
  background: #f1f5f9;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.score-quick-btn.fail:hover {
  background: #fee2e2;
  border-color: #fda4af;
  transform: translateY(-1px);
}

.dock-current-status {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 4px;
}

/* Word Nav Section */
.dock-word-nav-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.dock-word-nav-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-nav-word-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  transition: all 0.15s ease;
}

.dock-nav-word-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.dock-nav-word-btn.primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}

.dock-nav-word-btn.primary:hover {
  box-shadow: 0 5px 14px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

/* Shortcuts Helper */
.live-shortcuts-bar {
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  padding: 6px 14px;
  text-align: center;
  font-size: 0.76rem;
  color: #64748b;
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .live-control-dock {
    flex-direction: column;
    align-items: stretch;
  }
  .dock-student-dropdown {
    max-width: none;
    flex: 1;
  }
  .dock-scoring-section,
  .dock-word-nav-section {
    align-items: stretch;
  }
  .dock-score-buttons,
  .dock-word-nav-buttons {
    width: 100%;
  }
  .score-quick-btn,
  .dock-nav-word-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Station View Tabs */
.live-station-view-tabs {
  display: inline-flex;
  background: #f1f5f9;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  gap: 2px;
}

.live-station-tab {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.live-station-tab:hover {
  color: #0284c7;
  background: rgba(255, 255, 255, 0.6);
}

.live-station-tab.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* Station Body & Split Mode */
.live-station-body {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  overflow: hidden;
  position: relative;
}

.live-station-body.is-split {
  flex-direction: row;
}

.live-station-body.is-split .live-presentation-stage {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  border-right: 2px solid #e2e8f0;
}

.live-station-body.is-split .live-roster-stage {
  flex: 1.15;
  min-width: 0;
  box-sizing: border-box;
  display: flex !important;
}

/* Enhanced Teacher Cue Bar with Pronunciation (จัดให้อยู่ในกรอบสีเหลืองอย่างสมบูรณ์แบบ) */
.live-teacher-cue-panel {
  width: 100%;
  max-width: 860px;
  box-sizing: border-box;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-left: 5px solid #f59e0b;
  border-radius: 12px;
  padding: 10px 16px;
  margin-top: 10px;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  overflow: visible;
}

.cue-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #fde68a;
  font-size: 0.8rem;
  font-weight: 700;
  color: #b45309;
  width: 100%;
  box-sizing: border-box;
}

.cue-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cue-speak-btn, .cue-edit-btn {
  border: 1px solid #fcd34d;
  background: #ffffff;
  color: #92400e;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cue-speak-btn:hover, .cue-edit-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

.cue-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.cue-word-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.cue-word-label {
  font-size: 0.82rem;
  color: #78350f;
  font-weight: 600;
  white-space: nowrap;
}

.cue-word {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  background: #fef3c7;
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid #fde68a;
  white-space: nowrap;
}

.cue-pronounce-badge {
  font-size: 0.88rem;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
  padding: 2px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.cue-pronounce-badge strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.cue-sentence-row {
  font-size: 0.84rem;
  color: #78350f;
  line-height: 1.4;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
}

/* ================= View 2: Class Scoring Roster ================= */
.live-roster-stage {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  overflow: hidden;
  box-sizing: border-box;
}

.roster-toolbar {
  padding: 12px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.roster-word-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.roster-toolbar-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.roster-nav-btn {
  width: 32px;
  height: 34px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roster-nav-btn:hover {
  background: #e2e8f0;
}

.roster-item-dropdown {
  height: 34px;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  padding: 0 10px;
  color: #0f172a;
  background: #ffffff;
}

.roster-current-word-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #0369a1;
  background: #e0f2fe;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #bae6fd;
}

.roster-pronounce-pill {
  font-weight: 800;
  color: #166534;
  background: #dcfce7;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

.roster-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.roster-batch-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.roster-batch-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.roster-batch-btn.pass {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.roster-batch-btn.pass:hover {
  background: #d1fae5;
}

.roster-batch-btn.fail {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.roster-batch-btn.fail:hover {
  background: #ffe4e6;
}

.roster-batch-btn.reset {
  background: #f8fafc;
  color: #475569;
}

.roster-summary-chip {
  padding: 4px 10px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #bae6fd;
}

/* Roster Table */
.roster-table-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.live-roster-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.live-roster-table th {
  background: #f1f5f9;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #cbd5e1;
  text-transform: none;
}

.live-roster-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.86rem;
  color: #1e293b;
  vertical-align: middle;
}

.live-roster-table tr:hover td {
  background: #f8fafc;
}

.live-roster-table tr.row-passed td {
  background: #f0fdf4;
}

.live-roster-table tr.row-failed td {
  background: #fff1f2;
}

.roster-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #e2e8f0;
  color: #1e293b;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
}

.roster-name-cell {
  font-weight: 700;
  color: #0f172a;
}

.roster-score-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.roster-quick-btn {
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.roster-quick-btn.pass {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.roster-quick-btn.pass:hover,
.roster-quick-btn.pass.active {
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}

.roster-quick-btn.fail {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.roster-quick-btn.fail:hover,
.roster-quick-btn.fail.active {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* ==========================================================================
   Exam Live Progress Tracker & Question Navigation Stepper
   ========================================================================== */
.live-exam-progress-card {
  width: 100%;
  max-width: 860px;
  background: #ffffff;
  border: 1px solid #e0f2fe;
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.06);
}

.live-exam-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.progress-left-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.progress-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.progress-stat-pill.main {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
  color: #0369a1;
  border-color: #bae6fd;
  font-size: 0.86rem;
}

.progress-stat-pill.main strong {
  color: #0284c7;
  font-weight: 800;
}

.progress-stat-pill.done {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.progress-stat-pill.skipped {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
  animation: pulseSkipped 2s infinite ease-in-out;
}

@keyframes pulseSkipped {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.progress-stat-pill.remaining {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

.progress-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-skip-item-btn {
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #b45309;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.08);
}

.live-skip-item-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
  transform: translateY(-1px);
}

.live-jump-skipped-btn {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #0284c7;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.live-jump-skipped-btn:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

/* Multi-segment Progress Meter Bar */
.live-progress-meter {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
}

.meter-bar {
  height: 100%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.meter-bar.done {
  background: linear-gradient(90deg, #10b981, #059669);
}

.meter-bar.skipped {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* Question Stepper: Circular Numbered Badges (วงกลมเขียว = ทำแล้ว, วงกลมแดง = ยังไม่ได้ทำ) แถวละ 15 ข้อ */
.live-item-nav-pills {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 5px 3px;
  justify-items: center;
  align-items: center;
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 4px 0;
}

.live-item-nav-pills.few-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.live-item-circle-btn {
  width: 25px;
  height: 25px;
  min-width: 25px;
  border-radius: 50%;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: "Outfit", "JetBrains Mono", sans-serif;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  color: #ffffff;
  padding: 0;
  line-height: 1;
}

/* วงกลมสีเขียวถ้าทำแล้ว (Done) */
.live-item-circle-btn.done {
  background: #10b981;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}

/* วงกลมสีแดงถ้ายังไม่ได้ทำ (Pending) */
.live-item-circle-btn.pending {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.25);
}

/* วงกลมสีส้มถ้าข้ามข้อ (Skipped) */
.live-item-circle-btn.skipped {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.25);
}

/* ข้อปัจจุบันที่กำลังเปิดทดสอบอยู่ (Active) */
.live-item-circle-btn.active {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0284c7, 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  transform: scale(1.22);
  z-index: 2;
}

.live-item-circle-btn:hover {
  transform: scale(1.18);
  filter: brightness(1.1);
}

/* Skip Button in Bottom Word Nav Dock */
.dock-nav-word-btn.skip {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.dock-nav-word-btn.skip:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

/* ==========================================================================
   Dual-Screen PowerPoint-Style Presenter Station Additions
   ========================================================================== */
.live-open-projector-btn {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  border: 1px solid #059669 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.live-open-projector-btn:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.live-open-projector-btn .projector-icon {
  font-size: 0.88rem;
}

/* Live Exam Timer in Teacher Top Bar */
.live-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

.live-timer-badge strong {
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  color: #166534;
}

.timer-dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: timerPulseLive 1.4s infinite ease-in-out;
}

@keyframes timerPulseLive {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* Screen Sync Pill */
.live-screen-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.live-screen-sync-pill.disconnected {
  background: #fef2f2;
  border-color: #fecdd3;
  color: #991b1b;
}

/* Optimize Split View in Presenter Station */
@media (min-width: 1024px) {
  .live-station-body.is-split .live-presentation-stage {
    max-width: 50%;
    min-width: 0;
    padding: 10px 14px;
    gap: 8px;
    overflow-y: auto;
  }

  .live-station-body.is-split .live-roster-stage {
    max-width: 50%;
    min-width: 0;
    overflow-y: auto;
  }

  .live-station-body.is-split .live-word-card {
    min-height: auto;
    padding: 12px 16px;
  }

  .live-station-body.is-split .live-word-card.is-word .live-word-text {
    font-size: 2.6rem;
  }

  .live-station-body.is-split .live-word-card.is-sentence .live-word-text {
    font-size: 1.45rem;
    line-height: 1.45;
  }

  .live-station-body.is-split .book-passage-content {
    font-size: 1.15rem;
    line-height: 1.7;
  }

  .live-station-body.is-split .live-teacher-cue-panel {
    padding: 8px 12px;
    gap: 4px;
  }
}

/* Optimize Single View (จอเดี่ยว) in Presenter Station: แสดงข้อมูลคุณครูครบถ้วน ไม่โดนตัดขอบ */
.live-station-body:not(.is-split) .live-presentation-stage,
.live-station-body.is-presentation .live-presentation-stage {
  padding: 10px 20px 14px;
  gap: 6px;
}

.live-station-body:not(.is-split) .live-exam-progress-card,
.live-station-body.is-presentation .live-exam-progress-card {
  padding: 8px 16px;
  margin-bottom: 8px;
  max-width: 860px;
}

.live-station-body:not(.is-split) .live-exam-progress-header,
.live-station-body.is-presentation .live-exam-progress-header {
  margin-bottom: 6px;
  gap: 8px;
}

.live-station-body:not(.is-split) .live-word-card,
.live-station-body.is-presentation .live-word-card {
  padding: 10px 20px;
  max-width: 860px;
  min-height: auto;
}

.live-station-body:not(.is-split) .live-card-badge-strip,
.live-station-body.is-presentation .live-card-badge-strip {
  margin-bottom: 6px;
  padding-bottom: 4px;
}

.live-station-body:not(.is-split) .live-dictation-prompt,
.live-station-body.is-presentation .live-dictation-prompt {
  padding: 4px 0;
}

.live-station-body:not(.is-split) .dictation-icon,
.live-station-body.is-presentation .dictation-icon {
  font-size: 2.2rem;
  margin-bottom: 2px;
}

.live-station-body:not(.is-split) .dictation-title,
.live-station-body.is-presentation .dictation-title {
  font-size: clamp(1.8rem, 3.8vw, 2.5rem);
  margin: 0 0 4px;
}

.live-station-body:not(.is-split) .dictation-sub,
.live-station-body.is-presentation .dictation-sub {
  font-size: 0.9rem;
  line-height: 1.4;
}

.live-station-body:not(.is-split) .live-word-card.is-word .live-word-text,
.live-station-body.is-presentation .live-word-card.is-word .live-word-text {
  font-size: clamp(2.2rem, 4.8vw, 3.2rem);
  margin: 4px 0;
}

.live-station-body:not(.is-split) .live-word-card.is-sentence .live-word-text,
.live-station-body.is-presentation .live-word-card.is-sentence .live-word-text {
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  line-height: 1.4;
  margin: 4px 0;
}

.live-station-body:not(.is-split) .live-teacher-cue-panel,
.live-station-body.is-presentation .live-teacher-cue-panel {
  max-width: 860px;
  margin-top: 8px;
  padding: 8px 14px;
  gap: 6px;
  flex-shrink: 0;
  overflow: visible;
}

.live-station-body:not(.is-split) .cue-tag,
.live-station-body.is-presentation .cue-tag {
  padding-bottom: 4px;
  font-size: 0.8rem;
}

/* Arrange Teacher Cue Row & Example Sentence elegantly side-by-side on wide Single Screen (จอเดี่ยว) */
.live-station-body:not(.is-split) .cue-content,
.live-station-body.is-presentation .cue-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.live-station-body:not(.is-split) .cue-word-row,
.live-station-body.is-presentation .cue-word-row {
  flex: 0 0 auto;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-station-body:not(.is-split) .cue-word,
.live-station-body.is-presentation .cue-word {
  font-size: 1.15rem;
  padding: 2px 8px;
}

.live-station-body:not(.is-split) .cue-pronounce-badge,
.live-station-body.is-presentation .cue-pronounce-badge {
  font-size: 0.85rem;
  padding: 2px 8px;
}

.live-station-body:not(.is-split) .cue-sentence-row,
.live-station-body.is-presentation .cue-sentence-row {
  flex: 1 1 280px;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.84rem;
}

.live-station-body:not(.is-split) .cue-sentence,
.live-station-body.is-presentation .cue-sentence {
  background: rgba(254, 243, 199, 0.7);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px dashed #fcd34d;
  color: #78350f;
  line-height: 1.4;
  display: inline-block;
  text-align: left;
}

@media (max-width: 768px) {
  .live-station-body:not(.is-split) .cue-sentence-row,
  .live-station-body.is-presentation .cue-sentence-row {
    justify-content: flex-start;
  }
}

/* ==========================================================================
   Academic Charts & Educational Statistics Suite Styling
   ========================================================================== */
.academic-stats-panel {
  transition: all 0.2s ease;
}

.acad-stat-box {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.acad-stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
  border-color: #bae6fd !important;
}

.chart-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chart-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
}

.chart-filter-btn {
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chart-filter-btn:hover {
  color: #0284c7 !important;
}

.chart-filter-btn.active:hover {
  color: #ffffff !important;
}

.chart-donut-segment:hover {
  stroke-width: 48px;
}

.chart-bar-group:hover rect {
  filter: brightness(1.1);
  transform: scaleY(1.02);
  transform-origin: bottom;
}

.chart-line-point:hover circle {
  r: 6.5px;
  stroke: #0284c7;
  stroke-width: 3px;
  fill: #ffffff;
}

.academic-chart-tooltip {
  animation: tooltipFadeIn 0.12s ease forwards;
}

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

@media print {
  .chart-filter-pills,
  .report-view-mode-tabs,
  .report-header-actions {
    display: none !important;
  }
  .chart-card {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    page-break-inside: avoid;
  }
}

/* =========================================================
   DEDICATED CLASSROOM LIVE TEST STATION (แบบประเมิน)
   ========================================================= */
.assessment-launch-station {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.assessment-launch-station:hover {
  box-shadow: 0 16px 36px -12px rgba(15, 23, 42, 0.35);
}

#startLiveTestMainBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.55) !important;
  filter: brightness(1.05);
}

#startLiveTestMainBtn:active {
  transform: translateY(0);
}

.assessment-launch-actions button {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .assessment-launch-station {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
  }
  .assessment-launch-actions {
    width: 100%;
    flex-direction: column !important;
  }
  .assessment-launch-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   SCORING ENFORCEMENT & COMPLETION GATE STYLES
   ========================================================= */

/* Attention shake animation on pass/fail buttons when teacher tries to press Next without scoring */
@keyframes attentionShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.btn-attention-shake {
  animation: attentionShake 0.4s ease-in-out !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.45) !important;
}

/* Locked Next Item button state */
.dock-nav-word-btn.is-locked {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  opacity: 0.75;
}

.dock-nav-word-btn.is-locked:hover {
  background: #e2e8f0 !important;
  color: #64748b !important;
  transform: none !important;
}

/* Pulsing highlight for Skip button when Next button is locked */
@keyframes pulseSkipBtn {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    transform: scale(1.03);
  }
}

.dock-nav-word-btn.pulse-highlight {
  animation: pulseSkipBtn 1.8s infinite;
  border-color: #f59e0b !important;
  color: #d97706 !important;
  background: #fef3c7 !important;
  font-weight: 800 !important;
}

/* Unscored table cell indicator */
.score-input.is-unscored {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
}

.score-input.is-unscored:focus {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  color: #0f172a !important;
}

/* Locked disabled button */
.btn-disabled-locked {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.5);
}

/* Completion Gate Banner */
.completion-gate-banner {
  transition: all 0.2s ease;
}

.completion-gate-banner:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Dashboard Collapsible Summary Accordion (ย่อลงเป็น Dropdown เด้งลงมา)
   ========================================================================== */
.dashboard-accordion-panel {
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
}

.dashboard-accordion-panel:hover {
  border-color: #bae6fd;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.08);
}

.dashboard-accordion-header {
  transition: background-color 0.15s ease;
}

.dashboard-accordion-header:hover {
  background-color: #f8fafc;
}

.dashboard-accordion-header:hover .accordion-toggle-pill {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  transform: translateY(-1px);
}

.dashboard-accordion-body {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
}

.dashboard-accordion-body.is-collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  pointer-events: none;
}

.dashboard-accordion-body.is-expanded {
  max-height: 1200px !important;
  opacity: 1 !important;
  pointer-events: auto;
}

.accordion-toggle-arrow {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-accordion-header.is-open .accordion-toggle-arrow {
  transform: rotate(180deg);
}

.dashboard-accordion-header.is-open .accordion-toggle-pill {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

/* ==========================================================================
   Role-Based Scope Badges & Locked Selectors
   ========================================================================== */
.topbar-scope-badge {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.topbar-scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.topbar-scope-pill.teacher {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #6ee7b7;
  color: #065f46;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.08);
}

.topbar-scope-pill.admin {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 1px solid #d8b4fe;
  color: #6b21a8;
  box-shadow: 0 1px 4px rgba(168, 85, 247, 0.08);
}

.topbar-scope-pill .scope-icon {
  font-size: 0.78rem;
}

.select-locked {
  background-color: #f8fafc !important;
  color: #0369a1 !important;
  font-weight: 700 !important;
  cursor: default !important;
  border-color: #cbd5e1 !important;
  opacity: 0.95;
}

/* Teachers Table & Form Specific Polish */
.teachers-grid {
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: start;
}

@media (max-width: 1024px) {
  .teachers-grid {
    grid-template-columns: 1fr !important;
  }
}

.teachers-table {
  min-width: 660px;
}

.teachers-table th,
.teachers-table td {
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.teachers-table th {
  font-size: 0.74rem;
  color: #475569;
  background: #f8fafc;
  font-weight: 700;
  white-space: nowrap;
}

.teachers-table td {
  font-size: 0.78rem;
  color: #1e293b;
}

.teachers-table td .muted {
  font-size: 0.72rem;
  color: #64748b;
}

/* App Modal Base Styles */
.app-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  box-sizing: border-box;
}

.app-modal.is-hidden {
  display: none !important;
}

.app-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1051;
}

.app-modal-dialog {
  position: relative;
  z-index: 1052;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 32px);
  padding: 22px 24px;
  animation: appModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  margin: auto;
}

@keyframes appModalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.app-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.app-modal-title-group h3 {
  margin: 4px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.app-modal-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
}

.app-modal-close {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.app-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.app-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* Large Modal Dialog (e.g. Student Management / Excel Import) */
.app-modal-dialog.app-modal-dialog-lg {
  max-width: 880px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 18px 22px;
  overflow: hidden;
}

.app-modal-dialog-lg .app-modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 90px);
  padding-right: 6px;
  margin-top: 6px;
}

.app-modal-dialog-lg .app-modal-body::-webkit-scrollbar {
  width: 6px;
}

.app-modal-dialog-lg .app-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

/* Student Registry Header Action Toolbar & Button Group */
.student-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.student-btn-group {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
  gap: 2px;
}

.student-btn-group .btn-group-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.student-btn-group .btn-group-item.primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.student-btn-group .btn-group-item.primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

.student-btn-group .btn-group-item.secondary {
  color: #0369a1;
  background: #ffffff;
}

.student-btn-group .btn-group-item.secondary:hover {
  background: #e0f2fe;
  color: #0284c7;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .student-toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }
  .student-btn-group {
    width: 100%;
    justify-content: stretch;
  }
  .student-btn-group .btn-group-item {
    flex: 1;
    justify-content: center;
  }
}

/* Assessment Action Toolbar & Button Group */
.assessment-action-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  margin-bottom: 20px;
}

.assessment-toolbar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.assessment-toolbar-info .toolbar-pill-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.assessment-toolbar-info .toolbar-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.assessment-toolbar-info .toolbar-desc {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
}

.assessment-btn-group {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
}

.assessment-btn-group .btn-group-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.assessment-btn-group .btn-group-item.primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.assessment-btn-group .btn-group-item.primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

.assessment-btn-group .btn-group-item.secondary {
  color: #0369a1;
  background: #ffffff;
}

.assessment-btn-group .btn-group-item.secondary:hover {
  background: #e0f2fe;
  color: #0284c7;
  transform: translateY(-1px);
}

.assessment-btn-group .btn-group-item.excel-btn {
  color: #047857;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.assessment-btn-group .btn-group-item.excel-btn:hover {
  background: #dcfce7;
  color: #065f46;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.2);
}

@media (max-width: 768px) {
  .assessment-action-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .assessment-btn-group {
    width: 100%;
    justify-content: stretch;
  }
  .assessment-btn-group .btn-group-item {
    flex: 1;
    justify-content: center;
  }
}

/* ==========================================================================
   Redesigned Live Presenter Console with Right-Side Slide-Out Scoring Drawer
   ========================================================================== */
.live-header-center {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
}

.live-mask-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.live-mask-pill-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.live-shuffle-btn {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: #0284c7;
}

.live-shuffle-btn:hover {
  background: rgba(14, 165, 233, 0.18);
  border-color: #0284c7;
  color: #0369a1;
}

.live-scoring-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-scoring-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(2, 132, 199, 0.45);
}

.scoring-count-pill {
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.sync-dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  box-shadow: 0 0 6px #22c55e;
}

.live-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.live-icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Workspace Container */
.live-main-workspace {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  position: relative;
  overflow: hidden;
  background: #f8fafc;
}

/* Center Stage Card */
.live-stage-card {
  flex: 1 1 0%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px 16px;
  background: radial-gradient(circle at 50% 15%, #f0fdf4 0%, #f8fafc 55%, #f1f5f9 100%);
  overflow-y: auto;
  box-sizing: border-box;
  position: relative;
  transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stage Top Strip */
.stage-top-strip {
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.stage-item-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-size: 0.8rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.item-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0284c7;
}

.item-pill-total {
  color: #64748b;
  font-size: 0.76rem;
}

.stage-dots-stepper {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 540px;
}

.stage-dot-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  transition: all 0.15s ease;
  padding: 0;
}

.stage-dot-btn:hover {
  transform: scale(1.15);
}

.stage-dot-btn.done {
  background: #22c55e;
  border-color: #16a34a;
  color: #ffffff;
}

.stage-dot-btn.skipped {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
}

.stage-dot-btn.pending {
  background: #f8fafc;
  color: #64748b;
}

.stage-dot-btn.active {
  border: 2px solid #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
  transform: scale(1.18);
  font-weight: 800;
}

.stage-skip-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-skip-btn, .stage-jump-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #b45309;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.stage-skip-btn:hover, .stage-jump-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

/* Big Word Center Area */
.stage-word-center {
  width: 100%;
  max-width: 840px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1.5px solid #bae6fd;
  border-radius: 20px;
  padding: 24px 32px 18px;
  box-shadow: 0 10px 30px -8px rgba(2, 132, 199, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 12px;
  box-sizing: border-box;
}

.stage-word-center .live-word-text {
  font-size: 3.4rem;
  font-weight: 800;
  color: #0f172a;
  margin: 12px 0;
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.5px;
}

.stage-word-center.is-sentence .live-word-text {
  font-size: 2.2rem;
}

.stage-word-center.is-passage .live-word-text {
  font-size: 1.5rem;
}

/* Minimal Pronunciation Strip */
.stage-pronounce-bar {
  width: 100%;
  max-width: 680px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 7px 16px;
  margin-top: 10px;
  font-size: 0.82rem;
  box-sizing: border-box;
}

.pronounce-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pronounce-label {
  color: #92400e;
  font-weight: 600;
}

.pronounce-val {
  color: #b45309;
  font-size: 0.92rem;
  font-weight: 800;
}

.pronounce-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pronounce-speak-btn, .pronounce-edit-btn {
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid #fcd34d;
  background: #ffffff;
  color: #92400e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.pronounce-speak-btn:hover, .pronounce-edit-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

.stage-example-text {
  color: #78350f;
  font-size: 0.78rem;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floating Navigation Capsule Dock */
.stage-floating-dock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  margin-top: 4px;
}

.dock-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.dock-btn.prev {
  background: #f1f5f9;
  color: #334155;
}

.dock-btn.prev:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.dock-btn.next {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.dock-btn.next:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.dock-btn.skip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  padding: 0 12px;
}

.dock-btn.skip:hover {
  background: #fef3c7;
}

.dock-btn.score-trigger {
  background: #10b981;
  color: #ffffff;
  font-weight: 800;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.dock-btn.score-trigger:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.dock-indicator {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  padding: 0 8px;
}

.dock-divider {
  width: 1px;
  height: 20px;
  background: #e2e8f0;
}

/* ==========================================================================
   Right-Side Slide-Over Scoring Drawer (Flex-coordinated with Stage)
   ========================================================================== */
.live-scoring-drawer {
  position: relative;
  width: 480px;
  max-width: 92vw;
  flex-shrink: 0;
  margin-right: -480px;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -6px 0 25px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transform: none;
  transition: margin-right 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  overflow: hidden;
}

.live-scoring-drawer.is-open {
  margin-right: 0;
  box-shadow: -10px 0 35px rgba(15, 23, 42, 0.16);
}

@media (max-width: 768px) {
  .live-scoring-drawer {
    width: 380px;
    margin-right: -380px;
  }
}

@media (max-width: 580px) {
  .live-scoring-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .live-scoring-drawer.is-open {
    transform: translateX(0);
  }
}

.drawer-header {
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.drawer-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.drawer-word-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
  display: block;
}

.drawer-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecdd3;
}

.drawer-subtabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.drawer-subtab {
  flex: 1;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-subtab.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.drawer-body-single {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-student-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
}

.card-caption {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  display: block;
  margin-bottom: 8px;
}

.student-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.student-step-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.student-step-btn:hover {
  background: #f1f5f9;
  color: #0284c7;
}

.student-select-box {
  flex: 1;
}

.student-dropdown {
  width: 100%;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
}

.student-summary-row {
  margin-top: 10px;
  font-size: 0.78rem;
  color: #64748b;
  text-align: right;
}

.student-summary-row strong {
  color: #0284c7;
}

/* Big Scoring Action Buttons */
.drawer-scoring-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.score-card-btn {
  padding: 20px 14px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.score-card-btn:hover {
  transform: translateY(-2px);
}

.score-card-btn:active {
  transform: scale(0.97);
}

.score-card-btn.pass {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.score-card-btn.pass:hover {
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.45);
}

.score-card-btn.fail {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}

.score-card-btn.fail:hover {
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.45);
}

.score-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
}

.score-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.score-btn-title {
  font-size: 0.95rem;
  font-weight: 800;
}

.score-btn-key {
  font-size: 0.74rem;
  opacity: 0.9;
}

/* Status Chip */
.drawer-current-status-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #475569;
}

.status-chip {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
}

.drawer-keyboard-tip {
  margin-top: auto;
  padding: 10px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #0369a1;
  line-height: 1.4;
}

/* Roster Mode View */
.drawer-body-roster {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-roster-actions {
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.roster-btns-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.roster-quick-btn {
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  transition: all 0.15s ease;
}

.roster-quick-btn.pass {
  border-color: #86efac;
  background: #dcfce7;
  color: #15803d;
}

.roster-quick-btn.fail {
  border-color: #fecdd3;
  background: #fee2e2;
  color: #dc2626;
}

.roster-quick-btn.reset {
  color: #64748b;
}

.roster-stat-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0284c7;
}

.drawer-roster-container {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.roster-header-row {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  box-sizing: border-box;
}

.roster-col-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 0%;
  min-width: 0;
}

.roster-th-num {
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.roster-th-name {
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-col-right {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 152px;
  flex-shrink: 0;
  justify-content: space-between;
}

.roster-th-pass {
  width: 72px;
  text-align: center;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 0;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 0.74rem;
}

.roster-th-fail {
  width: 72px;
  text-align: center;
  color: #b91c1c;
  background: #fee2e2;
  padding: 3px 0;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 0.74rem;
}

.roster-items-list {
  display: flex;
  flex-direction: column;
}

.roster-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.roster-row-item:hover {
  background: #f8fafc;
}

.roster-row-item.is-passed {
  background: rgba(240, 253, 244, 0.45);
}

.roster-row-item.is-failed {
  background: rgba(254, 242, 242, 0.45);
}

.roster-student-col {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 0%;
  min-width: 0;
}

.roster-num-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.roster-student-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.roster-student-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.roster-student-score {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
}

.roster-choice-col {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  width: 152px;
  justify-content: space-between;
}

.roster-btn-pill {
  width: 72px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.roster-btn-pill:hover {
  transform: translateY(-1px);
}

.roster-btn-pill.pass:hover {
  border-color: #86efac;
  background: #f0fdf4;
  color: #16a34a;
}

.roster-btn-pill.pass.active {
  background: #16a34a;
  border-color: #15803d;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
}

.roster-btn-pill.fail:hover {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #dc2626;
}

.roster-btn-pill.fail.active {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

/* ==========================================================================
   Role Switcher & Co-Homeroom Teacher Styles
   ========================================================================== */
.role-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
  user-select: none;
}

.role-switch-btn:active {
  transform: scale(0.96);
}

.role-switch-btn.mode-admin {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-color: #fcd34d;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.15);
}

.role-switch-btn.mode-admin:hover {
  background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.25);
}

.role-switch-btn.mode-teacher {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
  border-color: #7dd3fc;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.15);
}

.role-switch-btn.mode-teacher:hover {
  background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
}

.role-switch-icon {
  display: inline-block;
  font-size: 0.95rem;
  line-height: 1;
}

.sidebar-role-switch-btn {
  width: calc(100% - 24px);
  margin: -6px 12px 14px;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  box-sizing: border-box;
}

.teacher-co-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  margin-left: 4px;
}

/* Bulk Delete Actions */
.bulk-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid #fca5a5;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.12);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.bulk-delete-btn:hover {
  background: linear-gradient(135deg, #fee2e2 0%, #ef4444 100%);
  color: #ffffff;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.25);
}

.bulk-delete-btn:hover .bulk-count-badge {
  background: #ffffff;
  color: #dc2626;
}

.bulk-delete-btn:active {
  transform: scale(0.97);
}

.bulk-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  transition: all 0.2s ease;
}

