/* 组织设置产品演示组件
 * 外壳复用 Electron ShellTopBar / ActivityRail；内部信息架构对照当前
 * SettingsSpace、settingsNavigation 与 OrganizationMembersPanel。
 */

.tt-product-demo--organization {
  background: #fff;
}

.tt-product-demo--organization .tt-shell-body {
  grid-template-columns: var(--tt-activity-rail-width) minmax(0, 1fr);
}

.tt-organization-settings {
  display: grid;
  grid-template-columns: 18.2cqw minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

/* ── 设置侧栏 ─────────────────────────────────────────────── */

.tt-org-settings-sidebar {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 1.05cqw 0.62cqw 0.9cqw;
  border-right: 1px solid var(--tt-line);
  background: #f8f8f7;
  color: #514d48;
}

.tt-org-settings-sidebar__organization {
  overflow: hidden;
  padding: 0 0.55cqw 0.62cqw;
  color: #45413d;
  font-size: var(--tt-text-primary);
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tt-org-settings-nav,
.tt-org-settings-nav__group {
  display: grid;
}

.tt-org-settings-nav {
  gap: 0.55cqw;
}

.tt-org-settings-nav__group {
  gap: 0.08cqw;
}

.tt-org-settings-nav__title {
  height: 1.55cqw;
  padding: 0 0.48cqw;
  color: #68635e;
  font-size: var(--tt-text-meta);
  font-weight: 600;
  line-height: 1.55cqw;
}

.tt-org-settings-nav__item {
  display: flex;
  align-items: center;
  gap: 0.58cqw;
  height: 2.02cqw;
  min-width: 0;
  padding: 0 0.52cqw;
  border-radius: 0.48cqw;
  color: #5a5651;
  font-size: var(--tt-text-message);
  font-weight: 400;
  white-space: nowrap;
}

.tt-org-settings-nav__item svg {
  width: 1.02cqw;
  height: 1.02cqw;
  flex: 0 0 auto;
  color: #aaa6a0;
  stroke-width: 1.65;
}

.tt-org-settings-nav__item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tt-org-settings-nav__item.is-active {
  background: #ebeae8;
  color: #34312e;
  font-weight: 600;
}

.tt-org-settings-nav__item.is-active svg {
  color: var(--tt-accent);
}

.tt-org-user-profile {
  background: #efc33d;
  color: #121212;
}

.tt-org-user-profile svg {
  width: 1.45cqw;
  height: 1.45cqw;
  fill: currentColor;
  stroke: none;
}

/* ── 成员与额度主面板 ─────────────────────────────────────── */

.tt-org-settings-content {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.tt-org-settings-page-header {
  display: flex;
  align-items: center;
  gap: 0.82cqw;
  height: 5.55cqw;
  padding: 0 2.2cqw;
  border-bottom: 1px solid var(--tt-line);
}

.tt-org-settings-page-header__icon {
  display: grid;
  place-items: center;
  width: 2.48cqw;
  height: 2.48cqw;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fbf7f2;
  color: var(--tt-accent);
}

.tt-org-settings-page-header__icon svg {
  width: 1.4cqw;
  height: 1.4cqw;
  stroke-width: 1.65;
}

.tt-org-settings-page-header h4 {
  margin: 0;
  color: #302d2a;
  font-size: var(--tt-text-subtitle);
  font-weight: 600;
  line-height: 1.35;
}

.tt-org-settings-page-header p {
  margin: 0.22cqw 0 0;
  color: #aaa6a0;
  font-size: var(--tt-text-meta);
  line-height: 1.4;
}

.tt-org-settings-scroll {
  height: calc(100% - 5.55cqw);
  overflow: hidden;
  padding: 1.35cqw 2.15cqw 0.9cqw;
}

.tt-org-budget-card {
  overflow: hidden;
  border: 1px solid rgba(42, 38, 33, 0.055);
  border-radius: 0.78cqw;
  background: #fcfcfb;
}

.tt-org-budget-card__header,
.tt-org-members-heading,
.tt-org-members-filters,
.tt-org-member-row {
  display: flex;
  align-items: center;
}

.tt-org-budget-card__header {
  height: 2.55cqw;
  padding: 0 1.05cqw;
  color: #8f8b85;
  font-size: var(--tt-text-meta);
  font-weight: 500;
}

.tt-org-budget-card__header svg {
  width: 0.86cqw;
  height: 0.86cqw;
  margin-left: 0.35cqw;
  color: #aaa6a0;
}

.tt-org-budget-card__edit,
.tt-org-members-invite {
  display: flex;
  align-items: center;
  gap: 0.28cqw;
  margin-left: auto;
  color: var(--tt-accent);
  font-weight: 500;
}

.tt-org-budget-card__edit svg,
.tt-org-members-invite svg {
  width: 0.88cqw;
  height: 0.88cqw;
  margin: 0;
  color: currentColor;
}

.tt-org-budget-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 3.78cqw;
  margin: 0 1.05cqw;
  border-top: 1px solid rgba(42, 38, 33, 0.045);
}

.tt-org-budget-row:first-of-type {
  border-top: 0;
}

.tt-org-budget-row strong,
.tt-org-member-main strong,
.tt-org-member-usage strong {
  display: block;
  color: #3b3834;
  font-size: var(--tt-text-message);
  font-weight: 600;
  line-height: 1.42;
}

.tt-org-budget-row p,
.tt-org-member-main p,
.tt-org-member-usage span {
  margin: 0.12cqw 0 0;
  color: #aaa6a0;
  font-size: var(--tt-text-meta);
  line-height: 1.35;
}

.tt-org-budget-row__value {
  padding-left: 1cqw;
  color: #3b3834;
  font-size: var(--tt-text-message);
  font-weight: 600;
  white-space: nowrap;
}

.tt-org-members {
  margin-top: 1.02cqw;
}

.tt-org-members-heading {
  height: 1.85cqw;
  color: #403c38;
  font-size: var(--tt-text-message);
  font-weight: 600;
}

.tt-org-members-filters {
  gap: 0.58cqw;
  height: 2.5cqw;
}

.tt-org-member-search {
  display: flex;
  align-items: center;
  gap: 0.42cqw;
  height: 2.05cqw;
  min-width: 0;
  flex: 1;
  padding: 0 0.62cqw;
  border-radius: 0.48cqw;
  background: #f4f3f2;
  color: #aaa6a0;
  font-size: var(--tt-text-meta);
}

.tt-org-member-search svg {
  width: 0.92cqw;
  height: 0.92cqw;
}

.tt-org-member-filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.16cqw;
  color: #aaa6a0;
  font-size: var(--tt-text-meta);
  white-space: nowrap;
}

.tt-org-member-filter-tabs span {
  padding: 0.34cqw 0.55cqw;
  border-radius: 0.42cqw;
}

.tt-org-member-filter-tabs .is-active {
  background: #efeeec;
  color: #504c47;
  font-weight: 500;
}

.tt-org-member-list {
  display: grid;
}

.tt-org-member-row {
  min-height: 3.68cqw;
  padding: 0 0.58cqw;
  border-top: 1px solid rgba(42, 38, 33, 0.04);
}

.tt-org-member-action {
  display: grid;
  place-items: center;
  width: 1.42cqw;
  height: 1.42cqw;
  margin-right: 0.5cqw;
  color: var(--tt-accent);
}

.tt-org-member-action svg {
  width: 0.9cqw;
  height: 0.9cqw;
}

.tt-org-member-main {
  min-width: 0;
}

.tt-org-member-main strong {
  display: flex;
  align-items: center;
  gap: 0.4cqw;
}

.tt-org-role {
  padding: 0.1cqw 0.38cqw;
  border-radius: 999px;
  background: rgba(42, 38, 33, 0.045);
  color: #99948e;
  font-size: var(--tt-text-micro);
  font-weight: 500;
}

.tt-org-role.is-owner {
  background: rgba(221, 122, 32, 0.08);
  color: #b96b22;
}

.tt-org-member-usage {
  margin-left: auto;
  padding-left: 1cqw;
  text-align: right;
  white-space: nowrap;
}

.tt-org-member-usage strong {
  font-variant-numeric: tabular-nums;
}

/* ── 滚动进入后的组织设置节奏 ─────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .feat__media .tt-product-demo--organization .tt-org-settings-page-header,
  .feat__media .tt-product-demo--organization .tt-org-budget-card,
  .feat__media .tt-product-demo--organization .tt-org-members-heading,
  .feat__media .tt-product-demo--organization .tt-org-members-filters,
  .feat__media .tt-product-demo--organization .tt-org-member-row {
    opacity: 0;
    transform: translate3d(0, 0.32cqw, 0);
  }

  .feat__media .tt-product-demo--organization .tt-org-settings-nav__item.is-active {
    background: transparent;
    color: #5a5651;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-settings-page-header,
  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-budget-card,
  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-members-heading,
  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-members-filters,
  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-member-row {
    animation: tt-demo-step-in 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-settings-page-header {
    animation-delay: 120ms;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-budget-card {
    animation-delay: 260ms;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-members-heading {
    animation-delay: 520ms;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-members-filters {
    animation-delay: 640ms;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-member-row:nth-child(1) {
    animation-delay: 760ms;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-member-row:nth-child(2) {
    animation-delay: 850ms;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-member-row:nth-child(3) {
    animation-delay: 940ms;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-member-row:nth-child(4) {
    animation-delay: 1030ms;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-member-row:nth-child(5) {
    animation-delay: 1120ms;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-settings-nav__item.is-active {
    animation: tt-org-nav-focus 760ms ease-out 180ms both;
  }

  .feat__media.is-demo-active .tt-product-demo--organization .tt-org-member-usage strong {
    animation: tt-org-usage-focus 760ms ease-out 1180ms both;
  }
}

@keyframes tt-org-nav-focus {
  0% {
    background: transparent;
    color: #5a5651;
  }
  55% {
    background: rgba(221, 122, 32, 0.12);
    color: #34312e;
  }
  100% {
    background: #ebeae8;
    color: #34312e;
  }
}

@keyframes tt-org-usage-focus {
  0%, 38% { color: var(--tt-accent); }
  100% { color: #3b3834; }
}
