/* ============================================================
   Team Editor — editable team members on cover slide
   ============================================================ */

.team-block {
  margin-top: 28px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 16px 20px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.team-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.team-edit-btn {
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
}
.team-edit-btn:hover { background: #0f766e; transform: translateY(-1px); }

.team-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.team-member {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 12px;
  border-radius: 10px;
  border-left: 3px solid #0ea5e9;
}
.team-avatar {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.team-info { min-width: 0; flex: 1; }
.team-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.team-role { font-size: 11.5px; color: var(--muted); }
.team-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

/* ============================================================
   Edit Modal
   ============================================================ */
.team-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, .68);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.team-modal.open { display: flex; }
.team-modal-card {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.tm-header {
  padding: 16px 22px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tm-header h3 { margin: 0; font-size: 18px; font-weight: 700; }
.tm-close {
  background: rgba(255, 255, 255, .15);
  border: 0; color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all .2s ease;
}
.tm-close:hover { background: rgba(239, 68, 68, .8); }

.tm-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}
.tm-row {
  display: grid;
  grid-template-columns: 32px 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  background: var(--paper-2);
  border-radius: 10px;
}
.tm-row-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
}
.tm-input {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
}
.tm-input:focus {
  outline: 2px solid #22d3ee;
  outline-offset: -1px;
}
.tm-remove {
  background: #ef4444;
  color: #fff;
  border: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: all .2s ease;
}
.tm-remove:hover { background: #b91c1c; transform: scale(1.08); }

.tm-add {
  display: block;
  margin-top: 14px;
  background: #0ea5e9;
  color: #fff;
  border: 0;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  width: 100%;
  transition: all .2s ease;
}
.tm-add:hover { background: #0284c7; }

.tm-footer {
  padding: 14px 22px;
  background: var(--paper-2);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
}
.tm-footer-left { display: flex; gap: 8px; }
.tm-secondary-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}
.tm-secondary-btn:hover { background: var(--paper-2); }
.tm-save {
  background: #10b981;
  color: #fff;
  border: 0;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}
.tm-save:hover { background: #059669; }

.tm-info {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(34, 211, 238, .08);
  border-left: 3px solid #22d3ee;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .tm-row {
    grid-template-columns: 28px 1fr auto;
    grid-template-areas:
      "num name remove"
      ".   role role";
  }
  .tm-row-num { grid-area: num; }
  .tm-row .tm-input:nth-of-type(1) { grid-area: name; }
  .tm-row .tm-input:nth-of-type(2) { grid-area: role; }
  .tm-remove { grid-area: remove; }
}
