.teacher-request-panel {
  padding: 18px 20px;
}

.teacher-request-layout {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(420px, 1.5fr);
  gap: 22px;
  align-items: end;
}

.teacher-request-intro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.teacher-request-intro h2 {
  margin: 0;
  font-size: 18px;
}

.teacher-request-intro p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.teacher-request-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.teacher-request-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.teacher-request-form label {
  min-width: 0;
}

.teacher-request-form label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.teacher-request-form input {
  width: 100%;
}

.teacher-request-form .primary {
  min-height: 44px;
  white-space: nowrap;
}

.teacher-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.teacher-overview > div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 74px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
}

.teacher-overview-icon {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.teacher-overview strong,
.teacher-overview small {
  display: block;
}

.teacher-overview strong {
  color: var(--ink);
  font-size: 18px;
}

.teacher-overview small {
  margin-top: 2px;
  color: var(--muted);
}

.teacher-directory-panel {
  overflow: visible;
}

.teacher-person-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.teacher-person-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fcfefd;
  box-shadow: 0 7px 22px rgba(34, 68, 65, .035);
}

.teacher-person-top,
.teacher-person-identity,
.teacher-person-actions {
  display: flex;
  align-items: center;
}

.teacher-person-top {
  justify-content: space-between;
  gap: 12px;
}

.teacher-person-identity {
  min-width: 0;
  gap: 11px;
}

.teacher-person-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: var(--teal-dark);
  background: linear-gradient(145deg, var(--teal-soft), #f3fbf8);
  font-size: 15px;
  font-weight: 800;
}

.teacher-person-copy {
  min-width: 0;
}

.teacher-person-copy strong,
.teacher-person-copy small {
  display: block;
}

.teacher-person-copy strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.teacher-person-copy small {
  margin-top: 4px;
  color: var(--muted);
  direction: ltr;
  text-align: right;
}

.teacher-person-actions {
  position: relative;
  flex: 0 0 auto;
  gap: 8px;
}

.teacher-more {
  position: relative;
}

.teacher-more summary {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #687572;
  background: #fff;
  cursor: pointer;
  list-style: none;
  letter-spacing: 1px;
  line-height: 1;
}

.teacher-more summary::-webkit-details-marker {
  display: none;
}

.teacher-more[open] summary {
  border-color: #b8dcd7;
  color: var(--teal-dark);
  background: #f6fbfa;
}

.teacher-more-menu {
  position: absolute;
  z-index: 20;
  inset-inline-end: 0;
  top: 42px;
  width: 170px;
  overflow: hidden;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(34, 58, 55, .14);
}

.teacher-more-menu button {
  width: 100%;
  display: block;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.teacher-more-menu button:hover {
  background: #f5faf8;
}

.teacher-more-menu button.danger {
  color: #a94f42;
}

.teacher-person-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 15px;
  border: 1px solid #e3ecea;
  border-radius: 15px;
  background: #f8fbfa;
}

.teacher-person-stats > span {
  min-width: 0;
  padding: 10px 7px;
  text-align: center;
  border-inline-start: 1px solid #e3ecea;
}

.teacher-person-stats > span:first-child {
  border-inline-start: 0;
}

.teacher-person-stats strong,
.teacher-person-stats small {
  display: block;
}

.teacher-person-stats strong {
  color: var(--ink);
  font-size: 15px;
}

.teacher-person-stats small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.teacher-card-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
  padding: 11px;
  border: 1px dashed #cfe1de;
  border-radius: 14px;
  background: #fbfefd;
}

.teacher-card-details[hidden] {
  display: none;
}

.teacher-card-details > div {
  min-width: 0;
}

.teacher-card-details small,
.teacher-card-details strong {
  display: block;
}

.teacher-card-details small {
  color: var(--muted);
  font-size: 11px;
}

.teacher-card-details strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

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

  .teacher-person-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .teacher-request-form,
  .teacher-overview,
  .teacher-card-details {
    grid-template-columns: 1fr;
  }

  .teacher-request-form .primary {
    width: 100%;
  }

  .teacher-overview {
    gap: 8px;
  }

  .teacher-person-top {
    align-items: flex-start;
  }

  .teacher-person-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-person-stats > span:nth-child(3) {
    grid-column: 1 / -1;
    border-inline-start: 0;
    border-top: 1px solid #e3ecea;
  }
}
