/* Teacher Hub · Tenuto assignment UI */

.teacher-hub {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

.teacher-hub-hero {
  margin-bottom: 32px;
}

.teacher-hub-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.teacher-hub-hero h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.teacher-hub-hero p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 560px;
}

.teacher-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.teacher-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--color-primary);
  color: #fff !important;
  font-weight: 650;
  font-size: 14px;
}

.teacher-btn-primary:hover {
  background: var(--color-primary-hover);
  color: #fff !important;
}

.teacher-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-primary) !important;
  font-weight: 650;
  font-size: 14px;
}

.teacher-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

@media (max-width: 720px) {
  .teacher-steps {
    grid-template-columns: 1fr;
  }
}

.teacher-step {
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
  padding: 16px;
}

.teacher-step .n {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.teacher-step h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.teacher-step p {
  font-size: 13px;
  color: var(--color-text-tertiary);
  line-height: 1.45;
}

/* Builder */
.teacher-assign-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 860px) {
  .teacher-assign-layout {
    grid-template-columns: 1fr;
  }
}

.teacher-panel {
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: 20px;
}

.teacher-field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 14px 0 8px;
}

.teacher-field-label:first-child {
  margin-top: 0;
}

.seg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seg-btn {
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
}

.seg-btn.on {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--color-primary);
}

.teacher-input {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  padding: 0 12px;
  font-size: 14px;
}

.teacher-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--color-bg-secondary);
  border-radius: 10px;
}

.teacher-toggle .t {
  font-size: 14px;
  font-weight: 650;
}

.teacher-toggle .s {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

.challenge-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.challenge-fields.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.challenge-fields label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  display: block;
  margin-bottom: 6px;
}

.assign-link-box {
  background: var(--color-bg-secondary);
  border: 1px dashed rgba(37, 99, 235, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  word-break: break-all;
  line-height: 1.4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--color-text-secondary);
  margin: 10px 0 14px;
  min-height: 64px;
}

.assign-code-box {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 14px;
  padding: 18px 16px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--color-text-primary);
  margin: 4px 0 0;
  user-select: all;
}

.assign-summary-kv {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 6px 10px;
  font-size: 13px;
  margin-bottom: 12px;
}

.assign-summary-kv .k {
  color: var(--color-text-tertiary);
}

.assign-summary-kv .v {
  font-weight: 600;
}

.assign-flash {
  margin-top: 10px;
  font-size: 13px;
  color: #0A6B45;
  font-weight: 600;
}

.teacher-login-gate {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* Check */
.teacher-check-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

.check-mode-tabs {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}

.check-mode-tab {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.check-mode-tab.is-active {
  background: var(--color-text-primary, #111);
  border-color: transparent;
  color: #fff;
}

.check-input-row {
  display: flex;
  gap: 8px;
  margin: 16px 0 20px;
}

.check-input-row input {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  padding: 0 12px;
  font-size: 13px;
}

.reports-list-card {
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 16px;
}

.reports-list-head {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text-secondary);
}

.reports-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 8px;
  border: 0;
  border-top: 1px solid var(--color-border-light);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.reports-list-item:first-of-type {
  border-top: 0;
}

.reports-list-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.reports-list-item .name {
  flex: 1;
  font-weight: 700;
  font-size: 14px;
}

.reports-list-item .meta {
  font-size: 12px;
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

.reports-list-item .pct {
  font-size: 14px;
  font-weight: 800;
  color: #0A6B45;
  min-width: 44px;
  text-align: right;
}

.reports-list-empty {
  font-size: 13px;
  color: var(--color-text-tertiary);
  padding: 8px 4px;
}

.report-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.report-badge.ok {
  background: rgba(10, 107, 69, 0.12);
  color: #0A6B45;
}

.report-badge.bad {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.report-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.report-signed {
  font-size: 14px;
  color: var(--color-text-tertiary);
  margin: 6px 0 16px;
}

.report-card {
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.report-pct {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0A6B45;
}

.report-pct span {
  font-size: 18px;
  color: var(--color-text-tertiary);
  font-weight: 600;
}

.report-kv {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 6px 8px;
  font-size: 13px;
  margin-top: 12px;
}

.report-kv .k {
  color: var(--color-text-tertiary);
}

.report-kv .v {
  font-weight: 600;
}

.report-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.report-mistake {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 14px;
}

.report-mistake:last-child {
  border-bottom: none;
}

.report-mistake .n {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 90, 94, 0.15);
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.report-mistake .d {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

.report-mistake-card {
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--color-bg-secondary);
}

.report-mistake-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.report-mistake-head .n {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 90, 94, 0.15);
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.report-mistake-head .d {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

.report-ans-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 650;
}

.report-ans-row .bad {
  color: #c2410c;
}

.report-ans-row .ok {
  color: #0A6B45;
}

.report-staff {
  width: 100%;
  box-sizing: border-box;
  min-height: 110px;
  max-height: 240px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--color-border-light);
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 8px 10px;
  color: var(--color-text-tertiary);
  font-size: 12px;
  text-align: center;
}

.report-staff.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.report-staff > svg {
  display: block !important;
  margin: 0 auto !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 220px !important;
  transform: none !important;
}

@media (max-width: 640px) {
  .report-staff {
    max-height: 200px;
    padding: 6px 8px;
  }

  .report-staff > svg {
    max-height: 180px !important;
  }

  .teacher-check-wrap {
    padding: 24px 14px 56px;
  }
}

.report-no-staff {
  font-size: 12px;
  margin: 0;
}

.report-staff-fallback {
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 650;
}

.report-warn {
  margin-top: 10px;
  font-size: 13px;
  color: #9a3412;
}

.muted {
  color: var(--color-text-tertiary);
  font-size: 13px;
}

/* Landing */
.assignment-landing {
  max-width: 480px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

.landing-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.assignment-landing h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.landing-meta {
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0 20px;
}

.landing-meta .row {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 14px;
}

.landing-meta .row:last-child {
  border-bottom: none;
}

.landing-meta .k {
  color: var(--color-text-tertiary);
}

.landing-meta .v {
  font-weight: 650;
}

.landing-howto {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.landing-howto ol {
  padding-left: 18px;
  margin-top: 8px;
  line-height: 1.55;
}

/* Practice assignment chrome */
.assignment-mode-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(37, 99, 235, 0.08);
  border-bottom: 1px solid var(--color-border-light);
  font-size: 12.5px;
  font-weight: 650;
  color: #1d4ed8;
}

.assignment-mode-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1d4ed8;
  flex-shrink: 0;
}

.assignment-mode-text {
  flex: 1;
  min-width: 0;
}

.assignment-mode-exit {
  font-size: 12px;
  font-weight: 650;
  color: #c2410c;
  padding: 4px 8px;
}

.assignment-complete-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.assignment-complete-sheet {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 12px 20px 28px;
}

.assignment-complete-grab {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: rgba(60, 60, 67, 0.18);
  margin: 0 auto 14px;
}

.assignment-complete-sheet h3 {
  text-align: center;
  font-size: 17px;
  font-weight: 750;
}

.assignment-complete-score {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  margin: 8px 0 4px;
}

.assignment-complete-hint {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-tertiary);
  margin-bottom: 14px;
}

.assignment-complete-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--color-text-tertiary);
  display: block;
  margin-bottom: 6px;
}

.assignment-complete-input {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  padding: 0 12px;
  font-size: 16px;
  margin-bottom: 12px;
}

.assignment-complete-error {
  font-size: 13px;
  margin-bottom: 10px;
  color: #dc2626;
}

.assignment-complete-primary {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.assignment-complete-ghost {
  width: 100%;
  height: 40px;
  margin-top: 6px;
  color: var(--color-primary);
  font-weight: 650;
  font-size: 14px;
}

.teacher-error {
  color: #dc2626;
  font-size: 14px;
}
