/* FieldBase Account Team Management - rev 1.6.8.3.114 */
.account-team-mgmt {
  --team-bg: rgba(15, 23, 42, 0.78);
  --team-bg-soft: rgba(30, 41, 59, 0.72);
  --team-line: rgba(148, 163, 184, 0.28);
  --team-text: #f8fafc;
  --team-muted: #cbd5e1;
  --team-strong: #ffffff;
  --team-blue: #38bdf8;
  --team-green: #22c55e;
  --team-amber: #f59e0b;
  --team-red: #ef4444;
  display: grid;
  gap: 18px;
  color: var(--team-text);
}

body.light-mode .account-team-mgmt,
body.light-theme .account-team-mgmt,
html.light .account-team-mgmt,
html.fb-light-preload .account-team-mgmt {
  --team-bg: rgba(255, 255, 255, 0.96);
  --team-bg-soft: rgba(248, 250, 252, 0.94);
  --team-line: rgba(15, 23, 42, 0.16);
  --team-text: #0f172a;
  --team-muted: #475569;
  --team-strong: #020617;
}

.account-team-mgmt-topline,
.account-team-mgmt-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-team-mgmt-topline h3,
.account-team-mgmt-section-head h3 {
  margin: 0 0 5px;
  color: var(--team-strong);
  letter-spacing: -0.02em;
}

.account-team-mgmt-topline p,
.account-team-mgmt-section-head span,
.account-team-mgmt-card small,
.account-team-mgmt-main span,
.account-team-mgmt-empty span,
.account-team-mgmt-muted {
  color: var(--team-muted);
}

.account-team-mgmt-dev-pill,
.account-team-mgmt-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(56, 189, 248, 0.34);
  background: rgba(56, 189, 248, 0.14);
  color: var(--team-blue);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.account-team-mgmt-dev-pill {
  color: #fef3c7;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(56, 189, 248, 0.2));
  border-color: rgba(245, 158, 11, 0.5);
}

body.light-mode .account-team-mgmt-dev-pill,
body.light-theme .account-team-mgmt-dev-pill,
html.light .account-team-mgmt-dev-pill,
html.fb-light-preload .account-team-mgmt-dev-pill {
  color: #92400e;
}

.account-team-mgmt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-team-mgmt-card,
.account-team-mgmt-row,
.account-team-mgmt-empty,
.account-team-mgmt-loading,
.account-team-mgmt-error {
  border: 1px solid var(--team-line);
  background: var(--team-bg);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.16);
}

.account-team-mgmt-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--team-muted);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.account-team-mgmt-card strong {
  display: block;
  color: var(--team-strong);
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.account-team-mgmt-card small {
  display: block;
  margin-top: 8px;
  line-height: 1.45;
}

.account-team-mgmt-alert,
.account-team-mgmt-status {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid var(--team-line);
  background: var(--team-bg-soft);
  color: var(--team-text);
}

.account-team-mgmt-alert.warn,
.account-team-mgmt-status.info {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.14);
}

.account-team-mgmt-alert.danger,
.account-team-mgmt-status.error,
.account-team-mgmt-error {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.13);
}

.account-team-mgmt-status.success {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.14);
}

.account-team-mgmt-status:empty { display: none; }

.account-team-mgmt-section {
  display: grid;
  gap: 10px;
}

.account-team-mgmt-list {
  display: grid;
  gap: 10px;
}

.account-team-mgmt-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(130px, 0.7fr) minmax(110px, 0.55fr) minmax(190px, 0.9fr);
  gap: 12px;
  align-items: center;
}

.account-team-mgmt-main strong,
.account-team-mgmt-empty strong {
  display: block;
  color: var(--team-strong);
  overflow-wrap: anywhere;
}

.account-team-mgmt-main span,
.account-team-mgmt-empty span {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.account-team-mgmt-pill.active {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.34);
}

.account-team-mgmt-pill.blocked {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.34);
}

.account-team-mgmt-pill.pending {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.34);
}

.account-team-mgmt-pill.owner {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.34);
}

.account-team-mgmt-pill.developer {
  color: #fef3c7;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(56, 189, 248, 0.16));
  border-color: rgba(245, 158, 11, 0.42);
}

body.light-mode .account-team-mgmt-pill.developer,
body.light-theme .account-team-mgmt-pill.developer,
html.light .account-team-mgmt-pill.developer,
html.fb-light-preload .account-team-mgmt-pill.developer { color: #92400e; }

body.light-mode .account-team-mgmt-pill.active,
body.light-theme .account-team-mgmt-pill.active,
html.light .account-team-mgmt-pill.active,
html.fb-light-preload .account-team-mgmt-pill.active { color: #166534; }

body.light-mode .account-team-mgmt-pill.blocked,
body.light-theme .account-team-mgmt-pill.blocked,
html.light .account-team-mgmt-pill.blocked,
html.fb-light-preload .account-team-mgmt-pill.blocked { color: #991b1b; }

body.light-mode .account-team-mgmt-pill.pending,
body.light-theme .account-team-mgmt-pill.pending,
html.light .account-team-mgmt-pill.pending,
html.fb-light-preload .account-team-mgmt-pill.pending { color: #92400e; }

body.light-mode .account-team-mgmt-pill.owner,
body.light-theme .account-team-mgmt-pill.owner,
html.light .account-team-mgmt-pill.owner,
html.fb-light-preload .account-team-mgmt-pill.owner { color: #1d4ed8; }

.account-team-mgmt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.account-team-mgmt-actions button,
.account-team-mgmt-select-wrap select {
  appearance: none;
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--team-strong);
  min-height: 38px;
  padding: 8px 11px;
  font-weight: 850;
  cursor: pointer;
}

.account-team-mgmt-actions button:hover,
.account-team-mgmt-select-wrap select:hover {
  border-color: rgba(56, 189, 248, 0.7);
  transform: translateY(-1px);
}

.account-team-mgmt-actions button.danger {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.12);
}

.account-team-mgmt-select-wrap select {
  width: 100%;
  min-width: 130px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .account-team-mgmt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-team-mgmt-row { grid-template-columns: 1fr 1fr; }
  .account-team-mgmt-actions { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .account-team-mgmt-grid,
  .account-team-mgmt-row { grid-template-columns: 1fr; }
  .account-team-mgmt-topline,
  .account-team-mgmt-section-head { flex-direction: column; }
  .account-team-mgmt-actions button,
  .account-team-mgmt-select-wrap,
  .account-team-mgmt-select-wrap select { width: 100%; }
}


.account-team-mgmt-pill.declined {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.34);
}

.account-team-mgmt-pill.expired {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.34);
}

.account-team-mgmt-section.invite-history .account-team-mgmt-row {
  opacity: 0.92;
}

body.light-mode .account-team-mgmt-pill.declined,
body.light-theme .account-team-mgmt-pill.declined,
html.light .account-team-mgmt-pill.declined,
html.fb-light-preload .account-team-mgmt-pill.declined { color: #991b1b; }

body.light-mode .account-team-mgmt-pill.expired,
body.light-theme .account-team-mgmt-pill.expired,
html.light .account-team-mgmt-pill.expired,
html.fb-light-preload .account-team-mgmt-pill.expired { color: #475569; }


.account-team-mgmt-invite-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 900;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

.account-team-mgmt-invite-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .account-team-mgmt-invite-btn {
    width: 100%;
  }
}
