/* ---------- Equipo (modules/team.js) ---------- */
.team-tabs { margin-bottom: 16px; }
.team-card-h { padding: 16px 20px 12px; margin: 0; }
.team-invite { margin-bottom: 16px; }

.team-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text2); font-size: 11.5px; font-weight: 600; }
.team-avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.team-you { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 500; background: var(--surface-3); color: var(--text2); vertical-align: 1px; }
.team-role-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; background: var(--surface-3); color: var(--text); white-space: nowrap; }
.team-role-sel { height: 30px; font-size: 13px; min-width: 150px; }
#teamMembers tr.is-suspended .cell-strong, #teamMembers tr.is-suspended .team-avatar { opacity: .55; }
.team-actions { gap: 4px; }
button.danger-text { color: var(--red); }
button.danger-text:hover { background: var(--red-soft); color: var(--red); }

.team-linkcard { margin-bottom: 16px; padding: 16px 18px; }
.team-linkcard-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.team-linkcard p { margin: 6px 0 12px; color: var(--text2); font-size: 13px; max-width: 70ch; }
.team-linkcard-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.team-linkcard-row input { flex: 1 1 320px; font-family: var(--font-mono); font-size: 12.5px; }
.btn-link { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--border-strong); color: var(--text); font-size: 12.5px; font-weight: 500; background: var(--surface); }
.btn-link:hover { background: var(--surface-2); color: var(--text); }

.team-upsell { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.team-upsell > svg { width: 20px; height: 20px; color: var(--text2); flex-shrink: 0; }
.team-upsell div { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.team-upsell span { color: var(--text2); font-size: 13px; }

.team-roles { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.team-role-list { padding-bottom: 8px; }
.team-role-list-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 6px 16px; }
.team-role-list-h h3 { margin: 0; font-size: 15px; font-weight: 600; }
.team-role-group { font-size: 11.5px; color: var(--text3); padding: 12px 16px 4px; }
.team-role-item { display: flex; width: calc(100% - 16px); margin: 0 8px; justify-content: space-between; align-items: center; height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; box-shadow: none; font-weight: 450; color: var(--text2); }
.team-role-item:hover { background: var(--hover); color: var(--text); }
.team-role-item.active { background: var(--surface-2); color: var(--text); font-weight: 500; border-color: var(--border); }
.team-role-n { font-size: 12px; color: var(--text3); font-variant-numeric: tabular-nums; }

.team-role-detail { padding: 18px 20px; }
.team-role-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.team-role-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.team-role-head p { margin: 4px 0 0; color: var(--text2); font-size: 13px; }
.team-role-head .field { flex: 1 1 220px; }
.team-role-meta { font-size: 12.5px; color: var(--text3); white-space: nowrap; }
.team-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.team-matrix th, .team-matrix td { padding: 9px 10px; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.team-matrix thead th { border-top: 0; font-size: 12px; font-weight: 500; color: var(--text3); }
.team-matrix tbody th { font-weight: 500; white-space: nowrap; width: 1%; padding-right: 24px; }
.team-matrix .c { text-align: center; width: 64px; }
.team-others { display: flex; flex-direction: column; gap: 6px; }
.team-other { display: flex; align-items: center; gap: 8px; color: var(--text2); }
.team-other em { font-style: normal; color: var(--text3); font-size: 12px; }
.team-other.owner-only { opacity: .75; }
.team-box { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.team-check { display: inline-flex; width: 18px; height: 18px; border-radius: 5px; align-items: center; justify-content: center; vertical-align: middle; box-shadow: inset 0 0 0 1px var(--border); }
.team-check.on { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.team-check svg { width: 12px; height: 12px; stroke-width: 2.4; }
.team-na { color: var(--text3); }
.team-role-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.team-role-actions .spacer { flex: 1; }

.team-compare { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.team-compare th, .team-compare td { padding: 7px 12px; border-top: 1px solid var(--border); white-space: nowrap; }
.team-compare thead th { border-top: 0; font-weight: 500; color: var(--text2); background: var(--surface-2); }
.team-compare td:first-child { color: var(--text2); }
.team-compare .c { text-align: center; }
.team-area { display: block; font-size: 11.5px; color: var(--text3); margin-bottom: 1px; }
.team-compare .team-check { width: 16px; height: 16px; }

.team-activity { padding: 0 0 8px; }
.team-day { padding: 14px 20px 6px; font-size: 12px; color: var(--text3); border-top: 1px solid var(--border); }
.team-day:first-child { border-top: 0; }
.team-event { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 20px; font-size: 13.5px; }
.team-event b { font-weight: 500; }
.team-event time { font-size: 12.5px; color: var(--text3); font-variant-numeric: tabular-nums; }
.team-event.failed > div { color: var(--text3); }
.team-failed { font-size: 12px; color: var(--red); }

/* Roaster switcher in the sidebar header */
/* Desktop: anchor the menu to the sidebar. On small screens the sidebar is position: fixed, which already anchors it. */
@media (min-width: 769px) { .sidebar { position: relative; } }
.ws-menu { display: none; position: absolute; top: 52px; left: 10px; right: 10px; min-width: 0; z-index: 210; }
.ws-menu.open { display: block; animation: popIn .16s var(--ease); }
.ws-menu-h { font-size: 11.5px; color: var(--text3); padding: 6px 10px 4px; }
.ws-item-mark { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text2); font-size: 12px; font-weight: 600; flex-shrink: 0; }
.ws-item.current .ws-item-mark { background: var(--signal); color: #0b0908; }
.ws-check { margin-left: auto; width: 15px; height: 15px; color: var(--text); }
.workspace:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 900px) {
  .team-roles { grid-template-columns: 1fr; }
  .team-matrix tbody th { white-space: normal; }
}
@media (max-width: 560px) {
  #teamMembers th:nth-child(4), #teamMembers td:nth-child(4) { display: none; }
  .team-event { grid-template-columns: 26px minmax(0, 1fr); }
  .team-event time { grid-column: 2; }
  .team-role-sel { min-width: 0; width: 130px; }
}
