.team-page, .profile-page { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
.team-head { display: flex; align-items: flex-start; gap: 12px; }
.team-head .grow h1 { margin: 0; }
.stat-row { display: flex; gap: 10px; }
.stat-card {
  flex: 1; background: #151c2a; border: 1px solid #2a3548; border-radius: 14px;
  padding: 12px 14px; display: flex; gap: 10px; min-height: 78px; min-width: 148px;
}
.stat-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.stat-ico .tico { width: 20px; height: 20px; }
.stat-cap { color: #8b9bb4; font-size: 12px; }
.stat-val { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat-extra { color: #8b9bb4; font-size: 12px; }
.role-chip {
  display: inline-flex; align-items: center; border-radius: 8px; padding: 4px 12px;
  font-size: 12px; font-weight: 700;
}
.filter-bar {
  background: #151c2a; border: 1px solid #2a3548; border-radius: 14px;
  padding: 10px 12px; display: flex; gap: 8px; align-items: center;
}
.filter-bar input, .filter-bar select, .param-select {
  background: #151c2a; border: 1px solid #2a3548; border-radius: 10px; padding: 8px 12px; color: #e8eef7;
}
.filter-bar input { flex: 2; min-width: 160px; }
.team-table { width: 100%; border-collapse: collapse; }
.team-table th { color: #8b9bb4; font-size: 12px; font-weight: 700; padding: 8px 6px; border-bottom: 1px solid #2a3548; text-align: left; }
.team-table td { padding: 10px 6px; border-bottom: 1px solid #243044; vertical-align: middle; }
.team-table tr { cursor: pointer; }
.team-table tr:hover { background: #1a2744; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell .av {
  width: 40px; height: 40px; border-radius: 20px; background: #344969; display: flex;
  align-items: center; justify-content: center; font-weight: 700; overflow: hidden; flex: 0 0 40px;
}
.person-cell .av img { width: 40px; height: 40px; object-fit: cover; }
.load-bar { height: 8px; background: #2a3548; border-radius: 4px; overflow: hidden; min-width: 80px; }
.load-bar > i { display: block; height: 100%; }

.profile-page { overflow: auto; }
.ident-card, .full-card {
  background: #151c2a; border: 1px solid #2a3548; border-radius: 14px; padding: 12px 14px;
}
.ident-card { display: flex; gap: 12px; align-items: flex-start; min-height: 104px; }
.ident-av {
  width: 80px; height: 80px; border-radius: 40px; background: #2563eb; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 800; cursor: pointer; flex: 0 0 80px; color: #fff;
}
.ident-names { display: flex; gap: 28px; align-items: center; }
.ident-names > div { display: flex; align-items: center; gap: 6px; }
.ident-main { flex: 3; min-width: 0; }
.ident-contacts { flex: 2; }
.ident-av img { width: 80px; height: 80px; object-fit: cover; }
.ident-main { flex: 3; min-width: 0; }
.ident-contacts { flex: 2; display: flex; flex-direction: column; gap: 8px; }
.ident-name { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.pencil { background: transparent; border: none; padding: 2px; width: 22px; height: 22px; color: #8b9bb4; }
.pencil .tico { width: 14px; height: 14px; background: #8b9bb4; }
.profile-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-tabs button {
  background: #132136; border: 1px solid #2b3f59; border-radius: 8px; color: #9fb4cf;
  padding: 6px 9px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; min-height: 34px;
}
.profile-tabs button.active { background: #23456b; border-color: #548bdb; color: #fff; }
.ov-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; }
.ov-left, .ov-right { display: flex; flex-direction: column; gap: 10px; }
.task-head, .task-line { display: grid; grid-template-columns: 3fr 1fr 2fr 2fr 1fr 2fr; gap: 8px; align-items: center; }
.task-head { color: #8b9bb4; font-size: 12px; font-weight: 700; padding: 0 4px 4px; }
.task-line { min-height: 56px; padding: 4px; }
.task-title { display: flex; gap: 8px; align-items: flex-start; }
.mini-cover {
  width: 36px; height: 48px; border-radius: 4px; background: #1d4d3c; display: flex;
  align-items: center; justify-content: center; font-weight: 800; flex: 0 0 36px;
}
.dead-row { display: flex; gap: 10px; padding: 4px 0; }
.param-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.param-row .k { color: #8b9bb4; font-size: 12px; flex: 1; }
.param-row .v { font-size: 13px; font-weight: 600; text-align: right; flex: 1; }
.row-sep { height: 1px; background: #243044; }
.title-mini { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.title-mini .c { width: 28px; height: 38px; border-radius: 4px; flex: 0 0 28px; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.month-chart { height: 140px; display: flex; align-items: flex-end; gap: 8px; padding: 8px 0; }
.month-chart .col { flex: 1; display: flex; gap: 2px; align-items: flex-end; height: 100%; justify-content: center; }
.month-chart .col b { display: block; width: 10px; border-radius: 3px 3px 0 0; min-height: 2px; }
.chart-labs { display: flex; padding: 0 8px; }
.chart-labs span { flex: 1; text-align: center; color: #8b9bb4; font-size: 12px; }
.personal-task { background: #121c2b; border: 1px solid #29364a; border-radius: 7px; padding: 10px 12px; display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.personal-group { background: #101927; border: 1px solid #29364a; border-radius: 9px; padding: 12px; margin-bottom: 12px; }
.pay-status { font-weight: 700; }
@media (max-width: 1100px) {
  .ov-grid, .stat-row { grid-template-columns: 1fr; flex-wrap: wrap; }
  .ov-grid { display: flex; flex-direction: column; }
}

/* Codex: preserve profile sections inside the scrolling column. */
.profile-page > * { flex-shrink: 0; }
.ident-card { min-height: 140px; }
.ident-name, .stat-val { font-weight: 700; }
.ov-grid { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.ov-left, .ov-right { min-width: 0; }
.task-head, .task-line { grid-template-columns: minmax(140px, 2.5fr) 48px minmax(76px, 1fr) minmax(80px, 1fr) 100px minmax(84px, 1fr); }
.task-head > *, .task-line > * { min-width: 0; }
@media (max-width: 1100px) { .ov-grid { grid-template-columns: 1fr; } }
