/* Team directory: shares the LUMINEX palette and controls in style.css. */
html { scroll-snap-type: none; }
body.team-page { min-height: 100vh; overflow-x: hidden; }
.team-page .nav-links a { white-space: nowrap; }
.team-main { position: relative; z-index: 2; padding-top: var(--nav-height); }
.team-intro {
  min-height: 360px;
  padding: 78px 0 56px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}
.team-intro-content { position: relative; z-index: 2; text-align: center; }
.team-intro .section-badge { margin-bottom: 16px; }
.team-intro .hero-title { margin-bottom: 12px; }
.team-intro .hero-subtitle { max-width: 650px; margin-bottom: 22px; }
.team-back-link { margin: 0 auto; }
.team-directory { padding: 52px 0 78px; min-height: 390px; }
.team-section-heading, .team-editor-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.team-section-heading .section-title, .team-editor-heading .section-title { font-size: 1.8rem; }
.team-admin-trigger { flex: 0 0 auto; }
.team-status {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(18, 14, 28, .48);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}
.team-status.is-error { color: #fecaca; border-color: rgba(248, 113, 113, .35); }
.team-status.is-empty { color: #c4b5fd; }
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
  margin-top: 20px;
}
.team-card {
  min-width: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.team-card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, .42); box-shadow: 0 12px 32px rgba(0,0,0,.36), 0 0 18px rgba(139,92,246,.12); }
.team-avatar-wrap {
  width: 136px;
  height: 136px;
  margin: 2px auto 17px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at 50% 38%, rgba(139,92,246,.25), rgba(11,8,20,.86) 72%);
  border: 1px solid rgba(196,181,253,.25);
  border-radius: 50%;
  box-shadow: inset 0 0 28px rgba(139,92,246,.13), 0 0 24px rgba(139,92,246,.1);
}
.team-avatar-wrap img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.team-avatar-fallback { color: rgba(196,181,253,.78); font-size: 3rem; }
.team-card h3 { color: #fff; font-size: 1.26rem; line-height: 1.3; overflow-wrap: anywhere; }
.team-role { margin-top: 5px; color: #c4b5fd; font-size: .88rem; font-weight: 700; }
.team-description { color: var(--text-muted); font-size: .88rem; margin: 13px 0 17px; white-space: pre-line; overflow-wrap: anywhere; }
.team-socials { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: auto; }
.social-link {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: #e9ddff;
  font-size: 1.03rem;
  text-decoration: none;
  background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.27);
  border-radius: 12px;
  transition: background .2s ease, transform .2s ease, color .2s ease;
}
.social-link:hover { color: #fff; background: var(--accent-purple-hover); transform: translateY(-2px); }
.team-editor {
  margin-top: 58px;
  padding: 30px;
  border: 1px solid rgba(139,92,246,.28);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(20,16,32,.9), rgba(12,9,20,.82));
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}
.team-editor[hidden], .member-form[hidden], .team-modal[hidden], .auth-form[hidden] { display: none !important; }
.team-editor-heading { align-items: center; margin-bottom: 22px; }
.team-editor-heading .section-badge { margin-bottom: 7px; }
.editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.editor-note { color: var(--text-muted); font-size: .84rem; }
.editor-note i { color: #c4b5fd; margin-right: 6px; }
.admin-access-panel { padding: 18px; margin: 16px 0; background: rgba(8,6,15,.42); border: 1px solid var(--border-color); border-radius: 15px; }
.admin-access-panel[hidden] { display: none !important; }
.admin-access-panel h3 { font-size: .98rem; }
.admin-create-form, .password-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: end; gap: 12px; margin: 15px 0; }
.password-form { grid-template-columns: repeat(2, minmax(0,1fr)) auto; }
.password-panel { margin-top: 20px; }
.password-panel .contacts-editor-heading { margin-bottom: 0; }
.member-form { padding: 22px; margin: 18px 0 24px; background: rgba(8,6,15,.58); border: 1px solid var(--border-color); border-radius: 16px; }
.form-heading, .contacts-editor-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.form-heading { margin-bottom: 20px; }
.form-heading h3 { font-size: 1.12rem; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; cursor: pointer; color: var(--text-muted); background: rgba(255,255,255,.04); border: 1px solid var(--border-color); border-radius: 10px; }
.icon-button:hover { color: #fff; border-color: rgba(196,181,253,.45); }
.member-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field-full { grid-column: 1 / -1; }
.field-label { display: flex; flex-direction: column; gap: 7px; color: #e9e5f4; font-size: .84rem; font-weight: 650; }
.field-label > span:first-child { color: #c4b5fd; }
.field-label small, .optional-label { color: var(--text-muted); font-size: .75rem; font-weight: 400; }
.field-label input, .field-label textarea, .contact-row select, .contact-row input {
  width: 100%;
  min-width: 0;
  color: var(--text-main);
  font: inherit;
  font-weight: 400;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  outline: none;
}
.field-label input, .contact-row select, .contact-row input { min-height: 44px; padding: 10px 12px; }
.field-label textarea { min-height: 88px; padding: 11px 12px; resize: vertical; }
.field-label input:focus, .field-label textarea:focus, .contact-row select:focus, .contact-row input:focus { border-color: var(--accent-purple); box-shadow: 0 0 0 3px rgba(139,92,246,.13); }
.field-label input::placeholder, .field-label textarea::placeholder, .contact-row input::placeholder { color: #77718c; }
.field-label input[type="file"] { padding: 7px; }
.field-label input[type="file"]::file-selector-button { color: #eee8ff; padding: 6px 10px; margin-right: 10px; background: rgba(139,92,246,.24); border: 0; border-radius: 7px; cursor: pointer; }
.publish-toggle { align-self: end; display: flex; align-items: center; gap: 9px; min-height: 44px; color: var(--text-muted); font-size: .84rem; }
.publish-toggle input { accent-color: var(--accent-purple); width: 17px; height: 17px; }
.contacts-editor { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--border-color); }
.contacts-editor-heading { margin-bottom: 13px; }
.contacts-editor-heading h4 { font-size: .97rem; }
.contacts-editor-heading p { color: var(--text-muted); font-size: .77rem; margin-top: 3px; }
.btn-small { padding: 8px 12px; font-size: .8rem; }
.contact-fields { display: grid; gap: 9px; }
.contact-row { display: grid; grid-template-columns: minmax(125px,.35fr) minmax(0,1fr) 38px; gap: 9px; }
.contact-row select { cursor: pointer; }
.contact-row option { color: #161224; }
.contact-remove { width: 38px; height: 44px; color: #fca5a5; cursor: pointer; background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.18); border-radius: 10px; }
.contact-remove:hover { background: rgba(248,113,113,.2); }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.form-message, .auth-message { color: #c4b5fd; font-size: .82rem; }
.form-message.is-error, .auth-message.is-error { color: #fca5a5; }
.admin-members { display: grid; gap: 9px; }
.admin-member-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 13px 15px; background: rgba(255,255,255,.035); border: 1px solid var(--border-color); border-radius: 13px; }
.admin-member-info { min-width: 0; display: flex; align-items: center; gap: 12px; }
.admin-member-thumb { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; overflow: hidden; color: #c4b5fd; background: rgba(139,92,246,.13); border-radius: 50%; }
.admin-member-thumb img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.admin-member-copy { min-width: 0; }
.admin-member-copy strong, .admin-member-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-member-copy strong { color: #fff; font-size: .9rem; }
.admin-member-copy span { margin-top: 2px; color: var(--text-muted); font-size: .76rem; }
.admin-member-actions { display: flex; gap: 7px; }
.admin-member-actions button { min-height: 35px; padding: 6px 10px; font-size: .77rem; }
.admin-member-actions .delete-button { color: #fecaca; border-color: rgba(248,113,113,.22); }
.team-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 18px; }
.team-modal-backdrop { position: absolute; inset: 0; background: rgba(5,4,9,.78); backdrop-filter: blur(8px); }
.team-modal-card { width: min(100%, 440px); max-height: min(90vh, 780px); overflow-y: auto; position: relative; padding: 30px; background: #110e1b; border: 1px solid rgba(139,92,246,.35); border-radius: 20px; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.team-modal-card h2 { font-size: 1.45rem; margin: 3px 0 6px; }
.team-modal-card .section-badge { margin-bottom: 8px; }
.modal-close { position: absolute; top: 17px; right: 17px; }
.modal-copy { margin-bottom: 19px; color: var(--text-muted); font-size: .84rem; }
.auth-form { display: grid; gap: 14px; }
.auth-form .btn-primary { justify-content: center; margin-top: 3px; }
.setup-notice { display: flex; gap: 10px; padding: 12px; color: #dcd4ec; font-size: .78rem; line-height: 1.5; background: rgba(139,92,246,.09); border: 1px solid rgba(139,92,246,.2); border-radius: 10px; }
.setup-notice i { margin-top: 3px; color: #c4b5fd; }
.setup-notice code { color: #e9ddff; }
.auth-message { min-height: 18px; margin: 12px 0 0; }
@media (max-width: 992px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .team-directory { padding-top: 42px; }
}
@media (max-width: 640px) {
  .team-page .nav-container { padding: 0 16px; }
  .team-page .nav-actions .btn-copy-ip { padding: 9px 11px; font-size: .76rem; }
  .team-page .nav-actions .btn-icon { display: none; }
  .team-intro { min-height: 315px; padding: 55px 0 44px; }
  .team-intro .hero-title { font-size: 2.55rem; }
  .team-intro .hero-subtitle { font-size: .94rem; }
  .team-directory { padding: 34px 0 54px; }
  .team-section-heading, .team-editor-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .team-section-heading .section-title, .team-editor-heading .section-title { font-size: 1.55rem; }
  .team-grid { grid-template-columns: 1fr; gap: 14px; }
  .team-card { padding: 20px; }
  .team-editor { padding: 18px 14px; margin-top: 42px; }
  .editor-toolbar { align-items: stretch; flex-direction: column; gap: 12px; }
  .editor-toolbar .btn-primary { justify-content: center; }
  .admin-access-panel { padding: 14px 11px; }
  .admin-create-form, .password-form { grid-template-columns: 1fr; align-items: stretch; }
  .member-form { padding: 16px 12px; }
  .member-form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .contacts-editor-heading { align-items: flex-start; flex-direction: column; }
  .contact-row { grid-template-columns: minmax(105px,.45fr) minmax(0,1fr) 38px; gap: 6px; }
  .contact-row select, .contact-row input { padding-left: 8px; padding-right: 8px; font-size: .78rem; }
  .admin-member-row { align-items: flex-start; grid-template-columns: 1fr; }
  .admin-member-actions { padding-left: 54px; }
  .team-modal-card { padding: 26px 20px 22px; }
  .footer-container { align-items: flex-start; flex-direction: column; gap: 10px; }
}
