/* ============================================
   TEAM ADMIN UI
   Clean replacement
   ============================================ */

.team-admin-topbar {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto 28px;
  padding: 14px 16px;
  border: 1px dashed rgba(0, 151, 167, 0.45);
  border-radius: 16px;
  background: rgba(0, 151, 167, 0.055);
}

body.admin-mode .team-admin-topbar {
  display: flex;
}

.team-admin-main-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  color: #ffffff;
  background: #0097a7;
  box-shadow: 0 8px 20px rgba(0, 151, 167, 0.2);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.team-admin-main-btn:hover {
  transform: translateY(-2px);
  background: #007d8a;
  box-shadow: 0 12px 26px rgba(0, 151, 167, 0.28);
}

.team-admin-main-btn.secondary {
  background: #111827;
}

.team-admin-main-btn.secondary:hover {
  background: #0f172a;
}

.team-admin-main-btn.warning {
  background: #f97316;
}

.team-admin-main-btn.warning:hover {
  background: #ea580c;
}

/* ============================================
   TEAM MEMBER CARD CONTROLS
   Permanently fixed at top-right in admin mode
   ============================================ */

.team-admin-item {
  position: relative !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/*
  team.html applies position: relative to every direct
  child of .team-card. These stronger selectors and
  !important declarations keep the controls absolutely
  positioned instead of entering the card content flow.
*/

#core-faculty .team-card > .team-item-controls,
#collaborating-faculty .team-card > .team-item-controls,
#collaborating-researchers .team-card > .team-item-controls,
#assistants .team-card > .team-item-controls,
#students .team-card > .team-item-controls,
#advisors .team-card > .team-item-controls {
  display: none !important;

  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  bottom: auto !important;
  left: auto !important;

  z-index: 100 !important;

  width: auto !important;
  height: auto !important;

  margin: 0 !important;
  padding: 0 !important;

  align-items: center;
  justify-content: flex-end;

  gap: 7px;

  transform: none !important;
  pointer-events: auto;
}

body.admin-mode
#core-faculty .team-card > .team-item-controls,
body.admin-mode
#collaborating-faculty .team-card > .team-item-controls,
body.admin-mode
#collaborating-researchers .team-card > .team-item-controls,
body.admin-mode
#assistants .team-card > .team-item-controls,
body.admin-mode
#students .team-card > .team-item-controls,
body.admin-mode
#advisors .team-card > .team-item-controls {
  display: flex !important;
}

/*
  Reserve a clean strip above the member photograph so
  the permanently visible controls never overlap it.
*/

body.admin-mode
#core-faculty .team-card,
body.admin-mode
#collaborating-faculty .team-card,
body.admin-mode
#collaborating-researchers .team-card,
body.admin-mode
#assistants .team-card,
body.admin-mode
#students .team-card,
body.admin-mode
#advisors .team-card {
  padding-top: 72px !important;
}

/* ============================================
   SHARED ADMIN ICON BUTTON
   ============================================ */

.team-admin-icon-btn {
  width: 34px;
  height: 34px;

  min-width: 34px;
  min-height: 34px;

  margin: 0;
  padding: 0;

  border: none;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;

  cursor: pointer;

  background: rgba(0, 151, 167, 0.96);

  box-shadow:
    0 8px 18px
    rgba(0, 151, 167, 0.25);

  backdrop-filter: blur(8px);

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.team-admin-icon-btn:hover,
.team-admin-icon-btn:focus-visible {
  transform:
    translateY(-2px)
    scale(1.04);

  background: #007d8a;

  box-shadow:
    0 12px 24px
    rgba(0, 151, 167, 0.34);

  outline: none;
}

.team-admin-icon-btn.delete {
  background:
    rgba(239, 68, 68, 0.96);
}

.team-admin-icon-btn.delete:hover,
.team-admin-icon-btn.delete:focus-visible {
  background: #dc2626;

  box-shadow:
    0 12px 24px
    rgba(220, 38, 38, 0.28);
}

.team-admin-icon-btn svg {
  display: block;

  width: 15px;
  height: 15px;

  min-width: 15px;
  max-width: 15px;

  flex: 0 0 15px;
}

/* ============================================
   SECTION-LEVEL TEXT EDIT CONTROLS
   ============================================ */

.team-page-editable-section {
  position: relative !important;
}

.team-section-text-controls {
  display: none;

  position: absolute;
  right: 18px;
  top: 18px;

  z-index: 45;

  gap: 8px;
}

body.admin-mode .team-section-text-controls {
  display: flex;
}

.team-section-text-controls .team-admin-icon-btn {
  width: 42px;
  height: 42px;
}

.hero.team-page-editable-section
.team-section-text-controls {
  right: 24px;
  bottom: 24px;
  top: auto;
}

.alumni-cta.team-page-editable-section
.team-section-text-controls {
  right: 12px;
  top: 12px;
}

/* ============================================
   TEAM SECTION SUBTITLE
   ============================================ */

.team-section-subtitle {
  max-width: 760px;
  margin: 0 auto 16px;

  text-align: center;

  color: var(--color-gray-500);

  font-size: 0.92rem;
  line-height: 1.65;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.team-dynamic-empty {
  max-width: 760px;

  margin: 24px auto;
  padding: 24px;

  border:
    1px dashed
    var(--color-gray-300);

  border-radius: 18px;

  background:
    var(--color-white);

  text-align: center;

  color:
    var(--color-gray-500);

  font-size: 0.92rem;
  line-height: 1.7;
}

/* ============================================
   PHOTO FALLBACK
   ============================================ */

.team-admin-photo-fallback {
  width: 120px;
  height: 120px;

  margin-bottom: 10px;

  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      var(--color-teal),
      var(--color-teal-dark)
    );

  font-size: 1.25rem;
  font-weight: 900;

  letter-spacing: 0.04em;

  box-shadow:
    0 12px 28px
    rgba(0, 151, 167, 0.24);
}

.team-admin-avatar-img {
  display: block;

  width: 120px;
  height: 120px;

  border-radius: 999px;

  object-fit: cover;
}

/* ============================================
   ADMIN FORM
   ============================================ */

.admin-form-row {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 14px;
}

.admin-form-group select {
  width: 100%;

  padding: 11px 13px;

  border:
    1.5px solid
    #d1d5db;

  border-radius: 12px;

  color: #111827;
  background: #ffffff;

  outline: none;

  font-family: inherit;
  font-size: 0.9rem;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.admin-form-group select:focus {
  border-color: #0097a7;

  box-shadow:
    0 0 0 4px
    rgba(0, 151, 167, 0.11);
}

.admin-checkbox-row {
  display: flex;

  align-items: center;

  gap: 10px;

  margin: 4px 0 18px;

  color: #374151;

  font-size: 0.88rem;
  font-weight: 700;
}

.admin-checkbox-row input {
  width: 18px;
  height: 18px;

  accent-color: #0097a7;
}

.team-admin-note {
  margin: 6px 0 16px;
  padding: 12px 14px;

  border:
    1px solid
    #e5e7eb;

  border-radius: 12px;

  color: #6b7280;
  background: #f9fafb;

  font-size: 0.82rem;
  line-height: 1.55;
}

/* ============================================
   ADMIN VISIBILITY SAFETY
   ============================================ */

body.admin-mode .team-card,
body.admin-mode .alumni-cta {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .team-section-text-controls {
    right: 12px;
    top: 12px;
  }

  .hero.team-page-editable-section
  .team-section-text-controls {
    right: 16px;
    bottom: 16px;
  }

  .team-section-text-controls
  .team-admin-icon-btn {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 640px) {
  .admin-form-row {
    grid-template-columns: 1fr;
  }

  #core-faculty .team-card > .team-item-controls,
  #collaborating-faculty .team-card > .team-item-controls,
  #collaborating-researchers .team-card > .team-item-controls,
  #assistants .team-card > .team-item-controls,
  #students .team-card > .team-item-controls,
  #advisors .team-card > .team-item-controls {
    top: 10px !important;
    right: 10px !important;

    gap: 6px;
  }

  body.admin-mode
  #core-faculty .team-card,
  body.admin-mode
  #collaborating-faculty .team-card,
  body.admin-mode
  #collaborating-researchers .team-card,
  body.admin-mode
  #assistants .team-card,
  body.admin-mode
  #students .team-card,
  body.admin-mode
  #advisors .team-card {
    padding-top: 66px !important;
  }

  .team-admin-icon-btn {
    width: 32px;
    height: 32px;

    min-width: 32px;
    min-height: 32px;
  }
}

/* ============================================
   CURRENT STUDENT PUBLIC SUBMISSION CTA
   ============================================ */

.student-profile-submit-card {
  max-width: 980px;

  margin: 0 auto 30px;
  padding: 20px 22px;

  border:
    1px solid
    rgba(0, 151, 167, 0.18);

  border-radius: 22px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 18px;

  background:
    radial-gradient(
      circle at 95% 10%,
      rgba(255, 107, 53, 0.12),
      transparent 28%
    ),
    linear-gradient(
      135deg,
      rgba(0, 151, 167, 0.08),
      rgba(255, 255, 255, 0.95)
    );

  box-shadow:
    0 14px 32px
    rgba(15, 23, 42, 0.06);
}

.student-profile-submit-card h3 {
  margin: 0 0 6px;

  color: #09192b;

  font-size: 1rem;
  font-weight: 950;
}

.student-profile-submit-card p {
  margin: 0;

  color: #6b7280;

  font-size: 0.86rem;
  line-height: 1.65;
}

.student-profile-submit-card .btn {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .student-profile-submit-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .student-profile-submit-card .btn {
    width: 100%;
    justify-content: center;
  }
}