/* Teacher workspace visual refresh. Scoped to existing teacher surfaces only. */
.teacher-dashboard,
.teacher-connections {
  --teacher-ink: #f5f7ff;
  --teacher-muted: #aab4c8;
  --teacher-line: rgba(163, 184, 218, .16);
  --teacher-surface: rgba(16, 24, 41, .78);
  --teacher-accent: #82b7ff;
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  color: var(--teacher-ink);
  display: grid;
  gap: 20px;
}
.teacher-dashboard-header {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgba(130, 183, 255, .24);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 95% 0%, rgba(91, 133, 255, .24), transparent 42%),
    linear-gradient(140deg, rgba(19, 37, 66, .98), rgba(10, 16, 29, .98));
}
.teacher-dashboard-header::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -72px;
  bottom: -105px;
  border: 1px solid rgba(130, 183, 255, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(130, 183, 255, .035), 0 0 0 48px rgba(130, 183, 255, .025);
  pointer-events: none;
}
.teacher-dashboard-kicker,
.teacher-dashboard-card-label {
  color: #9cc7ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.teacher-dashboard-header h2 {
  max-width: 18ch;
  margin: 10px 0;
  font-size: clamp(27px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.teacher-dashboard-header p {
  max-width: 58ch;
  margin: 0;
  color: #bdc8dc;
  line-height: 1.65;
}
.teacher-dashboard-stats,
.teacher-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}
.teacher-stat-card,
.teacher-dashboard-card {
  min-width: 0;
  border: 1px solid var(--teacher-line);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(26, 37, 58, .82), rgba(14, 20, 33, .9));
}
.teacher-stat-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 17px;
}
.teacher-stat-card span {
  color: var(--teacher-muted);
  font-size: 11px;
  line-height: 1.4;
}
.teacher-stat-card strong {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
.teacher-dashboard-section {
  min-width: 0;
  padding: clamp(16px, 2.5vw, 23px);
  border: 1px solid var(--teacher-line);
  border-radius: 21px;
  background: var(--teacher-surface);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .12);
}
.teacher-dashboard-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.teacher-dashboard-section-heading h3 {
  margin: 5px 0 7px;
  font-size: clamp(18px, 2.5vw, 23px);
  letter-spacing: -.025em;
}
.teacher-dashboard-section-heading p {
  max-width: 65ch;
  margin: 0;
  color: var(--teacher-muted);
  font-size: 13px;
  line-height: 1.6;
}
.teacher-dashboard-section-heading > span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--teacher-line);
  border-radius: 11px;
  color: #cfe3ff;
  background: rgba(130, 183, 255, .09);
  font-size: 12px;
  font-weight: 800;
}
.teacher-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.teacher-dashboard-card {
  padding: 18px;
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}
.teacher-dashboard-card h3 {
  margin: 9px 0 6px;
  font-size: 17px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.teacher-dashboard-card p {
  margin: 0;
  color: var(--teacher-muted);
  font-size: 13px;
  line-height: 1.55;
}
.teacher-learner-card {
  cursor: pointer;
}
.teacher-learner-card:hover {
  transform: translateY(-2px);
  border-color: rgba(130, 183, 255, .52);
  background: rgba(41, 62, 98, .5);
}
.teacher-learner-card:focus-visible,
.teacher-dashboard button:focus-visible,
.teacher-connections button:focus-visible,
.teacher-lesson-studio button:focus-visible,
.teacher-lesson-studio input:focus-visible,
.teacher-lesson-studio select:focus-visible,
.teacher-lesson-studio textarea:focus-visible {
  outline: 3px solid #82b7ff;
  outline-offset: 3px;
}
.teacher-results-list {
  display: grid;
  gap: 8px;
}
.teacher-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(163, 184, 218, .12);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}
.teacher-result-row > span,
.teacher-result-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.teacher-result-row strong {
  font-variant-numeric: tabular-nums;
}
.teacher-result-empty {
  padding: 18px;
  border: 1px dashed rgba(163, 184, 218, .24);
  border-radius: 14px;
  color: var(--teacher-muted);
  line-height: 1.6;
}
.teacher-dashboard-actions,
.teacher-lesson-studio .panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.teacher-dashboard .panel-button,
.teacher-connections .panel-button,
.teacher-lesson-studio .panel-button {
  min-height: 43px;
  padding: 11px 15px;
  border: 1px solid rgba(163, 184, 218, .2);
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  color: #f4f7ff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.teacher-dashboard .panel-button:hover,
.teacher-connections .panel-button:hover,
.teacher-lesson-studio .panel-button:hover {
  transform: translateY(-1px);
  border-color: rgba(130, 183, 255, .55);
  background: rgba(130, 183, 255, .1);
}
.teacher-dashboard .panel-button.primary,
.teacher-connections .panel-button.primary,
.teacher-lesson-studio .panel-button.primary {
  border-color: rgba(130, 183, 255, .45);
  background: linear-gradient(120deg, #3778d6, #526ce0);
  color: #fff;
}
.teacher-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}
.teacher-dashboard .teacher-request-input,
.teacher-dashboard input,
.teacher-lesson-form-grid input,
.teacher-lesson-form-grid select,
.teacher-lesson-form-grid textarea,
.teacher-lesson-assign-row select,
.teacher-lesson-submission input {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  min-height: 45px;
  border: 1px solid rgba(163, 184, 218, .2);
  border-radius: 12px;
  background: rgba(5, 10, 19, .72);
  color: #f4f7ff;
  font: inherit;
}
.teacher-lesson-form-grid input,
.teacher-lesson-form-grid select,
.teacher-lesson-form-grid textarea,
.teacher-lesson-assign-row select,
.teacher-lesson-submission input {
  padding: 12px 13px;
}
.teacher-lesson-form-grid input::placeholder,
.teacher-lesson-form-grid textarea::placeholder,
.teacher-dashboard input::placeholder {
  color: #8d9bb2;
}
.teacher-lesson-studio {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  display: grid;
  gap: 18px;
  color: #f5f7ff;
}
.teacher-lesson-form {
  border-color: rgba(130, 183, 255, .26);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(72, 115, 218, .13), transparent 42%),
    rgba(16, 24, 41, .86);
}
.teacher-lesson-form .teacher-dashboard-section-heading {
  margin-bottom: 21px;
}
.teacher-lesson-form-grid {
  gap: 16px;
}
.teacher-lesson-form-grid label,
.teacher-lesson-assign-row label {
  min-width: 0;
  color: #c3cee0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}
.teacher-lesson-form-grid label input,
.teacher-lesson-form-grid label select,
.teacher-lesson-form-grid label textarea {
  margin-top: 2px;
}
.teacher-lesson-form-grid textarea {
  resize: vertical;
}
.teacher-lesson-full {
  grid-column: 1 / -1;
}
.teacher-lesson-card {
  margin-top: 0;
  padding: clamp(16px, 3vw, 25px);
  border-color: rgba(130, 183, 255, .19);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(20, 30, 49, .92), rgba(12, 18, 30, .96));
  box-shadow: 0 15px 38px rgba(0, 0, 0, .14);
}
.teacher-lesson-card > h3 {
  margin: 13px 0 8px;
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.teacher-lesson-card > p {
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.teacher-lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.teacher-lesson-meta span {
  padding: 6px 9px;
  border: 1px solid rgba(130, 183, 255, .19);
  border-radius: 999px;
  background: rgba(130, 183, 255, .07);
  color: #c4ddff;
  font-size: 11px;
  font-weight: 750;
}
.teacher-lesson-preparation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 16px 0;
}
.teacher-lesson-preparation-grid > section,
.teacher-lesson-columns > section {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(163, 184, 218, .13);
  border-radius: 15px;
  background: rgba(255, 255, 255, .025);
}
.teacher-lesson-card h4 {
  margin: 0 0 10px;
  color: #dce9ff;
  font-size: 13px;
  letter-spacing: .01em;
}
.teacher-lesson-card ul,
.teacher-lesson-card ol {
  padding-left: 20px;
  margin: 8px 0;
}
.teacher-lesson-card li {
  margin: 7px 0;
  color: #c0cbde;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.teacher-lesson-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.teacher-lesson-notes {
  max-height: 420px;
  padding: 14px;
  border: 1px solid rgba(163, 184, 218, .12);
  border-radius: 12px;
  background: rgba(3, 7, 14, .5);
  color: #d4dced;
  overflow: auto;
  overflow-wrap: anywhere;
}
.teacher-lesson-answer {
  margin: 7px 0 0;
  padding: 9px 11px;
  border-left: 2px solid #82b7ff;
  border-radius: 0 9px 9px 0;
  background: rgba(130, 183, 255, .07);
  color: #cce1ff !important;
}
.teacher-lesson-source-label {
  padding: 13px 0;
  border-top: 1px solid var(--teacher-line);
  border-bottom: 1px solid var(--teacher-line);
  color: var(--teacher-muted) !important;
  font-size: 12px;
}
.teacher-lesson-source-open {
  margin: 4px;
  padding: 7px 9px;
  border: 1px solid rgba(130, 183, 255, .2);
  border-radius: 9px;
  background: rgba(130, 183, 255, .06);
  color: #c4ddff;
  cursor: pointer;
}
.teacher-lesson-assign-row {
  align-items: end;
  padding-top: 14px;
}
.teacher-lesson-assign-row label {
  flex: 1 1 250px;
}
.teacher-lesson-assigned {
  color: #9db0ca !important;
  font-size: 12px;
}
.teacher-lesson-success {
  padding: 11px 13px;
  border: 1px solid rgba(74, 222, 128, .25);
  border-radius: 11px;
  background: rgba(74, 222, 128, .07);
  color: #b8f4cb !important;
}
.teacher-lesson-error {
  padding: 11px 13px;
  border: 1px solid rgba(248, 113, 113, .28);
  border-radius: 11px;
  background: rgba(248, 113, 113, .07);
  color: #fecaca !important;
}
.teacher-lesson-submissions {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid var(--teacher-line);
  border-radius: 15px;
  background: rgba(4, 8, 16, .42);
}
.teacher-lesson-submission {
  padding: 13px 0;
  border-bottom: 1px solid rgba(163, 184, 218, .12);
}
.teacher-lesson-grade-label {
  display: grid;
  gap: 7px;
  max-width: 260px;
  color: #c3cee0;
  font-size: 12px;
}
.teacher-connections .teacher-connection-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--teacher-line);
  border-radius: 16px;
  background: var(--teacher-surface);
}
.teacher-connections .teacher-connection-main {
  min-width: 0;
}
.teacher-connections .teacher-connection-main h3 {
  overflow-wrap: anywhere;
}
.teacher-connections .teacher-connection-meta {
  display: grid;
  justify-items: end;
  gap: 9px;
}
.teacher-connections .teacher-connection-status {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.teacher-connections .teacher-connection-status.active {
  color: #a7f3d0;
  background: rgba(16, 185, 129, .12);
}
.teacher-connections .teacher-connection-status.pending {
  color: #fde68a;
  background: rgba(245, 158, 11, .12);
}
@media (max-width: 760px) {
  .teacher-dashboard,
  .teacher-connections,
  .teacher-lesson-studio { gap: 14px; }
  .teacher-dashboard-stats,
  .teacher-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-dashboard-grid,
  .teacher-lesson-preparation-grid,
  .teacher-lesson-columns { grid-template-columns: minmax(0, 1fr); }
  .teacher-dashboard-header { border-radius: 19px; }
  .teacher-dashboard-section { padding: 15px; border-radius: 17px; }
  .teacher-search-row { grid-template-columns: minmax(0, 1fr); }
  .teacher-search-row button { width: 100%; }
  .teacher-dashboard-actions,
  .teacher-lesson-studio .panel-actions { flex-direction: column; }
  .teacher-dashboard-actions .panel-button,
  .teacher-lesson-studio .panel-actions .panel-button,
  .teacher-lesson-assign-row .panel-button { width: 100%; }
  .teacher-lesson-card { padding: 15px; }
  .teacher-lesson-assign-row { align-items: stretch; }
  .teacher-connections .teacher-connection-card { align-items: flex-start; flex-direction: column; }
  .teacher-connections .teacher-connection-meta { width: 100%; justify-items: start; }
}
@media (max-width: 390px) {
  .teacher-dashboard-stats,
  .teacher-stat-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .teacher-dashboard-card,
  .teacher-learner-card,
  .teacher-dashboard .panel-button,
  .teacher-lesson-studio .panel-button { transition: none; }
  .teacher-learner-card:hover,
  .teacher-dashboard .panel-button:hover,
  .teacher-lesson-studio .panel-button:hover { transform: none; }
}
