/* ============================================================
   КОМАНДА ЦЕНТРА v449: «Моя активность», рейтинг с тройкой лидеров,
   лучшие по порталу, сотрудники отдельной вкладкой. Переменные --tc-*
   берут цвета портала; компоненты общие с мини-приложением.
   ============================================================ */
.team-page { max-width: 1280px; }
.tc-page {
  --tc-text: var(--text); --tc-muted: var(--text-soft, var(--muted)); --tc-faint: var(--muted); --tc-line: var(--line);
  --tc-card: var(--surface-card); --tc-soft: var(--surface-hover, #f1f4f8); --tc-brand: var(--tk-accent, var(--brand));
  --tc-brand-soft: var(--surface-selected, #f7e9ee); --tc-shadow: var(--shadow); --tc-ok: var(--state-ok, #0f7a5f); --tc-ok-soft: var(--state-ok-bg, #e4f6ef);
  --tc-gold: #d29a1c; --tc-gold-soft: #fdf1d6; --tc-gold-line: #f0d9a4; --tc-silver: #eef1f6; --tc-bronze: #f6ece4;
  --tc-info: #3871b9; --tc-info-soft: #eaf1ff; --tc-warn: #a2730d; --tc-warn-soft: #fff5dc;
}
[data-theme=dark] .tc-page {
  --tc-gold-soft: rgba(227, 163, 32, .18); --tc-gold-line: rgba(227, 163, 32, .35); --tc-silver: rgba(183, 192, 205, .14);
  --tc-bronze: rgba(193, 122, 74, .16); --tc-info: #8db4f5; --tc-info-soft: rgba(64, 127, 229, .18); --tc-warn: #f0c46a; --tc-warn-soft: rgba(231, 171, 43, .16);
}
/* ---- Команда центра v449: общие компоненты (сайт и MAX) ---- */
.tc-page { display: grid; gap: 16px; min-width: 0; color: var(--tc-text); }
.tc-page * { box-sizing: border-box; }
.tc-icon { width: 18px; height: 18px; flex: none; }
.tc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.tc-head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.tc-head p { margin: 4px 0 0; color: var(--tc-muted); font-size: 13.5px; }
.tc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.tc-tabs, .tc-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--tc-soft); }
.tc-tabs .tc-btn, .tc-seg .tc-btn { min-height: 34px; padding: 0 14px; border-radius: 9px; color: var(--tc-muted); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.tc-tabs .tc-btn span { margin-left: 2px; color: var(--tc-faint); font-weight: 700; }
.tc-tabs .is-on, .tc-seg .is-on { background: var(--tc-card); color: var(--tc-brand); box-shadow: 0 1px 3px rgba(20, 30, 50, .12); }
.tc-seg .tc-btn { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.tc-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.tc-select { display: inline-flex; align-items: center; gap: 8px; color: var(--tc-muted); font-size: 13px; font-weight: 700; }
.tc-select select, .tc-search input {
  height: 38px; padding: 0 12px; border: 1px solid var(--tc-line); border-radius: 10px; background: var(--tc-card); color: var(--tc-text); font: inherit; font-size: 14px; max-width: 100%;
}
.tc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 16px; align-items: start; }
.tc-grid > div, .tc-grid > aside { display: grid; gap: 16px; min-width: 0; }
.tc-card { padding: 16px 18px; border: 1px solid var(--tc-line); border-radius: 16px; background: var(--tc-card); box-shadow: var(--tc-shadow); min-width: 0; }
.tc-card h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 800; }
.tc-card h3 span { color: var(--tc-muted); font-size: 13px; font-weight: 600; }
.tc-card h3 .tc-icon { color: var(--tc-gold); }
.tc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.tc-card-head small { color: var(--tc-faint); font-size: 12px; }
.tc-empty { margin: 8px 0; color: var(--tc-muted); font-size: 14px; line-height: 1.5; text-align: center; }
.tc-note, .tc-idle { margin: 10px 0 0; color: var(--tc-faint); font-size: 12.5px; }
.tc-sub { margin: 4px 0 8px; color: var(--tc-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tc-ghost { width: 100%; min-height: 40px; border: 1px solid var(--tc-line) !important; border-radius: 12px; background: var(--tc-card) !important; color: var(--tc-brand); font-weight: 700; font-size: 13.5px; }
.tc-back { justify-self: start; color: var(--tc-brand); font-weight: 700; font-size: 14px; }

/* Аватар */
.tc-avatar { position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--tc-soft); color: var(--tc-muted); font-size: 12px; font-weight: 800; }
.tc-avatar.md { width: 52px; height: 52px; font-size: 16px; }
.tc-avatar.lg { width: 60px; height: 60px; font-size: 19px; }
.tc-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #97a2b3; flex: none; }
.tc-avatar .tc-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border: 2px solid var(--tc-card); }
.tc-dot.work { background: #0bb487; } .tc-dot.other { background: #407fe5; } .tc-dot.training { background: #9f77da; }
.tc-dot.leave { background: #e7ab2b; } .tc-dot.sick { background: #ef769c; } .tc-dot.business { background: #5da6c0; }
.tc-name { display: block; padding: 0; border: 0; background: none; color: var(--tc-text); font: inherit; font-size: 14px; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.tc-name-btn { cursor: pointer; }
.tc-name-btn:hover { color: var(--tc-brand); }
.tc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tc-chip { padding: 2px 8px; border-radius: 8px; background: var(--tc-brand-soft); color: var(--tc-brand); font-size: 11.5px; font-weight: 700; }

/* Моя активность */
.tc-me { display: grid; gap: 14px; background: linear-gradient(135deg, var(--tc-brand-soft), var(--tc-card) 70%); }
.tc-me.is-team { display: flex; align-items: center; gap: 14px; }
.tc-me-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--tc-card); color: var(--tc-brand); }
.tc-me-top { display: flex; align-items: center; gap: 14px; }
.tc-me-main { min-width: 0; }
.tc-me-main small { display: block; color: var(--tc-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tc-me-main strong { display: block; margin: 2px 0; color: var(--tc-brand); font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.tc-me-main p { margin: 0; color: var(--tc-text); font-size: 13.5px; }
.tc-me-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-me-stats span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--tc-card); color: var(--tc-muted); font-size: 13px; box-shadow: inset 0 0 0 1px var(--tc-line); }
.tc-me-stats b { color: var(--tc-text); }
.tc-me-stats .tc-icon { width: 16px; height: 16px; color: var(--tc-gold); }
.tc-me-stats .is-hot .tc-icon { color: #e0592a; }
.tc-hints h4 { margin: 0 0 6px; color: var(--tc-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tc-hints ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tc-hints li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--tc-line); font-size: 13.5px; }
.tc-hints li:first-child { border-top: 0; }
.tc-hints li > i { width: 12px; height: 12px; margin: 3px; border: 2px solid var(--tc-line); border-radius: 50%; }
.tc-hints li b { color: var(--tc-ok); font-size: 12.5px; white-space: nowrap; }
.tc-hints li.is-done { color: var(--tc-faint); }
.tc-hints li.is-done .tc-icon { width: 18px; height: 18px; color: var(--tc-ok); }
.tc-hints li.is-done b { color: var(--tc-faint); }

/* Тройка лидеров */
.tc-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; margin: 4px 0 6px; }
.tc-podium.is-1 { grid-template-columns: minmax(0, 1fr); max-width: 220px; margin-inline: auto; }
.tc-podium.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; margin-inline: auto; }
.tc-step { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px; border-radius: 14px; background: var(--tc-soft); text-align: center; min-width: 0; }
.tc-step.place-1 { padding-top: 22px; background: linear-gradient(180deg, var(--tc-gold-soft), var(--tc-soft)); }
.tc-step.place-2 { background: linear-gradient(180deg, var(--tc-silver), var(--tc-soft)); }
.tc-step.place-3 { background: linear-gradient(180deg, var(--tc-bronze), var(--tc-soft)); }
.tc-step.is-me { box-shadow: inset 0 0 0 2px var(--tc-brand); }
.tc-step .tc-name { text-align: center; font-size: 13.5px; line-height: 1.25; }
.tc-step b { color: var(--tc-brand); font-size: 14px; }
.tc-step small { color: var(--tc-faint); font-size: 11.5px; }
.tc-medal { display: grid; place-items: center; width: 24px; height: 24px; margin-top: -16px; border: 2px solid var(--tc-card); border-radius: 50%; background: #b7c0cd; color: #fff; font-size: 12px; font-weight: 800; z-index: 1; }
.place-1 .tc-medal { background: #e3a320; }
.place-3 .tc-medal { background: #c17a4a; }
.tc-rows { display: grid; margin-top: 6px; }
.tc-row { display: grid; grid-template-columns: 24px 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--tc-line); }
.tc-rows .tc-row:first-child { border-top: 0; }
.tc-row.is-me { border-radius: 10px; background: var(--tc-brand-soft); }
.tc-place { color: var(--tc-muted); font-size: 13px; font-weight: 800; text-align: center; }
.tc-row-main { display: grid; min-width: 0; }
.tc-row-main small { overflow: hidden; color: var(--tc-faint); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tc-pts { color: var(--tc-text); font-size: 13.5px; white-space: nowrap; }
.tc-results { border-color: var(--tc-gold-line); }

/* Сотрудники */
.tc-today { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-start; }
.tc-today small { display: block; color: var(--tc-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tc-today strong { display: block; margin: 2px 0 6px; font-size: 22px; font-weight: 800; }
.tc-counts { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--tc-muted); font-size: 12.5px; }
.tc-counts span { display: inline-flex; align-items: center; gap: 5px; }
.tc-bdays { display: grid; gap: 6px; }
.tc-bday { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.tc-bday .tc-icon { width: 15px; height: 15px; color: var(--tc-brand); }
.tc-bday.is-soon { color: var(--tc-brand); font-weight: 700; }
.tc-tools { display: flex; }
.tc-search { position: relative; flex: 1; display: flex; }
.tc-search .tc-icon { position: absolute; top: 10px; left: 11px; width: 17px; height: 17px; color: var(--tc-faint); }
.tc-search input { width: 100%; padding-left: 36px; }
.tc-staff-list { padding-top: 6px; }
.tc-group { display: flex; align-items: center; gap: 6px; margin: 12px 0 2px; color: var(--tc-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tc-group:first-child { margin-top: 4px; }
.tc-group span { color: var(--tc-faint); }
.tc-staff { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--tc-line); }
.tc-staff:last-child { border-bottom: 0; }
.tc-staff.is-bday { margin: 0 -8px; padding: 10px 8px; border-radius: 12px; background: var(--tc-brand-soft); }
.tc-staff-side { display: grid; justify-items: end; gap: 3px; text-align: right; }
.tc-staff-side small { display: inline-flex; align-items: center; gap: 4px; color: var(--tc-muted); font-size: 12px; }
.tc-staff-side small .tc-icon { width: 13px; height: 13px; }
.tc-work { padding: 3px 8px; border-radius: 8px; background: var(--tc-soft); color: var(--tc-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.tc-work.work { background: var(--tc-ok-soft); color: var(--tc-ok); }
.tc-work.other { background: var(--tc-info-soft); color: var(--tc-info); }
.tc-work.leave { background: var(--tc-warn-soft); color: var(--tc-warn); }
.tc-work.sick { background: var(--tc-brand-soft); color: var(--tc-brand); }

/* Профиль и правила */
.tc-profile-head { display: flex; align-items: center; gap: 16px; }
.tc-profile-head h2 { margin: 0; font-size: 22px; }
.tc-profile-head p { margin: 2px 0 0; color: var(--tc-muted); font-size: 13.5px; }
.tc-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tc-totals small { display: block; color: var(--tc-muted); font-size: 12px; }
.tc-totals strong { font-size: 19px; }
.tc-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--tc-line); font-size: 14px; }
.tc-card h3 + .tc-line, .tc-card-head + .tc-line, .tc-rules h2 + p + .tc-line { border-top: 0; }
.tc-line small { display: block; color: var(--tc-faint); font-size: 12px; }
.tc-line b { flex: none; }
.tc-line.is-off { color: var(--tc-faint); }
.tc-ach { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 14px; }
.tc-ach .tc-icon { color: var(--tc-gold); }
.tc-rules { max-width: 760px; }
.tc-rules h2 { margin: 0 0 8px; font-size: 22px; }
.tc-rules p { color: var(--tc-text); font-size: 14px; line-height: 1.6; }
.tc-loading { display: grid; gap: 12px; }
.tc-loading p { color: var(--tc-muted); }
.tc-loading div { height: 110px; border-radius: 16px; background: var(--tc-soft); animation: tc-pulse 1.4s infinite alternate; }
@keyframes tc-pulse { to { opacity: .5; } }

@media (max-width: 900px) {
  .tc-grid { grid-template-columns: minmax(0, 1fr); }
  .tc-grid > aside { order: -1; }
}
@media (max-width: 600px) {
  .tc-page { gap: 12px; }
  .tc-head h1 { font-size: 23px; }
  .tc-tabs { display: flex; width: 100%; }
  .tc-tabs .tc-btn { flex: 1; }
  .tc-card { padding: 14px; }
  .tc-card-head .tc-seg { width: 100%; }
  .tc-card-head .tc-seg .tc-btn { flex: 1; }
  .tc-me-main strong { font-size: 24px; }
  .tc-hints li { grid-template-columns: 18px minmax(0, 1fr); }
  .tc-hints li b { grid-column: 2; }
  .tc-podium { gap: 6px; }
  .tc-step { padding: 12px 4px 10px; }
  .tc-step .tc-name { font-size: 12.5px; }
  .tc-staff { grid-template-columns: 36px minmax(0, 1fr); }
  .tc-staff-side { grid-column: 2; justify-items: start; text-align: left; }
  .tc-totals { grid-template-columns: 1fr 1fr; }
  .tc-filters, .tc-select { width: 100%; }
  .tc-select select { flex: 1; }
}

/* Прочее из прежнего слоя (метка beta в меню). */
.feature-beta{display:inline-flex;vertical-align:middle;align-items:center;margin-left:7px;padding:2px 6px;border:1px solid #b76d8b55;border-radius:6px;background:#a8194b15;color:#a8194b;font-size:10px;font-weight:700;line-height:1.4;text-transform:lowercase;white-space:nowrap}.sidebar .feature-beta,[data-theme=dark] .feature-beta{color:#f291b7;background:#a8194b25}.tc-beta-notice{padding:32px!important}.tc-beta-notice h1{font-size:24px}.tc-beta-notice p{line-height:1.6}
