.contact-section {
  position: relative;
  padding: 6rem 0;
  background-color: var(--bg);
  color: var(--text);
  overflow: hidden;
  min-height: 100vh;
}

.ambient-glow {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(80px);
  pointer-events: none;
}

/* --- Layout Grid --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
  margin-top: 3rem;
  align-items: start;
}

/* --- Components: Glass Panel --- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* --- Sidebar: Toggle --- */
.recipient-toggle {
  display: flex;
  position: relative;
  background: var(--glass-highlight);
  border-radius: 99px;
  padding: 4px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--glass-border);
}

.toggle-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 2;
  transition: color 0.3s ease;
}

.toggle-btn.active {
  color: var(--bg);
}

.toggle-bg {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--brand);
  border-radius: 99px;
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  box-shadow: 0 2px 10px var(--brand-glow);
}

/* Toggle Logic in CSS (handled by JS for class switching) */
.recipient-toggle[data-state="individual"] .toggle-bg {
  transform: translateX(100%);
}

/* --- Sidebar: Views --- */
.recipient-view {
  display: none;
  animation: fadeIn 0.4s ease;
}
.recipient-view.active { display: block; }

/* Team Card */
.team-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.team-card.selected {
  border-color: var(--brand);
  background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 10%, transparent), transparent);
}
.team-avatars-cluster {
  display: flex;
}
.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text);
  border: 3px solid var(--elev-1);
  margin-left: -10px;
  position: relative;
}
.avatar-sm:first-child { margin-left: 0; }

.check-icon {
  position: absolute;
  top: 1rem; right: 1rem;
  color: var(--brand);
  opacity: 0;
  transition: opacity 0.2s;
}
.team-card.selected .check-icon { opacity: 1; }

/* Members List */
.members-list {
  display: grid;
  gap: 0.75rem;
}
.member-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid var(--glass-border);
}
.member-card:hover {
  background: var(--glass-highlight);
  transform: translateY(-2px);
}
.member-card.active {
  background: color-mix(in srgb, var(--brand) 15%, transparent);
  border-color: var(--brand);
}
.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text);
}
.member-info h5 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}
.member-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Alt Contact */
.alt-contact-list {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}
.alt-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
}
.icon-box {
  width: 40px;
  height: 40px;
  background: var(--glass-bg-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

/* --- Form --- */
.form-wrapper {
  padding: 2.5rem;
}
.form-header-dynamic {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1.5rem;
}
.recipient-badge {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  font-size: 0.85rem;
}
.to-label { color: var(--text-muted); margin-right: 4px; }
.recipient-name { color: var(--brand); font-weight: 600; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Input Styles */
.input-group {
  position: relative;
  margin-bottom: 1.5rem;
}
input, textarea {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1rem;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
}
textarea { resize: vertical; }

label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.3s;
  background: transparent;
}

/* Floating Label Logic */
input:focus ~ label,
input:not(:placeholder-shown) ~ label,
textarea:focus ~ label,
textarea:not(:placeholder-shown) ~ label {
  top: -0.6rem;
  left: 0.8rem;
  font-size: 0.75rem;
  color: var(--brand);
  background: var(--bg); /* Hides the border line behind label */
  padding: 0 4px;
}

input:focus, textarea:focus {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 5%, transparent);
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(90deg, var(--brand), #0891b2);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px var(--brand-glow);
}

/* Animation Utilities */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-wrapper { padding: 1.5rem; }
}