@import './team-space-tokens';

:host {
  display: block;
  font-family: $ts-font;
  background: $ts-surface-muted;
  min-height: 100%;
}

.ts-page {
  padding: 28px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.ts-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;

  h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: $ts-ink;
  }
}

.ts-page-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: $ts-ink-muted;
}

.ts-loading,
.ts-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 64px 20px;
  color: $ts-ink-muted;
  text-align: center;

  mat-icon {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: $ts-border;
  }
}

.ts-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.ts-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  background: $ts-surface;
  border: 1px solid $ts-border;
  border-radius: $ts-radius;
  padding: 18px;
  cursor: pointer;
  font-family: $ts-font;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease;

  &:hover {
    border-color: $ts-accent;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.12);
    transform: translateY(-1px);
  }
}

.ts-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ts-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: $ts-accent-light;
  color: $ts-accent-dark;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.ts-status-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
  background: $ts-status-active-bg;
  color: $ts-status-active;

  &.archived {
    background: $ts-status-archived-bg;
    color: $ts-status-archived;
  }
}

.ts-card-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: $ts-ink;
}

.ts-card-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: $ts-ink-muted;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.ts-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid $ts-border;
}

.ts-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: $ts-ink-muted;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  mat-icon {
    font-size: 15px;
    width: 15px;
    height: 15px;
  }
}

.btn {
  font-family: $ts-font;
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
}

.btn-primary {
  background: $ts-accent;
  color: white;

  &:hover {
    background: $ts-accent-dark;
  }
}
