:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--dsw-alias-label-primary, #0f1115);
  background: var(--dsw-alias-bg-base, #f7f8fa);
  --team-text: var(--dsw-alias-label-primary, #0f1115);
  --team-secondary: var(--dsw-alias-label-secondary, #61666b);
  --team-muted: var(--dsw-alias-label-tertiary, #81858c);
  --team-surface: var(--dsw-alias-bg-layer-2, #fff);
  --team-rail: var(--dsw-alias-bg-layer-1, #f7f8fa);
  --team-border: var(--dsw-alias-border-l2, rgba(0, 0, 0, .08));
  --team-hover: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, .045));
  --team-active: var(--dsw-specific-sidebar-nav-item-active, #e9ebee);
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.6; }
.team-shell { color: var(--team-text); }
.team-settings {
  display: flex;
  width: min(1060px, calc(100% - 64px));
  min-height: min(760px, calc(100dvh - 80px));
  margin: 40px auto;
  overflow: hidden;
  border: 1px solid var(--team-border);
  border-radius: 24px;
  background: var(--team-surface);
  box-shadow: 0 12px 48px rgb(0 0 0 / 4%);
}
.team-settings-sidebar {
  display: flex;
  flex-direction: column;
  flex: 0 0 212px;
  padding: 20px 12px 16px;
  border-right: 1px solid var(--team-border);
  background: var(--team-rail);
}
.team-settings-sidebar h1 { margin: 22px 14px 20px; font-size: 16px; line-height: 24px; font-weight: 600; }
.team-settings-nav { display: grid; align-content: start; gap: 4px; }
.team-settings .team-settings-nav button {
  justify-content: flex-start;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  text-align: left;
  background: transparent;
}
.team-settings-nav button[aria-selected="true"] { background: var(--team-active); font-weight: 500; }
.team-settings-identity { display: flex; align-items: center; gap: 10px; margin: auto 6px 0; padding: 36px 6px 0; }
.team-settings-identity strong { font-size: 12px; font-weight: 500; }
.team-settings-identity p { margin: 1px 0 0; color: var(--team-muted); font-size: 12px; }
.team-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; background: #e5ece8; color: #4a6257; font-size: 13px; }
.team-settings-content { flex: 1; min-width: 0; padding: 36px; }
.team-settings-content [hidden] { display: none !important; }
.team-settings-content h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.3px; }
.team-settings-content h3 { margin: 0; font-size: 14px; line-height: 22px; font-weight: 500; }
.team-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.team-count, .team-pill { display: inline-flex; flex: none; align-items: center; padding: 2px 9px; border-radius: 12px; color: var(--team-secondary); background: var(--team-rail); font-size: 12px; white-space: nowrap; }
.team-section-description, .team-members > p, .team-interactions > p { margin: 8px 0 24px; color: var(--team-secondary); font-size: 13px; }
.team-notice, .team-status { color: var(--team-muted); font-size: 12px; }
.team-notice { margin: 8px 0 16px; }
.team-status { margin: 6px 0 0; }
.team-status:empty { display: none; }

.team-shell button, .team-shell input, .team-shell select, .team-shell textarea { font: inherit; }
.team-shell button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: none;
  gap: 4px;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--team-border);
  border-radius: 16px;
  color: var(--team-text);
  background: var(--team-surface);
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
}
.team-shell button:hover { background: var(--team-hover); }
.team-shell button:disabled { cursor: default; opacity: .4; }
.team-shell .team-back { align-self: flex-start; border: none; color: var(--team-secondary); background: transparent; }
.team-shell input, .team-shell select, .team-shell textarea {
  min-width: 0;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--team-border);
  border-radius: 8px;
  color: var(--team-text);
  background: var(--team-surface);
  font-size: 13px;
  line-height: 20px;
}
.team-shell input::placeholder, .team-shell textarea::placeholder { color: var(--team-muted); }
.team-shell :is(button, input, select, textarea, summary):focus-visible { outline: 2px solid #6b8ff4; outline-offset: 3px; }
.team-shell .team-danger { color: #ba3636; border-color: transparent; background: transparent; }
.team-shell .team-danger:hover { background: rgba(186, 54, 54, .07); }
.team-project-create { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 20px; }
.team-project-create input { flex: 1; min-width: 180px; }
.team-project-create button, .team-login-form button {
  color: var(--dsw-alias-label-primary-foreground, #fff);
  background: var(--dsw-alias-button-primary-fill, #24272c);
  border-color: transparent;
  font-size: 13px;
}
.team-project-create button:hover, .team-login-form button:hover { background: var(--dsw-alias-button-primary-hover, #3b3f45); }
.team-projects { display: grid; border-top: 1px solid var(--team-border); }
.team-project { min-width: 0; padding: 18px 0; border-bottom: 1px solid var(--team-border); }
.team-project-overview { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.team-project-title { min-width: 0; }
.team-project-title h2 { overflow-wrap: anywhere; font-size: 14px; line-height: 22px; letter-spacing: 0; font-weight: 500; }
.team-project-title p { display: inline-block; margin: 5px 0 0; color: var(--team-muted); font-size: 12px; }
.team-project-details { margin-top: 10px; }
.team-project-details summary { width: fit-content; color: var(--team-secondary); font-size: 12px; cursor: pointer; }
.team-project-controls { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: var(--team-rail); }
.team-project-settings, .team-session-launcher { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.team-project-settings input { flex: 1; min-width: 150px; }
.team-session-launcher .team-status { flex-basis: 100%; }

.team-member-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 14px; }
.team-member-add input { flex: 1; min-width: 160px; }
.team-members > button { margin-bottom: 12px; }
.team-member-list { border-top: 1px solid var(--team-border); }
.team-member { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 18px 0; border-bottom: 1px solid var(--team-border); }
.team-member-identity { flex: 1; min-width: 160px; overflow-wrap: anywhere; }
.team-member-identity p { margin: 3px 0; color: var(--team-secondary); font-size: 12px; }
.team-member-level { color: var(--team-muted); font-size: 12px; }
.team-member-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--team-muted); font-size: 12px; }
.team-member-actions select { max-width: 130px; min-height: 30px; padding-top: 4px; padding-bottom: 4px; font-size: 12px; }
.team-member-actions button { padding: 4px 9px; }
.team-account-row { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--team-border); }
.team-account-row p { margin: 4px 0 0; color: var(--team-secondary); font-size: 12px; }
.team-switch { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 8px; max-width: 100%; }
.team-switch select { max-width: 290px; }
.team-switch span, .team-switch .team-status { grid-column: 1 / -1; max-width: 340px; color: var(--team-muted); font-size: 12px; }
.team-interaction-list { display: grid; gap: 14px; margin-top: 16px; }
.team-interaction { padding: 18px; border: 1px solid var(--team-border); border-radius: 12px; }
.team-interaction-scope { overflow-wrap: anywhere; color: var(--team-muted); font-size: 12px; }
.team-interaction-actions { display: flex; gap: 8px; }
.team-question-form fieldset { display: grid; gap: 8px; margin: 12px 0; padding: 12px; border: 1px solid var(--team-border); border-radius: 8px; }
.team-question-form textarea { min-height: 72px; }
.team-login { width: min(420px, calc(100% - 40px)); margin: 12vh auto; padding: 32px; border: 1px solid var(--team-border); border-radius: 24px; background: var(--team-surface); }
.team-login h1 { margin: 0 0 10px; font-size: 20px; font-weight: 600; }
.team-login > p { color: var(--team-secondary); font-size: 13px; }
.team-login-form { display: grid; gap: 18px; margin-top: 28px; }
.team-login-form label { display: grid; gap: 7px; font-size: 13px; }
.team-login-form button { min-height: 36px; }

@media (max-width: 760px) {
  .team-settings { width: calc(100% - 24px); margin: 12px auto; min-height: calc(100dvh - 24px); border-radius: 18px; flex-direction: column; }
  .team-settings-sidebar { flex: none; padding: 12px; border-right: none; border-bottom: 1px solid var(--team-border); }
  .team-settings-sidebar h1 { margin: 14px 10px 12px; }
  .team-settings-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .team-settings .team-settings-nav button { width: auto; min-height: 36px; height: auto; padding: 5px 10px; font-size: 13px; }
  .team-settings-identity { display: none; }
  .team-settings-content { padding: 24px 20px; }
  .team-member-actions { width: 100%; }
  .team-account-row { align-items: flex-start; }
  .team-switch { width: 100%; }
  .team-switch select { max-width: 100%; }
}
