
.team-module-image {
  border-color: rgba(114, 167, 255, 0.26);
  background: rgba(114, 167, 255, 0.08);
  color: #b8d2ff;
}

.team-module-video {
  border-color: rgba(190, 143, 255, 0.25);
  background: rgba(190, 143, 255, 0.08);
  color: #d8bdff;
}

.team-role-owner,
.team-type-recharge,
.team-status-completed,
.team-status-success,
.team-status-refunded {
  border-color: rgba(56, 217, 144, 0.3);
  background: var(--team-green-soft);
  color: #aaf0cf;
}

.team-type-refund {
  border-color: rgba(56, 217, 144, 0.26);
  background: rgba(56, 217, 144, 0.08);
  color: #aaf0cf;
}

.team-type-consume {
  border-color: rgba(255, 114, 114, 0.22);
  background: rgba(255, 114, 114, 0.06);
  color: #f0a1a1;
}

.team-type-adjust {
  border-color: rgba(114, 167, 255, 0.24);
  background: rgba(114, 167, 255, 0.07);
  color: #b8d2ff;
}

.team-role-admin,
.team-status-processing,
.team-status-queued,
.team-status-pending {
  border-color: rgba(245, 196, 81, 0.3);
  background: rgba(245, 196, 81, 0.09);
  color: #f7d780;
}

.team-status-failed,
.team-status-cancelled {
  border-color: rgba(255, 114, 114, 0.3);
  background: rgba(255, 114, 114, 0.08);
  color: #ffaaaa;
}

.team-edit-row td {
  background: #0a0b0d;
}

.team-member-edit {
  display: grid;
  grid-template-columns: minmax(160px, 1.5fr) repeat(3, minmax(100px, 0.75fr)) auto;
  align-items: end;
  gap: 10px;
}

.team-member-edit label {
  display: grid;
  gap: 6px;
  color: var(--team-muted);
  font-size: 11px;
}

.team-more {
  display: flex;
  justify-content: center;
  min-height: 52px;
  padding-top: 14px;
}

.team-loading,
.team-error,
.team-empty-cell {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--team-muted);
  font-size: 13px;
  text-align: center;
}

.team-empty-cell strong,
.team-empty-cell span,
.team-error strong {
  display: block;
}

.team-empty-cell strong,
.team-error strong {
  color: #d7dadd;
  font-size: 13px;
  font-weight: 650;
}

.team-empty-cell span {
  margin-top: 7px;
  color: #737980;
  font-size: 11px;
}

.team-error {
  gap: 12px;
  color: #ffaaaa;
}

.team-skeleton {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--team-muted);
}

.team-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.045) 48%, transparent 100%);
  transform: translateX(-100%);
  animation: team-skeleton-sweep 1.4s ease-in-out infinite;
  pointer-events: none;
}

.team-skeleton-label {
  padding: 14px 16px;
  border-bottom: 1px solid var(--team-line);
  font-size: 11px;
}

.team-skeleton-bars {
  height: calc(100% - 44px);
  display: grid;
  grid-template-columns: repeat(18, minmax(4px, 1fr));
  align-items: end;
  gap: 8px;
  padding: 22px 18px 14px;
}

.team-skeleton-bars i,
.team-skeleton-row i {
  display: block;
  border-radius: 3px;
  background: #222529;
}

.team-skeleton-table {
  min-height: 220px;
}

.team-skeleton-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.7fr 1fr;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  border-bottom: 1px solid var(--team-line);
}

.team-skeleton-row i {
  height: 9px;
}

@keyframes team-panel-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes team-bar-enter {
  from { opacity: 0.35; transform: scaleY(0.12); }
  to { opacity: 1; transform: scaleY(1); }
}

@keyframes team-skeleton-sweep {
  to { transform: translateX(100%); }
}

@media (max-width: 1439px) {
  .team-shell {
    width: calc(100vw - 32px);
  }

  .team-collapse-btn {
    display: none;
  }

  .team-overview-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(340px, 1fr);
  }
}

@media (max-width: 1599px) and (min-width: 1101px) {
  .team-rank-quota-col {
    display: none;
  }
}

@media (max-width: 1100px) {
  .team-overview-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .team-overview-section {
    height: auto;
  }

  .team-chart,
  .team-ranking {
    height: 340px;
    flex: none;
  }

  .team-overview-section + .team-overview-section {
    padding: 22px 0 0;
    border-top: 1px solid var(--team-line);
    border-left: 0;
  }

  .team-member-edit {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .team-edit-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .team-shell {
    width: 100vw;
  }

  .team-header {
    min-height: 68px;
    padding: 10px 14px;
  }

  .team-scroll-area {
    height: calc(100dvh - 68px);
  }

  .team-empty,
  .team-dashboard {
    padding: 16px 14px 36px;
  }

  .team-title {
    font-size: 17px;
  }

  .team-subtitle {
    max-width: 46vw;
    font-size: 11px;
  }

  .team-header-actions {
    gap: 5px;
  }

  .team-header-actions .team-text-btn {
    display: none;
  }

  .team-header-actions .team-primary-btn {
    min-width: 0;
    padding: 0 9px;
    font-size: 11px;
  }

  .team-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .team-metric {
    min-height: 94px;
    padding: 13px;
  }

  .team-metric strong {
    font-size: 22px;
  }

  .team-quota-strip {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .team-quota-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .team-quota-item {
    padding-left: 8px;
  }

  .team-quota-item-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .team-quota-item-head b {
    max-width: 100%;
    font-size: 10px;
  }

  .team-owner-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .team-invite-inline,
  .team-member-edit {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .team-edit-actions {
    grid-column: auto;
    flex-wrap: wrap;
  }

  .team-tabs {
    gap: 16px;
    margin-top: 16px;
  }

  .team-tab {
    flex: 0 0 auto;
  }

  .team-chart {
    height: 250px;
    padding: 18px 8px 10px;
  }

  .team-chart-grid {
    gap: 2px;
  }

  .team-chart-value {
    display: none;
  }

  .team-chart-point span {
    font-size: 9px;
  }

  .team-col-secondary {
    display: none;
  }

  .team-ranking {
    height: auto;
    min-height: 290px;
  }

  .team-ranking-table {
    min-width: 0;
  }

  .team-rank-share-col,
  .team-rank-quota-col {
    display: none;
  }

  .team-rank-consume-col {
    width: 84px;
  }

  .team-ranking-table tbody tr {
    height: 58px;
  }

  .team-member-avatar {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .team-invite-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-tab-panel:not([hidden]),
  .team-chart-bar,
  .team-skeleton::after {
    animation: none;
  }

  .team-tab::after,
  .team-metric,
  .team-progress span,
  .team-data-table tbody tr .team-table-btn {
    transition: none;
  }
}
