.team-section {
  min-height: calc(100vh - 74px);
  background: var(--surface);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.team-org-overview {
  display: grid;
  gap: 18px;
}

.team-card-director {
  max-width: 520px;
  width: 100%;
  min-height: 250px;
  justify-self: center;
}

.team-org-drop {
  position: relative;
  width: 2px;
  height: 42px;
  justify-self: center;
  background: linear-gradient(180deg, var(--teal), rgba(10, 168, 150, 0.08));
}

.team-org-drop::before,
.team-org-drop::after {
  position: absolute;
  top: 100%;
  width: 38vw;
  max-width: 430px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, rgba(10, 168, 150, 0.08), rgba(10, 168, 150, 0.46), rgba(56, 170, 184, 0.28));
}

.team-org-drop::before {
  right: 0;
}

.team-org-drop::after {
  left: 0;
}

.team-structure-head {
  width: min(100%, 760px);
  justify-self: center;
  text-align: center;
}

.team-structure-head h2 {
  margin: 8px 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.team-structure-head p {
  margin: 0;
  color: var(--muted);
}

.team-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.team-manager-column {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(10, 168, 150, 0.16);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(10, 168, 150, 0.08), rgba(52, 95, 116, 0.08)),
    rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 36px rgba(20, 33, 38, 0.08);
}

.team-manager-head {
  display: grid;
}

.team-report-branch {
  position: relative;
  width: 2px;
  height: 24px;
  justify-self: center;
  background: linear-gradient(180deg, var(--teal), rgba(10, 168, 150, 0.08));
}

.team-report-branch::after {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(260px, 64vw);
  height: 2px;
  content: "";
  background: linear-gradient(90deg, rgba(10, 168, 150, 0.08), rgba(56, 170, 184, 0.44), rgba(10, 168, 150, 0.08));
  transform: translateX(-50%);
}

.team-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-card-manager {
  min-height: 236px;
}

.team-card-specialist {
  min-height: 238px;
  padding: 18px;
}

.team-card-specialist .team-photo-wrap,
.team-card-specialist .team-photo {
  width: 100px;
  height: 100px;
}

.team-card-specialist .team-mark {
  width: 40px;
  height: 40px;
  font-size: 0.72rem;
}

.team-report-empty,
.member-org-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  border: 1px dashed rgba(10, 168, 150, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
  font-weight: 700;
}

.team-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--team-color), #111819);
  border-radius: var(--radius);
  box-shadow: 0 16px 34px rgba(20, 33, 38, 0.14);
}

.team-card {
  color: #ffffff;
}

.team-card::after {
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}

.team-photo-wrap {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
}

.team-photo {
  width: 132px;
  height: 132px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.92);
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
}

.team-mark {
  position: absolute;
  right: -4px;
  bottom: 2px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--team-color);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  font-size: 0.86rem;
  font-weight: 900;
}

.team-card-copy {
  position: relative;
  z-index: 1;
}

.team-department {
  display: inline-flex;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.team-card h3 {
  margin: 0 0 10px;
  font-size: 1.28rem;
  line-height: 1.22;
}

.team-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.team-card.team-card-manager {
  min-height: 236px;
}

.team-card.team-card-specialist {
  min-height: 238px;
  padding: 18px;
}

.team-card-action {
  display: inline-flex;
  margin-top: 14px;
  font-size: 0.86rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
}

.team-unit-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: center;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(10, 168, 150, 0.09), rgba(52, 95, 116, 0.09)),
    var(--surface);
  box-shadow: var(--shadow);
}

.team-unit-panel h2 {
  margin: 8px 0 8px;
  font-size: 1.45rem;
}

.team-unit-panel p {
  margin: 0;
  color: var(--muted);
}

.team-unit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.team-unit-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.team-unit-link:hover,
.team-unit-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.team-unit-link span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #ffffff;
  border-radius: 18px;
  background: var(--team-color);
  font-size: 0.78rem;
  font-weight: 900;
}

.team-unit-link strong {
  line-height: 1.22;
}

@media (max-width: 1020px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-management-grid {
    grid-template-columns: 1fr;
  }

  .team-unit-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-org-drop {
    display: none;
  }

  .team-management-grid,
  .team-report-grid {
    grid-template-columns: 1fr;
  }

  .team-manager-column {
    padding: 10px;
    border-radius: var(--radius);
  }

  .team-report-branch,
  .team-report-branch::after {
    display: none;
  }

  .team-unit-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    min-height: 210px;
    padding: 16px;
  }

  .team-card-manager,
  .team-card-specialist {
    min-height: 210px;
  }

  .team-photo-wrap,
  .team-photo {
    width: 108px;
    height: 108px;
  }

  .team-mark {
    width: 40px;
    height: 40px;
    font-size: 0.74rem;
  }

  .team-card h3 {
    font-size: 1.06rem;
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  .team-card p {
    font-size: 0.9rem;
  }
}

.team-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 245, 238, 0.66)),
    var(--surface);
}

.team-card {
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.team-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(125deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  pointer-events: none;
  transform: translateX(-130%);
  transition: transform 520ms ease;
}

.team-card:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-7px);
}

.team-card:hover::before {
  transform: translateX(130%);
}

.team-card:hover .team-photo {
  transform: scale(1.04);
}

.team-photo {
  transition: transform 220ms ease;
}

.team-member-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 245, 238, 0.7)),
    var(--surface);
}

.team-member-grid {
  display: grid;
  grid-template-columns: minmax(290px, 0.95fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: start;
}

.member-profile-card {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--team-color), #121a20);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.member-back {
  display: inline-flex;
  width: fit-content;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  font-weight: 700;
}

.member-photo-wrap {
  position: relative;
  width: 146px;
  height: 146px;
}

.member-photo {
  width: 146px;
  height: 146px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.92);
}

.member-accent {
  position: absolute;
  right: -6px;
  bottom: 4px;
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.86);
  background: var(--team-color);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 900;
}

.member-name {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.member-role {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.member-meta {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.member-meta strong {
  color: rgba(255, 255, 255, 0.96);
}

.member-social-block h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.member-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-social-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  font-weight: 700;
}

.member-content {
  display: grid;
  gap: 14px;
}

.member-info-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 28px rgba(16, 20, 23, 0.08);
}

.member-info-card h2 {
  margin: 0 0 14px;
  font-size: 1.24rem;
}

.member-work-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.member-work-list li {
  color: var(--ink-soft);
}

.member-cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.member-cert-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.member-cert-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.member-cert-card figcaption {
  padding: 10px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.member-org-card {
  overflow: hidden;
}

.member-org-head h2 {
  margin: 6px 0 0;
}

.member-org-chart {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.member-org-director,
.member-org-node {
  position: relative;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  border-radius: var(--radius);
}

.member-org-director {
  min-width: 220px;
  padding: 16px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--team-color), #142126);
  box-shadow: var(--shadow);
}

.member-org-director span,
.member-org-node span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 18px;
  color: #ffffff;
  background: var(--team-color);
  font-size: 0.78rem;
  font-weight: 900;
}

.member-org-line {
  width: 2px;
  height: 34px;
  background: linear-gradient(180deg, var(--teal), rgba(10, 168, 150, 0.08));
}

.member-org-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.member-org-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.member-org-group {
  display: grid;
  gap: 10px;
}

.member-org-manager {
  color: #ffffff;
  background: linear-gradient(135deg, var(--team-color), #142126);
  border-color: rgba(255, 255, 255, 0.16);
}

.member-org-manager small {
  color: rgba(255, 255, 255, 0.72);
}

.member-org-child-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.member-org-node {
  min-height: 138px;
  padding: 14px 10px;
  color: var(--ink);
  background: var(--surface-warm);
  border: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.member-org-node:hover,
.member-org-node:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.member-org-node strong {
  line-height: 1.22;
}

.member-org-node small {
  color: var(--muted);
  font-weight: 800;
}

.member-org-node.member-org-manager {
  color: #ffffff;
  background: linear-gradient(135deg, var(--team-color), #142126);
  border-color: rgba(255, 255, 255, 0.16);
}

.member-org-node.member-org-manager small {
  color: rgba(255, 255, 255, 0.72);
}

.member-it-card {
  background:
    linear-gradient(135deg, rgba(52, 95, 116, 0.09), rgba(10, 168, 150, 0.08)),
    var(--surface);
}

.member-it-card h2 {
  margin: 6px 0 0;
}

.member-it-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.member-it-flow span {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 92px;
  align-content: center;
  padding: 12px;
  color: var(--ink);
  border: 1px solid rgba(10, 168, 150, 0.2);
  border-radius: var(--radius);
  background: rgba(10, 168, 150, 0.07);
  font-weight: 800;
}

.member-it-flow strong {
  color: var(--teal-dark);
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .team-member-grid {
    grid-template-columns: 1fr;
  }

  .member-profile-card {
    position: static;
  }
}

@media (max-width: 620px) {
  .member-cert-grid {
    grid-template-columns: 1fr;
  }

  .member-org-grid,
  .member-org-groups,
  .member-org-child-grid,
  .member-it-flow {
    grid-template-columns: 1fr;
  }

  .member-profile-card {
    padding: 16px;
  }

  .member-photo-wrap,
  .member-photo {
    width: 120px;
    height: 120px;
  }

  .member-accent {
    width: 44px;
    height: 44px;
    font-size: 0.74rem;
  }

  .member-name {
    font-size: 1.28rem;
    overflow-wrap: anywhere;
  }

  .member-info-card {
    padding: 16px;
  }
}

body.ui-theme-dark .team-section,
body.ui-theme-dark .team-member-section {
  background:
    linear-gradient(180deg, rgba(18, 30, 36, 0.96), rgba(16, 26, 33, 0.78)),
    var(--surface);
}

body.ui-theme-dark .team-manager-column {
  background:
    linear-gradient(145deg, rgba(82, 205, 191, 0.1), rgba(120, 164, 182, 0.08)),
    rgba(18, 30, 36, 0.82);
}

body.ui-theme-dark .team-report-empty,
body.ui-theme-dark .member-org-empty {
  background: rgba(255, 255, 255, 0.05);
}
