/* ─── Teams pages ──────────────────────────────────────────────────── */
.teams-page,
.team-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 60px;
  color: #e6e8ee;
}

.teams-hint {
  color: #9aa0ad;
  font-size: 14px;
  margin-top: 10px;
}

/* ─── Invitations block ─────────────────────────────────────────────── */
.teams-invites {
  background: #16181f;
  border: 1px solid #2a2e3a;
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 auto 26px;
}
.teams-invites-title {
  font-weight: 700;
  margin-bottom: 12px;
  color: #f1c40f;
}
.teams-invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
}
.teams-invite-row + .teams-invite-row { margin-top: 8px; }
.teams-invite-info { display: flex; align-items: center; gap: 14px; }
.teams-invite-name { color: #fff; font-weight: 600; text-decoration: none; }
.teams-invite-name:hover { color: #e74c3c; }
.teams-invite-rating { color: #9aa0ad; font-size: 13px; }
.teams-invite-actions { display: flex; gap: 8px; }

/* ─── Toolbar (search / filter) ─────────────────────────────────────── */
.teams-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.teams-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.teams-search i {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 13px;
}
.teams-search input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  background: #16181f;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  color: #e5e7eb;
  font-size: 14px;
}
.teams-search input:focus { outline: none; border-color: #3884ff; }
.teams-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  padding: 9px 14px;
  background: #16181f;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  transition: border-color .15s, color .15s;
}
.teams-filter-check:hover { border-color: #3884ff; color: #fff; }
.teams-filter-check input { accent-color: #3884ff; width: 15px; height: 15px; }

/* Toolbar buttons sit over the hero background — solid panel for readability. */
.teams-toolbar .trn-btn-ghost {
  background: #16181f;
  border: 1px solid #2a2e3a;
  color: #e5e7eb;
}
.teams-toolbar .trn-btn-ghost:hover { background: #1c1f28; border-color: #3884ff; color: #fff; }

/* ─── Division badge ────────────────────────────────────────────────── */
.team-division {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.team-division.div-elite { color: #f9d423; background: rgba(249, 212, 35, 0.12); border-color: rgba(249, 212, 35, 0.35); }
.team-division.div-1 { color: #60a5fa; background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.35); }
.team-division.div-2 { color: #34d399; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); }
.team-division.div-3 { color: #9aa3b2; background: rgba(154, 163, 178, 0.1); border-color: rgba(154, 163, 178, 0.25); }

/* ─── Pagination ────────────────────────────────────────────────────── */
.teams-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.teams-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #16181f;
  border: 1px solid #2a2e3a;
  color: #cbd5e1;
  text-decoration: none;
  transition: all .15s;
}
.teams-page-btn:hover { color: #fff; border-color: #3884ff; background: rgba(56, 132, 255, 0.12); }
.teams-page-info { color: #9aa3b2; font-size: 13px; }

/* ─── Leaderboard table ─────────────────────────────────────────────── */
.teams-table-wrap {
  background: #16181f;
  border: 1px solid #2a2e3a;
  border-radius: 14px;
  overflow: hidden;
}
.teams-table { width: 100%; border-collapse: collapse; }
.teams-table thead th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #8b91a0;
  padding: 14px 16px;
  background: #1c1f28;
  border-bottom: 1px solid #2a2e3a;
}
.teams-table .col-rank { width: 64px; text-align: center; }
.teams-table .col-division { width: 130px; }
.teams-table .col-rating { width: 120px; }
.teams-table .col-members { width: 100px; }
.teams-table .col-recruit { width: 140px; }
.teams-table .col-captain { width: 180px; }
.teams-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #23262f;
  font-size: 14px;
}
.teams-row { cursor: pointer; transition: background .15s; }
.teams-row:hover { background: #1c1f28; }
.teams-row:last-child td { border-bottom: none; }
.col-rank { text-align: center; }

.team-place {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #23262f;
  color: #c8ccd6;
  font-weight: 700;
  font-size: 13px;
}
.team-place.place-1 { background: linear-gradient(135deg,#f9d423,#e6a817); color: #2a1d00; }
.team-place.place-2 { background: linear-gradient(135deg,#d7d7d7,#a9b0bd); color: #1c1f28; }
.team-place.place-3 { background: linear-gradient(135deg,#e0925a,#c46b32); color: #2a1500; }

.team-name-link { color: #fff; font-weight: 600; text-decoration: none; }
.team-name-link:hover { color: #e74c3c; }
.team-name-cell { display: inline-flex; align-items: center; gap: 10px; }
.team-thumb {
  width: 30px; height: 30px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #1c1f28;
}
.team-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-thumb-empty {
  background: linear-gradient(135deg,#e74c3c,#a01d10);
  color: #fff;
  font-size: 13px;
}
.team-rating-badge {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
}
.team-rating-badge.big { font-size: 15px; padding: 5px 14px; }

/* ─── Team page header ──────────────────────────────────────────────── */
.team-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 14px;
}
/* Topbar sits over the hero background image — give buttons a solid panel so
   they stay readable instead of blending with the artwork. */
.team-topbar .trn-btn {
  background: #16181f;
  border: 1px solid #2a2e3a;
  color: #e5e7eb;
}
.team-topbar .trn-btn:hover { background: #1c1f28; border-color: #3884ff; color: #fff; }
.team-topbar .trn-btn.team-danger { color: #ff7a87 !important; }
.team-topbar .trn-btn.team-danger:hover { background: #c0392b !important; border-color: #c0392b !important; color: #fff !important; }
.team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #16181f;
  border: 1px solid #2a2e3a;
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 22px;
}
.team-header-main { display: flex; align-items: center; gap: 16px; }
.team-avatar {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg,#e74c3c,#a01d10);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.team-avatar.team-avatar-has-img {
  background: #1c1f28;
}
.team-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.team-avatar-edit {
  position: absolute;
  right: 0; bottom: 0;
  width: 24px; height: 24px;
  border: none;
  border-top-left-radius: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.team-avatar-edit:hover { background: #e74c3c; }
.team-avatar-remove {
  background: none;
  border: none;
  color: #8b91a0;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.team-avatar-remove:hover { color: #e74c3c; }

/* ─── Description ───────────────────────────────────────────────────── */
.team-desc-text {
  margin: 0;
  color: #c8ccd6;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.team-desc-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}
.team-desc-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.team-desc-edit-actions > div { display: flex; gap: 8px; }
.team-desc-counter { color: #8b91a0; font-size: 12px; }
.team-founded {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #23262f;
  color: #8b91a0;
  font-size: 13px;
}
.team-founded-item { display: inline-flex; align-items: center; gap: 6px; }
.team-founded-item i { color: #e74c3c; opacity: 0.8; }
.team-founded-item strong { color: #cbd5e1; font-weight: 600; }
.team-title { margin: 0 0 6px; font-size: 24px; color: #fff; }
.team-sub { display: flex; align-items: center; gap: 14px; color: #9aa0ad; font-size: 14px; }

/* ─── Motto / slogan ────────────────────────────────────────────────── */
.team-motto-block { margin: 0 0 10px; }
.team-motto {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-style: italic;
  color: #c8ccd6;
  font-size: 14px;
}
.team-motto i { color: #e74c3c; opacity: 0.75; font-size: 12px; }
.team-motto-muted { color: #8b91a0; font-style: italic; }
.team-motto-edit-btn {
  border: none;
  background: transparent;
  color: #8b91a0;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
}
.team-motto-edit-btn:hover { color: #e74c3c; }
.team-motto-edit { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.team-motto-edit .trn-input { flex: 1; min-width: 200px; }

/* ─── Grid cards ────────────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 820px) { .team-grid { grid-template-columns: 1fr; } }

.team-card {
  background: #16181f;
  border: 1px solid #2a2e3a;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.team-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  font-size: 16px;
}
.team-card-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #8b91a0;
  margin: 14px 0 8px;
}

/* ─── Roster ────────────────────────────────────────────────────────── */
.roster-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #1c1f28;
  border: 1px solid #23262f;
}
.roster-row + .roster-row { margin-top: 8px; }
.roster-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  min-width: 96px;
  justify-content: center;
}
.role-captain { background: rgba(241,196,15,.15); color: #f1c40f; }
.role-main    { background: rgba(46,204,113,.13); color: #2ecc71; }
.role-reserve { background: rgba(149,165,166,.15); color: #95a5a6; }
.roster-player { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.roster-name { color: #fff; font-weight: 600; }
.roster-rank { color: #8b91a0; font-size: 12px; }
.roster-actions { display: flex; gap: 6px; }
.roster-mini {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid #2a2e3a;
  background: #23262f;
  color: #c8ccd6;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.roster-mini:hover { background: #2e3240; color: #fff; }
.roster-mini.danger:hover { background: #c0392b; border-color: #c0392b; color: #fff; }

/* ─── Header record / provisional ───────────────────────────────────── */
.team-record {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #cbd5e1;
  background: #1c1f28;
  border: 1px solid #23262f;
  border-radius: 999px;
  padding: 4px 10px;
}
.team-record i { color: #e0a458; }
.team-record-w { color: #6ee77a; font-weight: 700; }
.team-record-l { color: #e0556a; font-weight: 700; }
.team-record-rate { color: #8a91a3; margin-left: 4px; font-size: 12px; }
.team-provisional {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #e0a458;
  background: rgba(224, 164, 88, 0.12);
  border: 1px solid rgba(224, 164, 88, 0.3);
  border-radius: 999px; padding: 4px 10px;
}

/* ─── Trophies ──────────────────────────────────────────────────────── */
.team-trophies { display: flex; flex-wrap: wrap; gap: 12px; }
.team-trophy {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  background: #1c1f28;
  border: 1px solid #23262f;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 200px;
  transition: border-color .15s, transform .15s;
}
.team-trophy:hover { transform: translateY(-2px); }
.team-trophy.medal-gold:hover { border-color: rgba(251, 191, 36, 0.7); }
.team-trophy.medal-silver:hover { border-color: rgba(203, 213, 225, 0.7); }
.team-trophy.medal-bronze:hover { border-color: rgba(205, 127, 50, 0.7); }
.team-trophy-medal { font-size: 26px; line-height: 1; }
.team-trophy-info { display: flex; flex-direction: column; }
.team-trophy-rank { font-weight: 700; color: #fff; font-size: 14px; }
.team-trophy-trn { color: #9aa3b2; font-size: 12px; }

.team-avatar-uploading { position: relative; }
.team-avatar-uploading::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: rgba(10, 12, 18, 0.45);
}
.team-avatar-uploading img { filter: brightness(0.8); }

/* ─── Team audit journal ────────────────────────────────────────────── */
.team-log { display: flex; flex-direction: column; }
.team-log-row {
  display: grid;
  grid-template-columns: 160px 180px 1fr;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid #23262f;
  font-size: 13px;
}
.team-log-row:last-child { border-bottom: none; }
.team-log-date { color: #8a91a3; }
.team-log-action { color: #e5e7eb; font-weight: 600; }
.team-log-meta { color: #9aa3b2; }
@media (max-width: 640px) {
  .team-log-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ─── Rating sparkline ──────────────────────────────────────────────── */
.team-spark {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; padding: 10px 12px;
  background: #1c1f28; border: 1px solid #23262f; border-radius: 10px;
}
.team-spark-svg { width: 160px; height: 36px; flex-shrink: 0; }
.team-spark-meta { font-size: 13px; color: #9aa3b2; }
.team-spark-meta strong { color: #e5e7eb; }

/* ─── Invite form / pending ─────────────────────────────────────────── */
.team-invite-form { display: flex; gap: 8px; align-items: flex-start; }
.team-invite-search { position: relative; flex: 1; }
.team-invite-search .trn-input { width: 100%; }
.team-invite-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.team-invite-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #23262f;
  color: #d1d5db;
  cursor: pointer;
  text-align: left;
}
.team-invite-result:last-child { border-bottom: none; }
.team-invite-result:hover:not(:disabled) { background: #262a36; color: #fff; }
.team-invite-result:disabled { opacity: 0.55; cursor: not-allowed; }
.team-invite-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #2a2e3a; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #8a91a3; font-size: 13px;
}
.team-invite-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-invite-meta { display: flex; flex-direction: column; line-height: 1.2; }
.team-invite-nick { font-weight: 600; font-size: 13px; }
.team-invite-pid { font-size: 11px; color: #8a91a3; }
.team-invite-busy {
  margin-left: auto; font-size: 11px; color: #e0a458;
  background: rgba(224, 164, 88, 0.12); padding: 2px 8px; border-radius: 999px;
}
.team-invite-empty { padding: 12px; color: #8a91a3; font-size: 13px; }
.team-invite-hint { margin-top: 8px; font-size: 12px; color: #9aa3b2; }
.team-invite-hint strong { color: #e5e7eb; }
.pending-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #1c1f28;
  border: 1px solid #23262f;
}
.pending-row + .pending-row { margin-top: 6px; }
.pending-name { color: #fff; font-weight: 600; }
.pending-pid { color: #8b91a0; font-size: 12px; flex: 1; }
.team-empty-row { color: #8b91a0; font-size: 13px; padding: 8px 2px; }

/* ─── History table ─────────────────────────────────────────────────── */
.team-history-wrap { overflow-x: auto; }
.team-history { width: 100%; border-collapse: collapse; }
.team-history th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  color: #8b91a0;
  padding: 8px 12px;
  border-bottom: 1px solid #2a2e3a;
}
.team-history td {
  padding: 9px 12px;
  border-bottom: 1px solid #23262f;
  font-size: 13px;
}
.team-history a { color: #e74c3c; text-decoration: none; }
.team-history a:hover { text-decoration: underline; }
.delta-pos { color: #2ecc71; font-weight: 700; }
.delta-neg { color: #e74c3c; font-weight: 700; }

.team-danger { color: #e74c3c !important; }
.team-danger:hover { background: #c0392b !important; color: #fff !important; }

/* small button helper (in case not present in tournaments css) */
.trn-btn-sm { padding: 6px 12px; font-size: 13px; }
.trn-modal-sm { max-width: 420px; }

/* ─── Join applications: applicant card ─────────────────────────────── */
.team-apply-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #2a2e3a;
  background: #1c1f28;
  color: #cbd5e1;
}
.team-apply-status.is-pending { background: rgba(245,196,81,.12); border-color: rgba(245,196,81,.35); color: #f5d489; }
.team-apply-status.is-accepted { background: rgba(76,175,80,.14); border-color: rgba(76,175,80,.38); color: #9fe0a2; }
.team-apply-status.is-rejected { background: rgba(231,76,60,.12); border-color: rgba(231,76,60,.35); color: #ff9b9b; }
.team-apply-status.is-closed { background: rgba(255,255,255,.04); color: #9aa0ad; }
.team-apply-status.is-info { background: rgba(56,132,255,.12); border-color: rgba(56,132,255,.35); color: #9cc0ff; }
.team-apply-note {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-left: 3px solid #e74c3c;
  color: #e6e8ee;
  font-size: 14px;
  line-height: 1.5;
}
.team-apply-card .teams-hint { margin-bottom: 12px; }

/* ─── Recruitment toggle + applications card ────────────────────────── */
.team-recruit-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.team-recruit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.team-recruit-badge.is-open { color: #6ee79a; background: rgba(76,175,80,.16); border: 1px solid rgba(76,175,80,.38); }
.team-recruit-badge.is-closed { color: #9aa0ad; background: rgba(255,255,255,.05); border: 1px solid #2a2e3a; }
.team-recruit-badge.is-full { color: #e0a458; background: rgba(224,164,88,.12); border: 1px solid rgba(224,164,88,.3); }
.team-apply-actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* Applications card spans the full grid width */
.team-grid > .team-card-full { grid-column: 1 / -1; }
.team-app-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #e74c3c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

/* ─── Wide modal for builder / applications ─────────────────────────── */
.trn-modal.trn-modal-wide { max-width: 760px; }
.team-app-modal .trn-modal-body { max-height: 70vh; overflow-y: auto; }

/* ─── Apply form fields (inside apply modal) ────────────────────────── */
.team-apply-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.team-apply-field:last-child { margin-bottom: 0; }
.team-apply-label { font-weight: 600; font-size: 14px; color: #e6e8ee; }
.team-apply-req { color: #e74c3c; }
.team-apply-field textarea.trn-input { resize: vertical; font-family: inherit; }
.team-apply-options { display: flex; flex-direction: column; gap: 8px; }
.team-apply-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid #2a2e3a;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #d1d5db;
}
.team-apply-option:hover { border-color: rgba(220,53,69,.5); }
.team-apply-option input { accent-color: #e74c3c; }

/* ─── Form builder ──────────────────────────────────────────────────── */
.team-form-questions { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.team-form-question {
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  padding: 14px;
  background: #1c1f28;
}
.team-form-question.dragging { opacity: 0.5; }
.team-form-question-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.team-form-question-head .fq-label { flex: 1 1 240px; }
.team-form-question-head .fq-type { flex: 0 0 auto; width: auto; cursor: pointer; }
.team-form-drag { cursor: grab; color: #8b91a0; padding: 2px 6px; display: inline-flex; }
.team-form-drag:active { cursor: grabbing; }
.team-form-required {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #9aa0ad;
  white-space: nowrap;
  cursor: pointer;
}
.team-form-required input { accent-color: #e74c3c; }
.team-form-options:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-left: 26px;
}
.team-form-option { display: flex; align-items: center; gap: 8px; }
.team-form-option .fo-label { flex: 1; }
.team-form-options .fo-add { align-self: flex-start; }
.team-form-add {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0 0;
}

/* ─── Applications list + detail ────────────────────────────────────── */
.team-app-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.team-app-filters .app-filter.is-active { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.team-applications-list { display: flex; flex-direction: column; gap: 10px; }
.team-application {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  padding: 12px 14px;
  background: #1c1f28;
}
.team-application-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.team-application-name { font-weight: 700; color: #fff; }
.team-application-meta { font-size: 12px; color: #9aa0ad; }
.team-application-note {
  font-size: 13px;
  color: #cbd5e1;
  border-left: 3px solid #e74c3c;
  padding-left: 8px;
}
.team-application-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.team-app-statelabel { font-size: 13px; font-weight: 600; }
.team-app-statelabel.is-accepted { color: #9fe0a2; }
.team-app-statelabel.is-rejected { color: #ff9b9b; }
.team-app-stale {
  font-size: 11px;
  color: #ff9b9b;
  background: rgba(231,76,60,.12);
  border: 1px solid rgba(231,76,60,.3);
  padding: 2px 8px;
  border-radius: 999px;
}
#appBackBtn { margin-bottom: 14px; }
.team-application-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.team-answers { display: flex; flex-direction: column; gap: 12px; }
.team-answer {
  border: 1px solid #2a2e3a;
  border-radius: 8px;
  padding: 10px 12px;
  background: #1c1f28;
}
.team-answer-q { font-weight: 600; font-size: 13px; color: #9aa0ad; margin-bottom: 4px; }
.team-answer-a { color: #e6e8ee; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.team-answer-empty { color: #8b91a0; font-style: italic; }
.team-review {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #2a2e3a;
}
.team-review textarea.trn-input { resize: vertical; font-family: inherit; }
.team-review-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
