body {
  font-family: "Inter", Arial, sans-serif;
  background-color: #f7f9fc;
  color: #222;
  margin: 0;
  line-height: 1.5;
}

/* =========================
HEADER
========================= */
header {
  background-color: #0b2850;
  color: white;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0.8rem 2rem;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);

  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* =========================
NAVIGATION
========================= */
.top-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.12);
  color: white;

  border: 1px solid rgba(255, 255, 255, 0.15);

  padding: 0.55rem 0.8rem;
  border-radius: 10px;

  cursor: pointer;

  display: flex;
  align-items: center;
  gap: 0.35rem;

  font-weight: 600;
  font-size: 0.9rem;

  transition:
    background 0.3s,
    transform 0.2s,
    border 0.3s;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.nav-btn.active {
  background: white;
  color: #0b2850;
}

.nav-btn.logout {
  background: #9ca3af;
}

.nav-btn.logout:hover {
  background: #ef4444;
}

.nav-icon {
  font-size: 1.05rem;
}

.nav-text {
  white-space: nowrap;
}

/* =========================
PAGE
========================= */
.profile-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;

  gap: 2rem;

  padding: 3rem;
  max-width: 1200px;
  margin: auto;
}

.form-section {
  background: white;

  border-radius: 14px;

  padding: 2.5rem;

  width: 65%;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

h1 {
  font-size: 2rem;
  font-weight: 700;

  margin-top: 0;
  margin-bottom: 0.5rem;

  color: #0b2850;
}

.intro-text {
  color: #6b7280;

  margin-bottom: 2rem;
}

/* =========================
PROFILE STATUS SIDEBAR
========================= */
.profile-progress {
  background: white;

  border-radius: 14px;

  padding: 1.5rem;

  width: 25%;

  position: sticky;
  top: 6rem;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-progress h3 {
  margin-top: 0;
  color: #0b2850;
}

.profile-progress ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.profile-progress li {
  padding: 0.9rem;

  border-radius: 10px;

  margin-bottom: 0.8rem;

  background: #f8fafc;

  transition:
    transform 0.3s,
    background 0.3s;
}

.profile-progress li:hover {
  transform: translateX(3px);
}

.next-step-box {
  margin-top: 1rem;

  padding: 1rem;

  background: #eef6ff;

  border: 1px solid #bfdbfe;
  border-radius: 10px;

  color: #0b2850;
}

.next-step-box p {
  margin-bottom: 0;
}

.next-step-box.profile-completed {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

/* =========================
FORM ELEMENTS
========================= */

.required-label {
  color: #dc2626;
  margin-left: 0.15rem;
}

.optional-label {
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 500;
  margin-left: 0.2rem;
}

label {
  display: block;

  margin-top: 1rem;
  margin-bottom: 0.4rem;

  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;

  padding: 0.75rem;

  border: 1px solid #ccc;
  border-radius: 8px;

  resize: none;
  box-sizing: border-box;

  font-size: 0.95rem;

  transition:
    border 0.3s,
    box-shadow 0.3s;
}

input:disabled {
  background: #f3f4f6;
  color: #6b7280;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;

  border: 1px solid #0b2850;

  box-shadow: 0 0 0 4px rgba(11, 40, 80, 0.1);
}

#profileForm {
  width: 100%;
}

/* =========================
PROFILE IMAGE SECTION
========================= */
.top-profile-section {
  display: flex;

  gap: 2rem;

  align-items: flex-start;

  margin-bottom: 1.5rem;
}

.profile-picture {
  width: 150px;
  min-width: 150px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.photo-label {
  margin-top: 0;
}

.profile-picture img {
  width: 150px;
  height: 150px;

  object-fit: cover;

  display: block;

  margin-bottom: 1rem;

  border-radius: 50%;

  border: 4px solid #edf2f7;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

  transition: 0.3s;

  cursor: pointer;
}

.profile-picture img:hover {
  transform: scale(1.03);
}

.user-info {
  flex: 1;
}

.user-info label:first-child {
  margin-top: 0;
}

/* =========================
UPLOAD PHOTO
========================= */
#uploadPhoto {
  display: none;
}

.custom-upload {
  display: inline-block;

  margin-top: 0.4rem;
  margin-bottom: 0;

  background: #0b2850;
  color: white;

  padding: 0.7rem 1rem;

  border-radius: 10px;

  cursor: pointer;

  font-size: 0.9rem;
  font-weight: 600;

  transition:
    background 0.3s,
    transform 0.2s;
}

.custom-upload:hover {
  background: #163b70;
  transform: translateY(-2px);
}

.storage-note {
  display: block;

  color: #6b7280;

  margin-top: 0.6rem;

  font-size: 0.8rem;
}

.optional-info {
  display: block;

  margin-top: 0.4rem;

  color: #6b7280;

  font-size: 0.85rem;
}

/* =========================
LEARNING PREFERENCES
========================= */
.learning-preferences {
  margin: 2rem 0 1.2rem;
  padding: 1.3rem;

  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.learning-preferences-header {
  margin-bottom: 1.2rem;
}

.learning-preferences-header h2 {
  margin: 0 0 0.35rem;
  color: #0b2850;
  font-size: 1.15rem;
}

.learning-preferences-header p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
}

.learning-field + .learning-field {
  margin-top: 1.2rem;
}

.learning-field-label {
  display: block;
  margin: 0 0 0.55rem;
  font-weight: 600;
}

.learning-field-help {
  display: block;
  margin: -0.2rem 0 0.65rem;
  color: #6b7280;
  font-size: 0.82rem;
}

.preference-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.preference-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.preference-option input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;
  pointer-events: none;

  overflow: hidden;
}

.preference-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 40px;
  padding: 0.45rem 0.8rem;

  background: white;
  color: #374151;

  border: 1px solid #cbd5e1;
  border-radius: 999px;

  font-size: 0.9rem;
  font-weight: 600;

  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.preference-option:hover span {
  border-color: #0b2850;
  transform: translateY(-1px);
}

.preference-option input:checked + span {
  background: #0b2850;
  color: white;
  border-color: #0b2850;
}

.preference-option input:focus-visible + span {
  outline: 3px solid rgba(11, 40, 80, 0.18);
  outline-offset: 2px;
}

#learningFrequency {
  max-width: 320px;
}

/* =========================
LANGUAGE MULTI SELECT
========================= */

.language-selector {
  position: relative;
}

.language-select-btn {
  width: 100%;

  padding: 0.75rem;

  background: white;
  color: #374151;

  border: 1px solid #ccc;
  border-radius: 8px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font-size: 0.95rem;
  text-align: left;

  cursor: pointer;

  transition:
    border 0.3s,
    box-shadow 0.3s;
}

.language-select-btn:hover,
.language-select-btn.open {
  border-color: #0b2850;
}

.language-select-btn.open {
  box-shadow: 0 0 0 4px rgba(11, 40, 80, 0.1);
}

.language-arrow {
  font-size: 0.75rem;

  transition: transform 0.2s;
}

.language-select-btn.open .language-arrow {
  transform: rotate(180deg);
}

.language-dropdown {
  position: absolute;

  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;

  z-index: 200;

  background: white;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);

  max-height: 260px;
  overflow-y: auto;
}

.language-dropdown.hidden {
  display: none;
}

.language-options {
  padding: 0.4rem;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;

  margin: 0;

  padding: 0.7rem 0.8rem;

  border-radius: 7px;

  font-weight: 500;

  cursor: pointer;

  transition: background 0.2s;
}

.language-option:hover {
  background: #f1f5f9;
}

.language-option input {
  width: auto;
  margin: 0;

  accent-color: #0b2850;
}

.selected-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;

  margin-top: 0.7rem;
}

.language-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  padding: 0.4rem 0.65rem;

  background: #eef6ff;
  color: #0b2850;

  border: 1px solid #bfdbfe;
  border-radius: 999px;

  font-size: 0.85rem;
  font-weight: 600;
}

.language-tag-remove {
  width: 20px;
  height: 20px;

  padding: 0;
  margin: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 50%;

  background: transparent;
  color: #64748b;

  cursor: pointer;

  font-size: 1rem;
  line-height: 1;
}

.language-tag-remove:hover {
  background: #dbeafe;
  color: #0b2850;
}

.language-other-option {
  width: 100%;

  border: none;
  border-top: 1px solid #e5e7eb;

  background: white;
  color: #0b2850;

  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;

  text-align: left;
}

.language-other-icon {
  font-size: 1.1rem;
  font-weight: 700;
}

.custom-language-box {
  padding: 0.9rem;

  border-top: 1px solid #e5e7eb;

  background: #f8fafc;
}

.custom-language-box.hidden {
  display: none;
}

.custom-language-box label {
  margin: 0 0 0.5rem;

  font-size: 0.85rem;
}

.custom-language-row {
  display: flex;
  gap: 0.5rem;
}

.custom-language-row input {
  flex: 1;
}

.custom-language-row button {
  border: none;
  border-radius: 8px;

  padding: 0.7rem 0.9rem;

  background: #0b2850;
  color: white;

  font-weight: 600;

  cursor: pointer;
}

.custom-language-row button:hover {
  background: #163b70;
}

.custom-language-box small {
  display: block;

  margin-top: 0.5rem;

  color: #6b7280;
  font-size: 0.78rem;
}

@media (max-width: 480px) {
  .custom-language-row {
    flex-direction: column;
  }

  .custom-language-row button {
    width: 100%;
  }
}

/* =========================
QUILL EDITOR
========================= */
#editor {
  background: white;
  min-height: 170px;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.ql-toolbar.ql-snow {
  border-radius: 8px 8px 0 0;
  border-color: #ccc;
}

.ql-container.ql-snow {
  height: 150px;
  border-radius: 0 0 8px 8px;
  border-color: #ccc;
  font-size: 0.95rem;
}

.ql-editor {
  min-height: 130px;
}

.ql-container.ql-snow:focus-within {
  border-color: #0b2850;
  box-shadow: 0 0 0 4px rgba(11, 40, 80, 0.1);
}

.about-counter {
  margin-top: -0.6rem;
  margin-bottom: 1rem;

  text-align: right;

  color: #6b7280;

  font-size: 0.8rem;
}

/* =========================
SAVE BUTTON
========================= */
.save-btn {
  background: #0b2850;
  color: white;

  border: none;

  padding: 0.85rem 1.2rem;

  border-radius: 8px;

  margin-top: 1.5rem;

  cursor: pointer;

  width: 100%;

  font-size: 1rem;
  font-weight: 700;

  transition:
    background 0.3s,
    transform 0.2s;
}

.save-btn:hover {
  background: #163b70;
  transform: translateY(-2px);
}

.save-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
}

/* =========================
PROFILE STRENGTH
========================= */

.profile-strength {
  margin-bottom: 1.4rem;

  padding-bottom: 1.2rem;

  border-bottom: 1px solid #e5e7eb;
}

.profile-strength-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 0.6rem;

  color: #374151;
  font-size: 0.9rem;
}

.profile-strength-header strong {
  color: #0b2850;
}

.profile-strength-track {
  width: 100%;
  height: 10px;

  background: #e5e7eb;

  border-radius: 999px;

  overflow: hidden;
}

.profile-strength-bar {
  height: 100%;

  background: #0b2850;

  border-radius: 999px;

  transition: width 0.35s ease;
}

.profile-completion-text {
  margin: 0.7rem 0 0;

  color: #6b7280;

  font-size: 0.85rem;
  font-weight: 600;
}

.profile-completion-text.complete {
  color: #15803d;
}

/* =========================
VALIDATION STATES
========================= */
.valid {
  color: #2ecc71;
  font-weight: 600;
  background: #ecfdf5 !important;
}

.invalid {
  color: #e74c3c;
  font-weight: 600;
  background: #fef2f2 !important;
}

.neutral {
  color: #7f8c8d;
  font-style: italic;
  background: #f8fafc !important;
}

/* =========================
PHOTO MODAL
========================= */
.photo-modal {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.75);

  display: none;
  justify-content: center;
  align-items: center;

  z-index: 9999;

  padding: 1rem;
}

.photo-modal.open {
  display: flex;
}

.photo-modal-content {
  position: relative;

  width: min(90vw, 420px);

  background: #111827;

  border-radius: 16px;

  padding: 1.2rem;

  text-align: center;

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);

  animation: photoZoom 0.2s ease;
}

.photo-modal-content h2 {
  color: white;

  margin: 0 0 1rem;

  font-size: 1.2rem;
}

.photo-modal-image {
  width: 100%;
  max-height: 70vh;

  object-fit: contain;

  border-radius: 14px;

  background: #000;
}

.close-photo-modal {
  position: absolute;

  top: 10px;
  right: 12px;

  width: 34px;
  height: 34px;

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.15);
  color: white;

  font-size: 1.6rem;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.3s,
    transform 0.2s;
}

.close-photo-modal:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

@keyframes photoZoom {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================
TABLET
========================= */
@media (max-width: 1050px) {
  .profile-page {
    padding: 2rem;
    gap: 1.5rem;
  }

  .form-section {
    width: 68%;
  }

  .profile-progress {
    width: 32%;
  }
}

/* =========================
MOBILE
========================= */
@media (max-width: 900px) {
  header {
    padding: 0.8rem 1rem;
    flex-direction: column;
    gap: 0.8rem;
  }

  .top-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-btn {
    padding: 0.5rem 0.7rem;
  }

  .profile-page {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }

  .form-section,
  .profile-progress {
    width: 100%;
    box-sizing: border-box;
  }

  .profile-progress {
    position: static;
  }

  .top-profile-section {
    flex-direction: column;
    align-items: center;
  }

  .profile-picture {
    align-items: center;
  }

  .user-info {
    width: 100%;
  }

  h1 {
    text-align: center;
  }

  .intro-text {
    text-align: center;
  }
}

/* =========================
SMALL SCREENS
========================= */
@media (max-width: 600px) {
  .nav-text {
    display: none;
  }

  .nav-btn {
    width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
  }

  .nav-icon {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .form-section,
  .profile-progress {
    padding: 1.2rem;
  }

  .profile-picture img {
    width: 125px;
    height: 125px;
  }

  .profile-picture {
    width: 125px;
    min-width: 125px;
  }

  h1 {
    font-size: 1.6rem;
  }

  input,
  select {
    padding: 0.7rem;
  }

  .save-btn {
    padding: 0.8rem;
  }
}

/* =========================
   MODIFICATION: Modal personnalisée pour remplacer les alert()
   Cette modal affiche les messages au centre de la page avec l’arrière-plan flouté.
   Elle est différente de .photo-modal, qui sert seulement à afficher la photo de profil.
========================= */
.custom-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-modal.hidden {
  display: none;
}

/* =========================
   MODIFICATION: Arrière-plan flouté derrière la modal
   Cet élément rend la page derrière la boîte de message floue et plus sombre.
========================= */
.modal-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(11, 40, 80, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* =========================
   MODIFICATION: Boîte centrale de la modal
   Cette boîte contient l’icône, le titre, le message et le bouton OK.
========================= */
.modal-box {
  position: relative;

  width: 90%;
  max-width: 430px;

  background: white;
  border-radius: 18px;

  padding: 2rem;

  text-align: center;

  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);

  animation: modalFadeIn 0.25s ease;
}

/* =========================
   MODIFICATION: Icône de la modal
   L’icône change selon le type du message: info, success, error ou warning.
========================= */
.modal-icon {
  width: 58px;
  height: 58px;

  margin: 0 auto 1rem;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #eaf3ff;

  font-size: 1.8rem;
}

/* =========================
   MODIFICATION: Titre de la modal
   Le titre garde la couleur principale du projet BUW.
========================= */
.modal-box h2 {
  margin: 0 0 0.8rem;

  color: #0b2850;
  font-size: 1.4rem;
}

/* =========================
   MODIFICATION: Texte de la modal
   white-space: pre-line permet d’afficher correctement les retours à la ligne \n.
========================= */
.modal-box p {
  margin: 0;

  color: #374151;
  line-height: 1.5;
  font-size: 0.95rem;

  white-space: pre-line;
}

/* =========================
   MODIFICATION: Bouton OK de la modal
   Ce bouton ferme la modal et peut ensuite lancer une redirection si nécessaire.
========================= */
.modal-box button {
  margin-top: 1.5rem;

  padding: 0.85rem 1.6rem;

  border: none;
  border-radius: 10px;

  background: #0b2850;
  color: white;

  font-weight: 700;
  cursor: pointer;

  transition:
    background 0.3s,
    transform 0.2s;
}

.modal-box button:hover {
  background: #163b70;
  transform: translateY(-2px);
}

/* =========================
   MODIFICATION: Couleurs selon le type de message
   Ces classes permettent de différencier info, succès, erreur et avertissement.
========================= */
.modal-box.info .modal-icon {
  background: #eaf3ff;
}

.modal-box.success .modal-icon {
  background: #e7f7ec;
}

.modal-box.error .modal-icon {
  background: #fdeaea;
}

.modal-box.warning .modal-icon {
  background: #fff7e6;
}

/* =========================
   MODIFICATION: Animation d’apparition de la modal
   La boîte apparaît légèrement avec un effet propre et moderne.
========================= */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================
   MODIFICATION: Adaptation mobile de la modal
   La boîte devient plus compacte sur les petits écrans.
========================= */
@media (max-width: 600px) {
  .modal-box {
    width: calc(100% - 2rem);
    padding: 1.5rem;
  }

  .modal-box h2 {
    font-size: 1.2rem;
  }

  .modal-box p {
    font-size: 0.9rem;
  }
}

/* =========================
   MODIFICATION: BADGES DE NOTIFICATION
   Petit badge rouge sur les boutons de navigation.
========================= */
.nav-btn {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: -7px;
  right: -7px;

  min-width: 18px;
  height: 18px;

  padding: 0 5px;

  background: #ef4444;
  color: white;

  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;

  border: 2px solid white;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.nav-badge.hidden {
  display: none;
}
@media (max-width: 480px) {
  .learning-preferences {
    padding: 1rem;
  }

  .preference-options {
    gap: 0.5rem;
  }

  .preference-option span {
    min-height: 38px;
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
  }

  #learningFrequency {
    max-width: none;
  }
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* =========================
ACADEMIC DATA / STUDIENGANG AUTOCOMPLETE
========================= */
.academic-field-hidden {
  display: none !important;
}

.study-program-selector {
  position: relative;
}

.study-program-input-wrap {
  position: relative;
}

.academic-hint {
  display: block;
  margin-top: 0.45rem;
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.4;
}

.academic-hint.warning {
  color: #b45309;
}

.academic-hint.success {
  color: #166534;
}

.study-program-results {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 350;

  max-height: 320px;
  overflow-y: auto;

  margin-top: 0.45rem;
  padding: 0.35rem;

  background: white;
  border: 1px solid #d1d5db;
  border-radius: 10px;

  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.16);
}

.study-program-results.hidden {
  display: none;
}

.study-program-result {
  width: 100%;
  display: block;

  padding: 0.75rem 0.8rem;

  border: none;
  border-radius: 8px;

  background: transparent;
  color: #1f2937;

  text-align: left;
  font-family: inherit;

  cursor: pointer;
}

.study-program-result:hover,
.study-program-result.active {
  background: #f1f5f9;
}

.study-program-result.preferred {
  background: #f8fbff;
}

.study-program-result.preferred:hover,
.study-program-result.preferred.active {
  background: #eaf3ff;
}

.study-program-result-name {
  display: block;

  color: #0b2850;
  font-size: 0.94rem;
  font-weight: 700;
}

.study-program-result-meta {
  display: block;

  margin-top: 0.2rem;

  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.study-program-empty {
  margin: 0;
  padding: 0.85rem;

  color: #6b7280;
  font-size: 0.88rem;
  text-align: center;
}

@media (max-width: 600px) {
  .study-program-results {
    max-height: 280px;
  }
}

/* =========================
STUDENTENVERIFIZIERUNG
========================= */
.student-verification-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.65rem;
  padding: 0.32rem 0.62rem;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #15803d;
  font-size: 0.76rem;
  font-weight: 800;
}

.student-verification-badge.hidden {
  display: none;
}

/* Mobile form fields stay at 16px or more so iOS browsers do not
   auto-zoom them. Pinch-to-zoom remains available to the user. */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="hidden"]),
  textarea:not([data-allow-small-text]),
  select:not([data-allow-small-text]) {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  input,
  textarea,
  select {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* =========================
ACCOUNT DELETION / DANGER ZONE
========================= */
.account-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
}

.account-danger-copy {
  min-width: 0;
}

.account-danger-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-danger-zone h2 {
  margin: 0;
  color: #7f1d1d;
  font-size: 1.15rem;
}

.account-danger-zone p {
  margin: 0.55rem 0 0;
  color: #6b2730;
  font-size: 0.9rem;
  line-height: 1.55;
}

.delete-account-btn,
.delete-account-confirm {
  border: 1px solid #b91c1c;
  border-radius: 10px;
  background: #b91c1c;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.delete-account-btn {
  flex: 0 0 auto;
  padding: 0.75rem 1rem;
}

.delete-account-btn:hover,
.delete-account-confirm:not(:disabled):hover {
  background: #991b1b;
  transform: translateY(-1px);
}

.delete-account-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.delete-account-modal.hidden {
  display: none;
}

.delete-account-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(3px);
}

.delete-account-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1.6rem;
  border: 1px solid #fecaca;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
}

.delete-account-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.delete-account-warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.8rem;
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 1.35rem;
  font-weight: 900;
}

.delete-account-dialog h2 {
  margin: 0 2.5rem 0.6rem 0;
  color: #7f1d1d;
  font-size: 1.35rem;
}

.delete-account-dialog > p {
  margin: 0 0 1.2rem;
  color: #4b5563;
  line-height: 1.6;
}

.delete-account-field {
  margin-top: 1rem;
}

.delete-account-field label {
  display: block;
  margin-bottom: 0.4rem;
  color: #374151;
  font-size: 0.88rem;
  font-weight: 700;
}

.delete-account-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font: inherit;
}

.delete-account-field input:focus {
  outline: 2px solid #fecaca;
  outline-offset: 1px;
  border-color: #ef4444;
}

.delete-account-status {
  min-height: 1.4rem;
  margin: 0.9rem 0 0;
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 700;
}

.delete-account-status.working {
  color: #92400e;
}

.delete-account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.delete-account-cancel,
.delete-account-confirm {
  padding: 0.7rem 1rem;
}

.delete-account-cancel {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #374151;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.delete-account-confirm:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

body.account-deletion-busy {
  overflow: hidden;
}

@media (max-width: 700px) {
  .account-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .delete-account-btn {
    width: 100%;
  }

  .delete-account-actions {
    flex-direction: column-reverse;
  }

  .delete-account-cancel,
  .delete-account-confirm {
    width: 100%;
    min-height: 46px;
  }
}
