/* ===== Страница команды (#/team) — «центр управления» ===== */
.tm-root{position:relative;display:flex;flex-direction:column;gap:20px;min-width:0}
.tm .lbl{font-size:11px;letter-spacing:.16em}
.tm h1,.tm h2{margin:0}
.tm-ph{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.tm-ph-s{font-size:12px}
.tm-ph-a{margin-left:auto;font-size:13px;color:var(--lilac);text-decoration:none;opacity:.85}
.tm-ph-a:hover{opacity:1;text-decoration:underline}
.tm-note{font-size:12.5px;line-height:1.5;display:block}
.tm-none{display:flex;align-items:center;gap:12px;padding:18px 4px;font-size:13.5px}
.tm-none svg{flex:0 0 auto;opacity:.6}
.tm-warn{color:var(--err);font-size:13px}
.tm-row{display:flex;gap:8px;min-width:0}
.tm-row .inp{flex:1 1 auto;min-width:0}
.tm-err{display:flex;flex-direction:column;align-items:center;gap:10px;padding:40px 20px;text-align:center;color:var(--muted)}

/* ---------- шапка ---------- */
.tm-hero{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px 28px;padding:24px 26px;
  background:radial-gradient(600px 220px at 0% 0%,rgba(106,61,255,.20),transparent 70%),radial-gradient(500px 200px at 100% 0%,rgba(201,184,255,.07),transparent 70%),var(--glass)}
.tm-id{display:flex;align-items:center;gap:16px;min-width:0}
.tm-logo{flex:0 0 60px;width:60px;height:60px;border-radius:18px;display:flex;align-items:center;justify-content:center;font:800 26px 'Inter Tight',Onest,sans-serif;color:#fff;
  background:linear-gradient(140deg,#8C6BFF,#5B2BFF 55%,#3A1AB0);box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 14px 30px -12px rgba(91,43,255,.9)}
.tm-id-t{display:flex;flex-direction:column;gap:8px;min-width:0}
.tm-name-w{min-width:0}
.tm-name{font:700 28px/1.15 'Inter Tight',Onest,sans-serif;letter-spacing:-.025em;color:var(--text);margin:0;background:none;border:0;padding:0;text-align:left;
  display:inline-flex;align-items:center;gap:10px;max-width:100%;cursor:default}
.tm-name span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
h1.tm-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
button.tm-name{cursor:pointer;border-radius:10px}
button.tm-name svg{color:var(--dim);flex:0 0 auto;opacity:.55;transition:opacity .2s,color .2s}
button.tm-name:hover svg{opacity:1;color:var(--lilac)}
button.tm-name:focus-visible{outline:2px solid rgba(201,184,255,.6);outline-offset:3px}
.tm-rename{display:flex;gap:8px;flex-wrap:wrap;max-width:560px}
.tm-rename .inp{flex:1 1 220px;min-width:0;font-size:16px}
.tm-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;font-size:13px}
.tm-role{padding:4px 10px;border-radius:999px;font-weight:600;font-size:12.5px;background:rgba(106,61,255,.18);border:1px solid rgba(201,184,255,.25);color:#fff}
.tm-role.r-owner{background:linear-gradient(135deg,rgba(124,92,255,.38),rgba(255,79,216,.14));border-color:rgba(201,184,255,.4)}
.tm-on{display:inline-flex;align-items:center;gap:6px;color:#9BF0C4}
.tm-on i{width:7px;height:7px;border-radius:50%;background:#3EE08F;box-shadow:0 0 0 3px rgba(62,224,143,.16)}
.tm-bal{display:flex;flex-direction:column;align-items:flex-end;gap:6px;text-align:right;min-width:220px}
.tm-bal-v{display:flex;align-items:baseline;gap:6px}
.tm-bal-v b{font:700 40px/1 'Inter Tight',Onest,sans-serif;letter-spacing:-.03em;color:#fff}
.tm-bal-v span{font-size:22px;color:var(--lilac)}
.tm-fc{font-size:12.5px;max-width:300px}
.tm-fc b{color:var(--text);font-weight:600}
.tm-top{margin-top:4px}
.tm-sub{grid-column:1/-1;display:flex;align-items:center;gap:14px;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.06)}
.tm-sub.on{background:rgba(62,224,143,.05);border-color:rgba(62,224,143,.18)}
.tm-sub-ic{flex:0 0 36px;width:36px;height:36px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:rgba(106,61,255,.16);color:var(--lilac)}
.tm-sub.on .tm-sub-ic{background:rgba(62,224,143,.14);color:#7EEBB5}
.tm-sub-t{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-width:0;font-size:13px}
.tm-sub-t b{font-weight:600;font-size:14px}
.tm-sub-n{font-size:12.5px}
.tm-sub .btn{flex:0 0 auto;white-space:nowrap}

/* ---------- плитки ---------- */
.tm-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.tm-kpis-me{grid-template-columns:repeat(3,minmax(0,1fr))}
.tm-kpi{position:relative;padding:18px 18px 16px;display:flex;flex-direction:column;gap:8px;min-width:0}
.tm-kpi b{font:700 26px/1.05 'Inter Tight',Onest,sans-serif;letter-spacing:-.03em;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-kpi b small{font-size:15px;color:var(--dim);font-weight:600}
.tm-kpi>.dim{font-size:12.5px}
.tm-kpi .lbl{padding-right:30px}
.tm-kpi-ic{position:absolute;top:14px;right:14px;width:28px;height:28px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:rgba(106,61,255,.14);color:var(--lilac)}
.tm-kpi-on{color:#7EEBB5}

/* ---------- сетка ---------- */
.tm-grid{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:20px;align-items:start}
.tm-col{display:flex;flex-direction:column;gap:20px;min-width:0}
.tm-col>.panel{padding:20px 22px}

/* ---------- график ---------- */
.tm-chart{position:relative;min-height:150px}
.tm-svg{display:block;overflow:visible}
.tm-gl{stroke:rgba(201,184,255,.08);stroke-dasharray:3 5}
.tm-gl.base{stroke:rgba(201,184,255,.16);stroke-dasharray:none}
.tm-gt{fill:var(--dim);font:500 10.5px 'JetBrains Mono',monospace}
.tm-dl{fill:var(--dim);font:500 10.5px 'JetBrains Mono',monospace}
.tm-bar{cursor:pointer}
.tm-bar .b{fill:url(#tmG);opacity:.72;transition:opacity .2s}
.tm-bar.today .b{opacity:1}
.tm-bar.today .tm-dl{fill:var(--lilac)}
.tm-bar:hover .b,.tm-bar.act .b{opacity:1;filter:drop-shadow(0 0 8px rgba(124,92,255,.7))}
.tm-tip{position:absolute;pointer-events:none;display:flex;flex-direction:column;gap:2px;padding:8px 11px;border-radius:11px;font-size:12.5px;white-space:nowrap;z-index:2;
  background:rgba(14,11,30,.92);border:1px solid rgba(201,184,255,.2);box-shadow:0 14px 30px -12px rgba(0,0,0,.8);backdrop-filter:blur(14px)}
.tm-tip[hidden]{display:none}
.tm-tip b{font-weight:600}
.tm-tip span:not(.dim){font-family:'JetBrains Mono',monospace;color:#fff}

/* ---------- участники ---------- */
.tm-mem-p.full .tm-mh,.tm-mem-p.full .tm-m{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(0,.9fr) minmax(0,.9fr) minmax(0,1.2fr) minmax(0,1.1fr) 146px;gap:12px;align-items:center}
@media (min-width:901px){.tm-mem-p.full:not(.own) .tm-mh,.tm-mem-p.full:not(.own) .tm-m{grid-template-columns:minmax(0,1.9fr) minmax(0,.9fr) minmax(0,.9fr) minmax(0,1.2fr) minmax(0,1.1fr) 0}}
.tm-mh{padding:0 10px 8px;font:500 10.5px 'JetBrains Mono',monospace;letter-spacing:.12em;text-transform:uppercase;color:rgba(201,184,255,.45)}
.tm-mlist{display:flex;flex-direction:column;gap:6px}
.tm-m{padding:10px;border-radius:14px;border:1px solid transparent;transition:background .2s,border-color .2s}
.tm-m:hover{background:rgba(255,255,255,.03);border-color:rgba(255,255,255,.05)}
.tm-m.me{background:rgba(106,61,255,.06);border-color:rgba(201,184,255,.10)}
.tm-mem-p.lite .tm-m{display:flex;align-items:center;gap:12px}
.tm-mem-p.lite .tm-m-who{flex:1 1 auto}
.tm-mem-p.lite .tm-c-hid{display:none}
.tm-mem-p.lite .tm-m .tm-c:not(.tm-c-hid):not(.tm-c-act){display:flex}
.tm-m-who{display:flex;align-items:center;gap:12px;min-width:0}
.tm-ava{position:relative;flex:0 0 40px;width:40px;height:40px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:15px;color:#fff;
  background:linear-gradient(140deg,rgba(124,92,255,.5),rgba(91,43,255,.25));border:1px solid rgba(201,184,255,.25)}
.tm-ava img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.tm-ava i{position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;border-radius:50%;background:#4A4468;border:2px solid #0B0920}
.tm-ava i.on{background:#3EE08F;box-shadow:0 0 0 3px rgba(62,224,143,.18)}
.tm-m-n{display:flex;flex-direction:column;gap:3px;min-width:0}
.tm-m-l1{display:flex;align-items:center;gap:7px;min-width:0}
.tm-mname{font-weight:600;color:var(--text);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
a.tm-mname:hover{color:var(--lilac);text-decoration:underline;text-underline-offset:3px}
.tm-you{font-size:11px;color:var(--dim)}
.tm-tag{flex:0 0 auto;font:500 10px 'JetBrains Mono',monospace;letter-spacing:.06em;text-transform:uppercase;padding:3px 7px;border-radius:999px;border:1px solid rgba(201,184,255,.22);color:var(--muted)}
.tm-tag.r-owner{color:#fff;border-color:rgba(201,184,255,.45);background:rgba(106,61,255,.22)}
.tm-tag.r-teamlead{color:var(--lilac);border-color:rgba(201,184,255,.35)}
.tm-st{font-size:12px;color:var(--dim)}
.tm-st.on{color:#7EEBB5}
.tm-c{display:flex;flex-direction:column;gap:2px;min-width:0;font-size:13px}
.tm-c b{font-weight:600;font-family:'JetBrains Mono',monospace;font-size:13px;color:#fff;white-space:nowrap}
.tm-c .dim{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-last{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-last svg{flex:0 0 auto;color:var(--lilac)}
.tm-c-act{flex-direction:row;align-items:center;justify-content:flex-end;gap:6px}
.tm-rsel{max-width:104px}
.tm-lim{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:5px 9px;border-radius:9px;font-size:12.5px;font-family:'JetBrains Mono',monospace;color:var(--text);white-space:nowrap;
  background:rgba(255,255,255,.035);border:1px solid rgba(201,184,255,.12)}
.tm-lim span{overflow:hidden;text-overflow:ellipsis}
button.tm-lim{cursor:pointer;transition:border-color .2s,background .2s}
button.tm-lim:hover{border-color:rgba(201,184,255,.35);background:rgba(106,61,255,.14)}
.tm-lim.none{color:var(--dim)}
.tm-lim svg{flex:0 0 auto;color:var(--lilac)}
.tm-lim.ro{background:none;border-color:transparent;padding-left:0}
.tm-limbar{display:block;height:3px;border-radius:2px;background:rgba(255,255,255,.07);margin-top:5px;overflow:hidden;max-width:140px}
.tm-limbar i{display:block;height:100%;border-radius:2px;background:linear-gradient(90deg,#7C5CFF,#C9B8FF)}
.tm-limbar.hi i{background:linear-gradient(90deg,#FFB86B,#FFD38A)}
.tm-limbar.full i{background:linear-gradient(90deg,#FF5FA2,#FF9ADF)}
.tm-limed{display:flex;align-items:center;gap:5px}
.tm-limed .inp{width:84px;min-height:32px;padding:4px 8px;font-size:13px}
.tm-ok{color:#7EEBB5!important}
.tm-mem-p .tm-note{margin-top:12px}

/* ---------- активность ---------- */
.tm-acts{display:flex;flex-direction:column}
.tm-a{display:grid;grid-template-columns:32px minmax(0,1fr) minmax(0,130px) 74px 92px;gap:12px;align-items:center;padding:9px 4px;border-top:1px solid rgba(255,255,255,.045);font-size:13px}
.tm-a:first-child{border-top:0}
.tm-a-ic{width:32px;height:32px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:rgba(106,61,255,.12);color:var(--lilac)}
.tm-a-t{display:flex;flex-direction:column;gap:2px;min-width:0}
.tm-a-l1{display:flex;align-items:baseline;gap:8px;min-width:0;white-space:nowrap;overflow:hidden}
.tm-a-l1 b{font-weight:600}
.tm-a-l1 .dim{font-size:12px;overflow:hidden;text-overflow:ellipsis}
.tm-a-p{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-a-who{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}
.tm-a-cr{text-align:right;color:#fff;font-size:12.5px;white-space:nowrap}
.tm-a-ts{text-align:right;font-size:12px;white-space:nowrap}

/* ---------- приглашение ---------- */
.tm-inv{display:flex;flex-direction:column;gap:10px;min-width:0}
.tm-inv>*,.tm-side>*,.tm-col>*{min-width:0;max-width:100%}
.tm-inv .tm-ph{margin-bottom:4px}
.tm-inv-top{display:flex;gap:16px;align-items:flex-start}
.tm-inv-l{display:flex;flex-direction:column;gap:8px;flex:1 1 auto;min-width:0}
.tm-inv-s{font-size:12.5px}
.tm-code{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-radius:14px;cursor:pointer;font-size:22px;font-weight:700;letter-spacing:.16em;color:#fff;
  background:linear-gradient(135deg,rgba(106,61,255,.22),rgba(106,61,255,.06));border:1px solid rgba(201,184,255,.28);transition:border-color .2s,transform .2s var(--ease)}
.tm-code:hover{border-color:rgba(201,184,255,.5)}
.tm-code:active{transform:scale(.98)}
.tm-code span{overflow:hidden;text-overflow:ellipsis}
.tm-code svg{flex:0 0 auto;color:var(--lilac)}
.tm-inv-b{display:flex;gap:6px;flex-wrap:wrap}
.tm-inv-b .btn{gap:6px;padding:7px 10px}
.tm-qr{flex:0 0 116px;width:116px;height:116px;padding:6px;border-radius:14px;background:#fff;box-shadow:0 12px 30px -14px rgba(91,43,255,.8)}
.tm-qr svg{display:block;width:100%;height:100%}
.tm-own{display:flex;gap:8px}
.tm-own[hidden]{display:none}
.tm-own .inp{flex:1 1 auto;min-width:0}
.tm-link{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 12px;border-radius:12px;background:rgba(8,6,24,.45);border:1px solid rgba(201,184,255,.12)}
.tm-link span{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;color:var(--lilac)}
.tm-link .btn{flex:0 0 auto;gap:6px}

/* ---------- лента ---------- */
.tm-feed{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;position:relative}
.tm-ev{display:flex;gap:12px;padding:8px 0;position:relative}
.tm-ev:not(:last-child)::before{content:"";position:absolute;left:14px;top:38px;bottom:-6px;width:1px;background:rgba(201,184,255,.10)}
.tm-ev-ic{flex:0 0 29px;width:29px;height:29px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:1px solid rgba(201,184,255,.14);background:rgba(255,255,255,.03);color:var(--muted)}
.tm-ev-ic.c-g{color:#7EEBB5;background:rgba(62,224,143,.08);border-color:rgba(62,224,143,.22)}
.tm-ev-ic.c-p{color:#FF9ADF;background:rgba(255,79,216,.07);border-color:rgba(255,79,216,.22)}
.tm-ev-ic.c-v{color:#fff;background:rgba(106,61,255,.22);border-color:rgba(201,184,255,.3)}
.tm-ev-ic.c-l{color:var(--lilac)}
.tm-ev-t{display:flex;flex-direction:column;gap:2px;min-width:0;font-size:13px;line-height:1.45;padding-top:4px}
.tm-ev-t b{font-weight:600;color:#fff}
.tm-ev-t time{font-size:11.5px}
.tm-plus{color:#7EEBB5!important;font-family:'JetBrains Mono',monospace;font-size:12.5px}
.tm-minus{color:var(--muted)!important;font-family:'JetBrains Mono',monospace;font-size:12.5px}

/* ---------- выход ---------- */
.tm-danger{display:flex;flex-direction:column;gap:10px}
.tm-danger .btn.danger{align-self:flex-start;gap:8px}

/* ---------- без команды ---------- */
.tm-intro{display:flex;flex-direction:column;gap:24px;padding:32px;
  background:radial-gradient(700px 260px at 0% 0%,rgba(106,61,255,.22),transparent 70%),radial-gradient(600px 300px at 100% 100%,rgba(255,79,216,.05),transparent 70%),var(--glass)}
.tm-intro-t{display:flex;flex-direction:column;gap:10px;max-width:720px}
.tm-intro h1{font-size:34px;line-height:1.1}
.tm-intro p{margin:0;font-size:15px;line-height:1.55}
.tm-bens{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.tm-ben{display:flex;flex-direction:column;gap:6px;padding:16px;border-radius:16px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.06);font-size:13px;line-height:1.5}
.tm-ben b{font-size:14.5px;font-weight:600;color:#fff}
.tm-ben-ic{width:38px;height:38px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:rgba(106,61,255,.18);color:var(--lilac);margin-bottom:4px}
.tm-start{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.tm-card{display:flex;flex-direction:column;gap:10px;padding:24px}
.tm-card h2{font:700 21px 'Inter Tight',Onest,sans-serif;letter-spacing:-.02em}
.tm-card p{margin:0 0 6px;font-size:13.5px;line-height:1.5}
.tm-card-ic{width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(140deg,#8C6BFF,#5B2BFF);box-shadow:0 12px 26px -12px rgba(91,43,255,.9)}
.tm-prev{font-size:12.5px;min-height:1em}
.tm-empty-owner{display:flex;align-items:center;gap:18px;padding:26px;flex-wrap:wrap}
.tm-empty-owner>div{flex:1 1 260px}
.tm-empty-owner p{margin:6px 0 0}
.tm-empty-owner>svg{color:var(--lilac)}

/* ---------- адаптив ---------- */
@media (max-width:1380px){
  .tm-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:1180px){
  .tm-grid{grid-template-columns:minmax(0,1fr)}
  .tm-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .tm-side>.tm-danger{grid-column:1/-1}
  .tm-bens{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:900px){
  .tm-side{display:flex}
  .tm-hero{grid-template-columns:minmax(0,1fr)}
  .tm-bal{align-items:flex-start;text-align:left;min-width:0}
  .tm-mem-p.full .tm-mh{display:none}
  /* участник → карточка */
  .tm-mem-p.full .tm-m{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;padding:12px;background:rgba(255,255,255,.022);border-color:rgba(255,255,255,.05)}
  .tm-mem-p.full .tm-m.me{background:rgba(106,61,255,.07);border-color:rgba(201,184,255,.12)}
  .tm-mem-p.full .tm-m-who{grid-column:1/-1}
  .tm-mem-p.full .tm-c[data-l]::before{content:attr(data-l);font:500 10px 'JetBrains Mono',monospace;letter-spacing:.1em;text-transform:uppercase;color:rgba(201,184,255,.45);margin-bottom:2px}
  .tm-mem-p.full .tm-c-act{grid-column:1/-1;justify-content:flex-start}
  .tm-mem-p.full .tm-c-act:empty{display:none}
  .tm-a{grid-template-columns:32px minmax(0,1fr) auto;grid-template-areas:"i t c" "i w s";row-gap:2px}
  .tm-a-ic{grid-area:i}.tm-a-t{grid-area:t}.tm-a-cr{grid-area:c}.tm-a-who{grid-area:w;font-size:12px}.tm-a-ts{grid-area:s}
  .tm-start{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:600px){
  .tm-root{gap:14px}
  .tm-col{gap:14px}
  .tm-col>.panel{padding:16px}
  .tm-hero{padding:18px 16px;gap:16px}
  .tm-logo{flex-basis:48px;width:48px;height:48px;border-radius:15px;font-size:21px}
  .tm-name{font-size:22px}
  .tm-bal-v b{font-size:34px}
  .tm-sub{flex-wrap:wrap}
  .tm-sub .btn{width:100%;justify-content:center}
  .tm-kpis,.tm-kpis-me{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .tm-kpi{padding:14px}
  .tm-kpi b{font-size:21px}
  .tm-kpi-ic{top:12px;right:12px;width:24px;height:24px}
  .tm-qr{flex-basis:92px;width:92px;height:92px;padding:4px;border-radius:12px}
  .tm-inv-top{gap:12px}
  .tm-rsel{max-width:none}
  .tm-code{font-size:19px;letter-spacing:.12em}
  .tm-intro{padding:22px 18px}
  .tm-intro h1{font-size:26px}
  .tm-bens{grid-template-columns:minmax(0,1fr)}
  .tm-ben{display:grid;grid-template-columns:34px minmax(0,1fr);gap:2px 12px;padding:12px;font-size:12.5px}
  .tm-ben-ic{grid-row:span 2;width:34px;height:34px;margin:0}
  .tm-ben b{font-size:14px}
  .tm-card{padding:18px}
  .tm-row{flex-wrap:wrap}
  .tm-row .btn{flex:1 0 auto;justify-content:center}
  .tm-rename .btn{flex:1 1 auto;justify-content:center}
}
