.team-workspace {
  --team-tint: color-mix(in srgb, var(--accent) 7%, var(--surface));
  min-width: 0;
}
.team-heading-actions,
.team-tabs,
.team-week-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.team-demo-note,
.team-scope-note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 20px;
}
.team-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.team-kpis article {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.team-kpis article span {
  font-size: 13px;
  color: var(--muted);
}
.team-kpis article strong {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -1px;
}
.team-kpis small {
  font-size: 12px;
  color: var(--muted);
}
.team-kpis .team-kpi-alert {
  background: color-mix(in srgb, #dc744b 7%, var(--surface));
  border-color: color-mix(in srgb, #dc744b 35%, var(--line));
}
.team-kpi-alert strong,
.team-late {
  color: #b54135;
}
.team-tabs {
  margin-bottom: 20px;
}
.team-tabs svg {
  width: 16px;
  height: 16px;
}
.team-filters {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr auto auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  margin-bottom: 28px;
}
.team-filters label,
.team-editor label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.team-workspace input,
.team-workspace select,
.team-workspace textarea {
  min-width: 0;
  width: 100%;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--surface);
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  line-height: 1.5;
}
.team-filters .btn {
  height: 43px;
}
.team-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.team-section-head h2 {
  margin: 0 0 8px;
  font-size: 23px;
  letter-spacing: -0.5px;
}
.team-section-head p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.team-member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.team-member {
  padding: 24px;
}
.team-member-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.team-member-top h3 {
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 2px;
  overflow-wrap: anywhere;
}
.team-member-top div {
  min-width: 0;
}
.team-member-top span:not(.team-avatar) {
  font-size: 12px;
  color: var(--muted);
}
.team-avatar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--team-tint);
  color: var(--accent);
  font-weight: 600;
}
.team-member-email {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin: 18px 0;
}
.team-member-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
  margin: 18px 0 20px;
  padding-top: 18px;
}
.team-member-counts > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.team-member-counts strong {
  font-size: 22px;
}
.team-member-counts span {
  font-size: 11px;
  color: var(--muted);
}
.team-member .btn {
  width: 100%;
  justify-content: center;
}
.team-board {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  overflow-x: auto;
  padding: 2px 2px 16px;
  scrollbar-gutter: stable;
}
.team-column {
  flex: 1 0 245px;
  min-width: 0;
  max-width: 380px;
  padding: 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--muted) 5%, var(--surface));
  border: 1px solid var(--line);
}
.team-column > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13px;
}
.team-column > h3 > span {
  margin-left: auto;
  font-weight: 400;
  color: var(--muted);
}
.team-state-dot {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: #8fa1be;
}
.team-state-in_progress {
  background: #4d83dd;
}
.team-state-blocked {
  background: #ce813e;
}
.team-state-done {
  background: #489579;
}
.team-task {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 5px #102b4b04;
}
.team-task:last-child {
  margin: 0;
}
.team-task-late {
  border-left: 3px solid #cb6859;
}
.team-task h3 {
  font-size: 14px;
  margin: 12px 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.team-task-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.team-priority,
.team-managed {
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--team-tint);
  color: var(--muted);
}
.team-priority-high,
.team-priority-urgent {
  background: #fbeae5;
  color: #a8402c;
}
.team-task-description {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.team-task-project {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.team-task-project svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.team-task-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  margin: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.team-task .btn {
  width: 100%;
  font-size: 12px;
  justify-content: center;
}
.team-column-empty {
  font-size: 12px;
  line-height: 1.8;
  padding: 14px 0;
  color: var(--muted);
}
.team-pagination {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}
.team-week {
  padding: 26px;
  margin-bottom: 22px;
}
.team-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin: 30px 0;
}
.team-week-grid article {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.team-week-grid article > span {
  font-size: 12px;
  font-weight: 600;
}
.team-week-grid small {
  font-size: 10px;
  color: var(--muted);
}
.team-week-grid strong {
  font-size: 24px;
}
.team-day-bar {
  height: 120px;
  width: min(58px, 80%);
  border-radius: 10px;
  overflow: hidden;
  background: var(--team-tint);
  display: flex;
  align-items: flex-end;
}
.team-day-bar i {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, white), var(--accent));
  border-radius: 8px;
  min-height: 2px;
}
.team-workload-list > div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.team-workload-list > div > span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.team-avatar-small {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
  font-size: 11px;
}
.team-editor {
  max-width: 860px;
  margin: auto;
  padding: 30px;
}
.team-editor fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.team-editor label {
  font-size: 13px;
  margin-bottom: 18px;
}
.team-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.team-editor textarea {
  resize: vertical;
  min-height: 120px;
}
.team-editor-links,
.team-editor-recovery {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.team-muted {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.team-alert {
  border: 1px solid #e6b0a5;
  border-radius: 12px;
  padding: 16px;
  background: #fff4f0;
  color: #912c23;
  line-height: 1.6;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}
.team-notice {
  padding: 14px 18px;
  border: 1px solid #bcdac9;
  border-radius: 12px;
  background: #eff9f3;
  color: #276448;
  line-height: 1.6;
}
.team-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  grid-column: 1/-1;
}
.team-empty > svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}
.team-empty h3 {
  color: var(--ink);
  font-size: 18px;
}
.team-workspace button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.team-workspace .btn:disabled {
  opacity: 0.5;
  cursor: default;
}
@media (max-width: 1200px) {
  .team-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .team-member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .team-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .team-kpis article {
    padding: 17px;
  }
  .team-kpis article strong {
    font-size: 28px;
  }
  .team-filters {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
  }
  .team-filters label:first-child {
    grid-column: 1/-1;
  }
  .team-member-grid {
    grid-template-columns: 1fr;
  }
  .team-section-head {
    flex-direction: column;
    gap: 14px;
  }
  .team-member {
    padding: 20px;
  }
  .team-editor,
  .team-week {
    padding: 20px;
  }
  .team-form-grid {
    grid-template-columns: 1fr;
  }
  .team-week-grid {
    gap: 5px;
  }
  .team-week-grid small {
    font-size: 9px;
  }
  .team-week-grid strong {
    font-size: 21px;
  }
  .team-day-bar {
    height: 90px;
  }
  .team-workload-list > div {
    flex-wrap: wrap;
    gap: 10px;
  }
  .team-workload-list > div > span:last-child {
    margin-left: 44px;
    flex-basis: 100%;
  }
  .team-pagination {
    flex-wrap: wrap;
  }
  .team-heading-actions {
    margin-top: 12px;
  }
  .team-column {
    flex-basis: 260px;
  }
  .team-tabs .btn {
    font-size: 12px;
    padding: 10px;
  }
  .team-workspace .page-heading h1 {
    font-size: 28px;
  }
}

@media (max-width: 760px) {
  .team-workspace input,
  .team-workspace select,
  .team-workspace textarea {
    font-size: 16px;
  }
  .team-workspace button {
    min-height: 44px;
  }
}
