:root {
  --team-ink: #272326;
  --team-soft: #f5f1ee;
  --team-line: #e9e1dc;
  --team-coral: #ed576b;
  --team-green: #2f8f69;
}

.team-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.team-status-pill,
.team-button {
  min-height: 42px;
  border: 1px solid var(--team-line);
  border-radius: 14px;
  background: #fff;
  color: var(--team-ink);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  font: inherit;
}
.team-status-pill { color: #6f6764; font-size: 13px; }
.team-status-pill i { width: 8px; height: 8px; border-radius: 50%; background: #aaa09b; }
.team-status-pill.online i { background: var(--team-green); box-shadow: 0 0 0 4px #e8f5ef; }
.team-status-pill.pending i { background: #e6a13a; box-shadow: 0 0 0 4px #fff4e2; }
.team-button { cursor: pointer; font-weight: 700; }
.team-button:hover { border-color: #d9cdc7; background: #fcfaf9; }
.team-avatar {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--team-ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.team-update-bar {
  position: fixed;
  top: 112px;
  left: calc(50% + 130px);
  transform: translateX(-50%);
  z-index: 70;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border: 1px solid #efd9c9;
  border-radius: 14px;
  background: #fff9f2;
  box-shadow: 0 12px 34px rgba(57, 40, 31, .12);
  color: #604a3c;
  font-size: 14px;
}
.team-update-bar.show { display: flex; }
.team-update-bar button { border: 0; border-radius: 10px; background: var(--team-ink); color: #fff; padding: 8px 12px; cursor: pointer; }

.team-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--team-ink);
  box-shadow: 0 24px 90px rgba(35, 28, 29, .24);
}
.team-modal::backdrop { background: rgba(31, 27, 29, .45); backdrop-filter: blur(4px); }
.team-modal-head { display: flex; justify-content: space-between; gap: 18px; padding: 24px 26px 18px; border-bottom: 1px solid var(--team-line); }
.team-modal-head span { color: var(--team-coral); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.team-modal-head h2 { margin: 4px 0 0; font-size: 25px; }
.team-icon-button { width: 38px; height: 38px; border: 1px solid var(--team-line); border-radius: 12px; background: #fff; cursor: pointer; font-size: 19px; }
.team-modal-body { padding: 22px 26px 26px; overflow: auto; max-height: calc(100vh - 150px); }
.team-summary { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-bottom: 20px; }
.team-summary > div { padding: 16px; border: 1px solid var(--team-line); border-radius: 16px; background: var(--team-soft); }
.team-summary small { display: block; color: #8a7f7a; margin-bottom: 5px; }
.team-summary strong { display: block; font-size: 16px; }
.team-section { margin-top: 22px; }
.team-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.team-section-title h3 { margin: 0; font-size: 16px; }
.team-section-title small { color: #8a7f7a; }
.team-member-list,
.team-activity-list { display: grid; gap: 8px; }
.team-member,
.team-activity { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--team-line); border-radius: 14px; }
.team-member .team-avatar { width: 36px; height: 36px; border-radius: 12px; }
.team-member b,
.team-member small,
.team-activity b,
.team-activity small { display: block; }
.team-member small,
.team-activity small { color: #8a7f7a; margin-top: 2px; }
.team-role { border-radius: 999px; padding: 6px 9px; background: #f7efed; color: #795d59; font-size: 12px; }
.team-activity { grid-template-columns: 1fr auto; }
.team-invite { display: grid; grid-template-columns: 1fr 126px auto; gap: 9px; }
.team-invite input,
.team-invite select,
.team-login-form input {
  min-height: 44px;
  border: 1px solid var(--team-line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
}
.team-primary { min-height: 44px; border: 0; border-radius: 12px; padding: 0 16px; background: var(--team-coral); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.team-secondary { min-height: 42px; border: 1px solid var(--team-line); border-radius: 12px; padding: 0 14px; background: #fff; color: var(--team-ink); font: inherit; cursor: pointer; }
.team-note { margin: 12px 0 0; color: #7f7470; font-size: 13px; line-height: 1.7; }
.team-message { min-height: 22px; margin: 10px 0 0; color: #8b5c53; font-size: 13px; }
.team-empty { padding: 18px; border: 1px dashed #ded3ce; border-radius: 14px; color: #8a7f7a; text-align: center; }

.team-auth-gate { position: fixed; inset: 0; z-index: 500; display: none; place-items: center; padding: 24px; background: #f3efec; }
.team-auth-gate.show { display: grid; }
.team-login-card { width: min(430px, 100%); padding: 34px; border: 1px solid #e5dbd6; border-radius: 28px; background: rgba(255,255,255,.94); box-shadow: 0 28px 90px rgba(52, 41, 42, .12); }
.team-login-mark { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--team-ink); color: #fff; font-weight: 800; }
.team-login-card h1 { margin: 22px 0 8px; font-size: 29px; }
.team-login-card > p { color: #756b67; line-height: 1.7; }
.team-login-form { display: grid; gap: 10px; margin-top: 24px; }
.team-login-form label { font-size: 13px; font-weight: 700; }
.team-login-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--team-line); color: #8a7f7a; font-size: 12px; line-height: 1.7; }
.team-config-card { padding: 18px; border: 1px solid var(--team-line); border-radius: 16px; background: var(--team-soft); }
.team-config-card h3 { margin: 0 0 8px; }
.team-config-card ol { margin: 10px 0 0 18px; padding: 0; color: #706561; line-height: 1.8; }
.team-locked { opacity: .55 !important; cursor: not-allowed !important; }

@media (max-width: 980px) {
  .team-status-pill { display: none; }
  .team-button > span:last-child { display: none; }
  .team-summary { grid-template-columns: 1fr; }
  .team-invite { grid-template-columns: 1fr; }
  .team-update-bar { left: 50%; top: 88px; }
}
