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
========================= */
.partners-page {
  max-width: 1100px;
  margin: 2rem auto;
  background: white;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.search-section h1 {
  color: #0b2850;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.intro-text {
  color: #6b7280;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* =========================
   SEARCH / FILTERS
========================= */
.partner-search-form {
  display: grid;

  grid-template-columns:
    minmax(220px, 1.4fr)
    minmax(210px, 1fr)
    minmax(180px, 1fr)
    auto
    auto;

  gap: 0.8rem;

  align-items: stretch;

  margin-bottom: 1.5rem;
}

/* Champs texte + Studienzeitraum */
.partner-search-form input,
.partner-search-form select {
  width: 100%;

  padding: 0.75rem;

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

  background: white;
  color: #222;

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

  box-sizing: border-box;

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

.partner-search-form input::placeholder {
  color: #9ca3af;
}

.partner-search-form input:focus,
.partner-search-form select:focus {
  outline: none;

  border: 1px solid #0b2850;

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

/* Bouton de recherche */
.search-btn {
  background: #0b2850;
  color: white;

  border: none;

  padding: 0 1.3rem;

  border-radius: 8px;

  cursor: pointer;

  font-weight: 700;
  font-family: inherit;

  white-space: nowrap;

  transition:
    background 0.3s,
    transform 0.2s;
}

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

/* Bouton pour supprimer tous les filtres */
.reset-filters-btn {
  background: #eef2f7;
  color: #0b2850;

  border: 1px solid #cdd6e1;

  padding: 0 1rem;

  border-radius: 8px;

  cursor: pointer;

  font-weight: 700;
  font-family: inherit;

  white-space: nowrap;

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

.reset-filters-btn:hover {
  background: #e2e8f0;
  border-color: #aebaca;

  transform: translateY(-2px);
}

/* =========================
   RESULTS LAYOUT
========================= */
.results-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 1.5rem;
  align-items: flex-start;
}

.partners-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* =========================
   PARTNER CARD
========================= */
.partner-card {
  background: white;
  border: 1px solid #d5dce5;
  border-radius: 10px;

  padding: 1rem;

  min-height: 245px;

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);

  display: flex;
  flex-direction: column;

  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.partner-header {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.partner-photo {
  width: 64px;
  height: 64px;

  border-radius: 50%;

  object-fit: cover;

  background: #e5e7eb;

  flex-shrink: 0;
}

.partner-name {
  margin: 0 0 0.2rem;
  color: #0b2850;
  font-size: 1rem;
}

.partner-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.partner-name-row .partner-name {
  margin-bottom: 0;
}

.student-verified-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.24rem 0.48rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

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

.profile-verified-badge {
  margin-top: 0.45rem;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
  font-size: 0.78rem;
}

.partner-meta {
  font-size: 0.85rem;
  line-height: 1.3;
  color: #222;
}

.partner-section {
  margin-bottom: 0.7rem;
  font-size: 0.85rem;
}

.partner-section strong {
  display: block;
  color: #111;
  margin-bottom: 0.1rem;
}

.partner-about {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.partner-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.profile-btn,
.request-btn {
  border: none;
  border-radius: 7px;

  padding: 0.45rem 0.6rem;

  font-size: 0.8rem;

  cursor: pointer;

  font-weight: 600;

  transition:
    background 0.3s,
    transform 0.2s;
}

.profile-btn:hover,
.request-btn:hover {
  transform: translateY(-2px);
}

.profile-btn {
  background: #eef2f7;
  color: #0b2850;
  border: 1px solid #cdd6e1;
}

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

.request-btn:hover {
  background: #163b70;
}

/* =========================
   ÉTATS DU BOUTON PARTENAIRE
========================= */

/* Demande déjà envoyée */
.request-btn.request-pending {
  background: #e5e7eb;
  color: #6b7280;

  cursor: not-allowed;

  opacity: 1;
}

.request-btn.request-pending:hover {
  background: #e5e7eb;
  transform: none;
}

/* Une demande a été reçue */
.request-btn.request-received {
  background: #f59e0b;
  color: white;
}

.request-btn.request-received:hover {
  background: #d97706;
}

/* Partenariat déjà actif */
.request-btn.request-chat {
  background: #16a34a;
  color: white;
}

.request-btn.request-chat:hover {
  background: #15803d;
}

/* =========================
   SUGGESTIONS
========================= */
.suggestions-box {
  background: #f8fafc;
  border: 1px solid #d5dce5;
  border-radius: 10px;

  padding: 1rem;

  min-height: 260px;

  position: sticky;
  top: 6rem;
}

.suggestions-box h3 {
  font-size: 1rem;
  color: #0b2850;
  margin-top: 0;
}

.suggestion-item {
  font-size: 0.85rem;

  padding: 0.7rem;

  border-bottom: 1px solid #e2e8f0;
  border-radius: 7px;

  cursor: pointer;

  transition:
    background 0.2s,
    transform 0.2s;
}

.suggestion-item:hover {
  background: #eef2f7;
  transform: translateX(3px);
}
.suggestion-item:last-child {
  border-bottom: none;
}

.empty-message {
  color: #6b7280;
  font-style: italic;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1050px) {
  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;
  }

  .partner-search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-btn,
  .reset-filters-btn {
    min-height: 46px;
  }

  .results-layout {
    grid-template-columns: 1fr;
  }

  .partners-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .suggestions-box {
    position: static;
    order: -1;
  }
}

@media (max-width: 600px) {
  .partners-page {
    padding: 1rem;
    margin: 1rem;
  }

  .partner-search-form {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .search-btn,
  .reset-filters-btn {
    width: 100%;
    padding: 0.8rem;
  }

  .search-btn {
    padding: 0.8rem;
  }

  .partners-list {
    grid-template-columns: 1fr;
  }

  .nav-text {
    display: none;
  }

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

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

/* =========================
   CUSTOM MODAL / ALERT REPLACEMENT
========================= */
.custom-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

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

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

.modal-backdrop {
  position: absolute;
  inset: 0;

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

.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;
}

.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;
}

.modal-box h2 {
  margin: 0 0 0.8rem;

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

/* =========================
   MODIFICATION: Affichage correct du texte dans la modal
   white-space: pre-line permet d'afficher correctement les retours à la ligne \n du profil.
========================= */
.modal-box p {
  margin: 0;

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

  white-space: pre-line;
}

.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);
}


.modal-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modal-actions button {
  flex: 1 1 0;
  margin-top: 0;
}

.modal-actions .modal-cancel-btn.hidden {
  display: none;
}

.modal-actions .modal-cancel-btn {
  background: #e5e7eb;
  color: #1f2937;
}

.modal-actions .modal-cancel-btn:hover {
  background: #d1d5db;
}

@media (max-width: 420px) {
  .modal-actions {
    flex-direction: column;
  }
}

/* Types de messages */
.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;
}

@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
   Cette partie est placée à la fin pour éviter qu'elle soit écrasée par le style général.
========================= */
@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;
}

/* =========================
   MODIFICATION: MODAL PROFIL DÉTAILLÉ DU PARTENAIRE
   Cette modal est utilisée quand l'utilisateur clique sur "Profil ansehen".
========================= */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;

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

  padding: 1rem;
  box-sizing: border-box;
}

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

.profile-modal-backdrop {
  position: absolute;
  inset: 0;

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

.profile-modal-box {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: 760px;
  max-height: 90vh;

  background: white;
  border-radius: 20px;

  overflow-y: auto;
  overflow-x: hidden;

  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);

  animation: modalFadeIn 0.25s ease;
}

.profile-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;

  width: 38px;
  height: 38px;

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.9);
  color: #0b2850;

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

  cursor: pointer;

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

  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);

  transition:
    background 0.3s,
    transform 0.2s;
}

.profile-modal-close:hover {
  background: #ef4444;
  color: white;
  transform: scale(1.05);
}

/* =========================
   MODIFICATION: En-tête du profil avec photo, nom et email
========================= */
.profile-modal-header {
  background: linear-gradient(135deg, #0b2850, #163b70);
  color: white;

  padding: 2rem;

  display: flex;
  align-items: center;
  gap: 1.3rem;
}

.profile-modal-photo {
  width: 110px;
  height: 110px;

  border-radius: 50%;

  object-fit: cover;

  background: #e5e7eb;

  border: 4px solid white;

  cursor: pointer;

  flex-shrink: 0;

  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.profile-modal-photo:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.profile-modal-main-info h2 {
  margin: 0 0 0.25rem;
  font-size: 1.7rem;
}

.profile-modal-email {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  word-break: break-word;
}

.profile-modal-content {
  padding: 1.6rem 2rem 2rem;
}

/* =========================
   MODIFICATION: Grille des informations du partenaire
========================= */
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;

  margin-bottom: 1.5rem;
}

.profile-info-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;

  padding: 0.9rem;
}

.profile-info-label {
  display: block;

  color: #6b7280;

  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;

  margin-bottom: 0.25rem;
}

.profile-info-value {
  display: block;

  color: #111827;

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

  word-break: break-word;
}

.profile-section {
  margin-top: 1.4rem;
}

.profile-section h3 {
  margin: 0 0 0.7rem;

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

/* =========================
   MODIFICATION: Liste des cours dans la modal profil
========================= */
.profile-courses-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.profile-course-chip {
  background: #eef2f7;
  color: #0b2850;

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

  padding: 0.42rem 0.75rem;

  font-size: 0.84rem;
  font-weight: 700;
}

.profile-about-text {
  margin: 0;

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

  padding: 1rem;

  color: #374151;

  line-height: 1.6;

  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================
   MODIFICATION: MODAL PHOTO AGRANDIE
   Cette modal s'ouvre quand l'utilisateur clique sur la photo du profil.
========================= */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;

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

  padding: 1rem;
  box-sizing: border-box;
}

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

.photo-modal-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.photo-modal-box {
  position: relative;
  z-index: 1;

  max-width: 92vw;
  max-height: 92vh;

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

.photo-modal-close {
  position: absolute;
  top: -0.8rem;
  right: -0.8rem;

  width: 40px;
  height: 40px;

  border: none;
  border-radius: 50%;

  background: white;
  color: #0b2850;

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

  cursor: pointer;

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

  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);

  transition:
    background 0.3s,
    transform 0.2s;
}

.photo-modal-close:hover {
  background: #ef4444;
  color: white;
  transform: scale(1.05);
}

.large-profile-photo {
  max-width: 92vw;
  max-height: 88vh;

  border-radius: 18px;

  object-fit: contain;

  background: white;

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

  animation: modalFadeIn 0.25s ease;
}

/* =========================
   MODIFICATION: Responsive pour la modal profil et la modal photo
========================= */
@media (max-width: 700px) {
  .profile-modal-box {
    max-height: 92vh;
  }

  .profile-modal-header {
    padding: 1.6rem 1.2rem;
    flex-direction: column;
    text-align: center;
  }

  .profile-modal-photo {
    width: 96px;
    height: 96px;
  }

  .profile-modal-main-info h2 {
    font-size: 1.35rem;
  }

  .profile-modal-content {
    padding: 1.2rem;
  }

  .profile-info-grid {
    grid-template-columns: 1fr;
  }

  .photo-modal-close {
    top: 0.4rem;
    right: 0.4rem;
  }

  .large-profile-photo {
    border-radius: 12px;
  }
}
/* =========================
   MATCHING / FILTRES AVANCÉS
========================= */
.partner-search-form {
  display: block;
  margin-bottom: 0.7rem;
}

.basic-filters {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.35fr)
    minmax(200px, 1fr)
    minmax(180px, 1fr)
    auto
    auto;
  gap: 0.8rem;
  align-items: stretch;
}

.basic-filters input,
.basic-filters select,
.advanced-filters input,
.advanced-filters select {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: white;
  color: #222;
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.basic-filters input:focus,
.basic-filters select:focus,
.advanced-filters input:focus,
.advanced-filters select:focus {
  outline: none;
  border-color: #0b2850;
  box-shadow: 0 0 0 4px rgba(11, 40, 80, 0.1);
}

.advanced-filters-toggle {
  margin-top: 0.8rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #0b2850;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.advanced-filters-arrow {
  display: inline-block;
  margin-left: 0.25rem;
  transition: transform 0.2s;
}

.advanced-filters-toggle.open .advanced-filters-arrow {
  transform: rotate(180deg);
}

.advanced-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #d5dce5;
  border-radius: 10px;
}

.advanced-filters.hidden {
  display: none;
}

.advanced-filter-field label {
  display: block;
  margin: 0 0 0.35rem;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 700;
}

.results-info {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  color: #6b7280;
  font-size: 0.86rem;
}

.partner-card {
  min-height: 285px;
}

.match-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.match-score,
.match-count {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  background: #eef6ff;
  color: #0b2850;
  font-size: 0.76rem;
  font-weight: 800;
}

.match-score {
  background: #ecfdf5;
  color: #166534;
}

.match-score.no-match,
.match-count.no-match {
  background: #f3f4f6;
  color: #6b7280;
}

.match-reasons-title {
  margin-bottom: 0.4rem;
  color: #111827;
  font-size: 0.82rem;
  font-weight: 700;
}

.match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.match-reason {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.32rem 0.5rem;
  border-radius: 999px;
  background: #f0f4f8;
  color: #0b2850;
  font-size: 0.74rem;
  font-weight: 700;
}

.match-reason::before {
  content: "✓";
  color: #16a34a;
  font-weight: 900;
}

.no-match-reason {
  margin: 0 0 0.8rem;
  color: #6b7280;
  font-size: 0.8rem;
  font-style: italic;
}

.profile-course-chip {
  white-space: normal;
  line-height: 1.45;
}

@media (max-width: 1150px) {
  .advanced-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .basic-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .basic-filters .search-btn,
  .basic-filters .reset-filters-btn {
    min-height: 46px;
  }
}

@media (max-width: 700px) {
  .advanced-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .basic-filters {
    grid-template-columns: 1fr;
  }

  .basic-filters .search-btn,
  .basic-filters .reset-filters-btn {
    width: 100%;
    padding: 0.8rem;
  }
}


/* =========================
   NUTZER BLOCKIEREN / ENTSPERREN
========================= */
.partner-filter-tools {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.partner-filter-tools .advanced-filters-toggle {
  margin-top: 0;
}

.blocked-users-btn {
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fff7f7;
  color: #b91c1c;
  padding: 0.55rem 0.8rem;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.blocked-users-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

.profile-safety-actions {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
}

.user-block-btn,
.unblock-user-btn {
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fff7f7;
  color: #b91c1c;
  padding: 0.65rem 0.9rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.user-block-btn:hover {
  background: #fee2e2;
}

.unblock-user-btn {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.unblock-user-btn:hover {
  background: #dbeafe;
}

.blocked-users-modal-box {
  max-width: 620px;
  padding-bottom: 1rem;
}

.blocked-users-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.blocked-users-header h2 {
  margin: 0;
  color: #0b2850;
}

.blocked-users-header p {
  margin: 0.45rem 0 0;
  color: #6b7280;
  line-height: 1.45;
}

.blocked-users-list {
  padding: 1rem 1.5rem 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.blocked-user-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.blocked-user-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e7eb;
}

.blocked-user-info {
  min-width: 0;
}

.blocked-user-info strong {
  display: block;
  color: #0b2850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blocked-user-info span {
  display: block;
  margin-top: 0.2rem;
  color: #6b7280;
  font-size: 0.82rem;
}

@media (max-width: 600px) {
  .partner-filter-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .blocked-users-btn {
    width: 100%;
  }

  .profile-safety-actions {
    justify-content: stretch;
  }

  .profile-safety-actions .user-block-btn,
  .profile-safety-actions .report-user-btn {
    width: 100%;
  }

  .blocked-user-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .blocked-user-photo {
    width: 48px;
    height: 48px;
  }

  .blocked-user-item .unblock-user-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* 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;
  }
}

/* =========================
   SUCHINTENTION / HILFEFILTER
========================= */
.basic-filters {
  grid-template-columns:
    minmax(180px, 0.9fr)
    minmax(220px, 1.35fr)
    minmax(190px, 1fr)
    minmax(170px, 0.9fr)
    auto
    auto;
}

.advanced-filter-field.hidden {
  display: none;
}

@media (max-width: 1050px) {
  .basic-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .basic-filters {
    grid-template-columns: 1fr;
  }
}
