.classroom-shell > .classroom-create:has(#newClassroomName) {
  display: none;
}

.teacher-classroom-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.teacher-create-launch,
.teacher-classroom-hero-actions #refreshClassrooms {
  min-height: 46px;
  padding: 10px 16px;
}

.teacher-create-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.teacher-create-launch .profile-ui-icon {
  width: 20px;
  height: 20px;
}

.teacher-create-dialog {
  width: min(690px, calc(100vw - 32px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  box-shadow: 0 28px 80px rgba(7, 12, 28, 0.3);
}

.teacher-create-dialog[open] {
  animation: teacher-create-dialog-in 180ms ease-out both;
}

.teacher-create-dialog::backdrop {
  background: rgba(9, 16, 34, 0.56);
  backdrop-filter: blur(4px);
}

.teacher-create-dialog-surface {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(18, 19, 26, 0.98);
}

.teacher-create-dialog-header {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 14px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
}

.teacher-create-dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: var(--teacher-violet);
  background: var(--teacher-violet-soft);
}

.teacher-create-dialog-icon .profile-ui-icon {
  width: 24px;
  height: 24px;
}

.teacher-create-dialog-header h2 {
  margin: 4px 0 5px;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
}

.teacher-create-dialog-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.teacher-create-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.teacher-create-dialog-close:hover {
  border-color: rgba(103, 86, 232, 0.55);
  color: var(--teacher-violet);
  background: var(--teacher-violet-soft);
}

.teacher-create-close-icon {
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
}

.teacher-create-dialog-body {
  padding: 22px;
}

.teacher-create-dialog .classroom-create.is-dialog-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  gap: 16px;
  align-items: end;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.teacher-create-dialog .field-label {
  font-size: 15px;
}

.teacher-create-dialog .entry-input {
  min-height: 50px;
  font-size: 16px;
}

.teacher-create-dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.teacher-create-dialog-actions .btn {
  min-width: 150px;
  min-height: 46px;
}

.teacher-create-launch:focus-visible,
.teacher-create-dialog-close:focus-visible,
.teacher-create-dialog-actions .btn:focus-visible {
  outline: 3px solid rgba(103, 86, 232, 0.34);
  outline-offset: 2px;
}

html[data-theme="day"] .teacher-create-dialog-surface {
  color: #172033;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 28px 80px rgba(24, 36, 64, 0.2);
}

html[data-theme="day"] .teacher-create-dialog-close {
  color: #172033;
}

@keyframes teacher-create-dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 720px) {
  .classroom-hero {
    gap: 16px;
  }

  .teacher-classroom-hero-actions {
    width: 100%;
    justify-content: stretch;
  }

  .teacher-classroom-hero-actions .btn {
    flex: 1 1 0;
  }

  .teacher-create-dialog {
    width: min(100% - 20px, 690px);
  }

  .teacher-create-dialog-header {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 11px;
    padding: 18px 16px 16px;
  }

  .teacher-create-dialog-icon {
    width: 44px;
    height: 44px;
  }

  .teacher-create-dialog-header h2 {
    font-size: 21px;
  }

  .teacher-create-dialog-body {
    padding: 18px 16px;
  }

  .teacher-create-dialog .classroom-create.is-dialog-form {
    grid-template-columns: 1fr;
  }

  .teacher-create-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .teacher-create-dialog-actions .btn {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teacher-create-dialog[open] {
    animation: none;
  }

  .teacher-create-dialog-close {
    transition: none;
  }
}
