/* Team page v2 (team.js). Uses the Dispatch tokens from styles.css. */
.tm{padding-bottom:60px}
.tm-top{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.tm-title h1{margin:0;font-size:22px;font-weight:700;font-family:var(--head);letter-spacing:-.01em}
.tm-title p{margin:4px 0 0;font-size:12.5px;color:var(--ink-soft)}
.tm-top-r{display:flex;gap:8px;align-items:center}
.tm-btn{border:1px solid var(--border-strong);background:var(--surface);color:var(--ink);padding:8px 14px;border-radius:var(--radius-sm);cursor:pointer;font:inherit;font-weight:600;font-size:13px}
.tm-btn:hover{background:var(--green-tint);border-color:var(--green-line)}
.tm-btn.pri{background:var(--accent);border-color:var(--accent);color:#fff}
.tm-btn.pri:hover{background:var(--accent-dark)}
.tm-btn:disabled{opacity:.55;cursor:default}
.tm-lock{border:1px solid var(--border);background:var(--surface);padding:8px 13px;border-radius:var(--radius-sm);cursor:pointer;font:inherit;font-weight:600;font-size:13px;color:var(--ink)}
.tm-lock.on{background:var(--green-tint);border-color:var(--green-line);color:var(--green)}
.tm-bans{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.tm-ban{border:1px solid;border-radius:999px;padding:5px 12px;font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.tm-ban.bad{background:var(--red-tint);border-color:var(--red-line);color:var(--red)}
.tm-ban.warn{background:var(--amber-tint);border-color:var(--amber-line);color:var(--amber-strong)}
.tm-tabs{display:flex;gap:4px;border-bottom:2px solid var(--border);margin-bottom:16px;flex-wrap:wrap}
.tm-tabs button{border:0;background:none;padding:10px 16px;cursor:pointer;font:inherit;font-weight:600;color:var(--ink-soft);border-bottom:3px solid transparent;margin-bottom:-2px}
.tm-tabs button.on{color:var(--green);border-bottom-color:var(--green)}
.tm-tabs button:hover{color:var(--ink)}
.tm-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:10px}
.tm-search{flex:1;min-width:220px;max-width:460px;padding:10px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);font:inherit;color:var(--ink)}
.tm-search:focus,.tm input:focus,.tm textarea:focus,.tm select:focus{outline:2px solid var(--green-line);border-color:var(--green)}
.tm select,.tm input[type=number],.tm input[type=date],.tm-prof input,.tm-prof textarea,.tm-chat textarea{padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);font:inherit;font-size:13px;color:var(--ink)}
.tm-seg{display:inline-flex;border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden}
.tm-seg button{border:0;background:var(--surface);padding:8px 13px;cursor:pointer;font:inherit;font-size:13px;color:var(--ink-soft)}
.tm-seg button.on{background:var(--green-tint);color:var(--green);font-weight:700}
.tm-chips{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-bottom:10px}
.tm-chips button{border:1px solid var(--border);background:var(--surface);padding:5px 12px;border-radius:999px;cursor:pointer;font:inherit;font-size:12.5px;color:var(--ink)}
.tm-chips button.on{background:var(--green);border-color:var(--green);color:#fff}
.tm-chips button:hover:not(.on){background:var(--green-tint)}
.tm-sep{width:1px;height:18px;background:var(--border-strong);margin:0 4px}
.tm-count,.tm-hint{font-size:12.5px;color:var(--ink-soft);margin-bottom:10px}
.tm-hint.sm{font-size:11.5px;margin:6px 0 0}
.tm-empty{padding:36px 20px;text-align:center;color:var(--ink-soft);background:var(--surface);border:1px dashed var(--border);border-radius:var(--radius)}
.tm-dim{color:var(--ink-faint)} .tm-soft{color:var(--ink-soft);font-size:12.5px} .pad{padding:14px}
.tm-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.tm-card{text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px;cursor:pointer;font:inherit;color:var(--ink);box-shadow:var(--shadow);display:flex;flex-direction:column;gap:9px;transition:transform .1s,border-color .1s}
.tm-card{align-items:stretch;justify-content:flex-start;min-width:0;overflow:hidden;box-sizing:border-box}
.tm-card>*{width:100%;min-width:0;box-sizing:border-box}
.tm-card-h .tm-pill{flex:none}
.tm-card:hover{border-color:var(--green);transform:translateY(-1px)}
.tm-card-h{display:flex;gap:10px;align-items:center}
.tm-card-n{flex:1;min-width:0;display:flex;flex-direction:column}
.tm-card-n b{font-family:var(--head);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-card-n span{font-size:12px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-card-m{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px;color:var(--ink-soft)}
.tm-card-f{display:flex;gap:6px;flex-wrap:wrap;min-height:4px}
.tm-av{width:42px;height:42px;flex:none;overflow:hidden;display:flex;align-items:center;justify-content:center}
.tm-av img{width:100%;height:100%;object-fit:cover}
.tm-av.sm{width:28px;height:28px;font-size:11px}
.tm-av.lg{width:64px;height:64px;font-size:20px}
.tm-tag{border:1px dashed var(--border-strong);border-radius:5px;padding:1px 6px;font-size:11px;color:var(--ink-faint)}
.tm-pill{display:inline-flex;align-items:center;font-size:11.5px;font-weight:600;padding:2px 8px;border-radius:5px;border:1px solid transparent;white-space:nowrap}
.tm-pill.free{background:var(--green-tint);color:var(--green);border-color:var(--green-line)}
.tm-pill.busy{background:var(--blue-tint);color:var(--blue);border-color:var(--blue-line)}
.tm-pill.warn{background:var(--amber-tint);color:var(--amber-strong);border-color:var(--amber-line)}
.tm-pill.bad{background:var(--red-tint);color:var(--red);border-color:var(--red-line)}
.tm-pill.off{background:var(--gray-tint);color:var(--ink-soft);border-color:var(--gray-line)}
.tm-bar{height:7px;background:var(--surface-sunken);border-radius:99px;overflow:hidden}
.tm-bar i{display:block;height:100%;background:var(--green);border-radius:99px}
.tm-bar.warn i{background:var(--amber)} .tm-bar.over i{background:var(--red)}
.tm-bar-l{display:flex;justify-content:space-between;font-size:11.5px;color:var(--ink-soft);margin-top:-3px}
.tm-scroll{overflow:auto;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);margin-bottom:14px}
.tm-table{width:100%;border-collapse:collapse;font-size:13px}
.tm-table th{position:sticky;top:0;background:var(--surface-sunken);text-align:left;padding:9px 12px;font-size:11.5px;text-transform:uppercase;letter-spacing:.4px;color:var(--ink-soft);white-space:nowrap}
.tm-table th small,.tm-table td small{display:block;font-size:10.5px;color:var(--ink-faint);text-transform:none;letter-spacing:0;font-weight:400}
.tm-table td{padding:9px 12px;border-top:1px solid var(--border)}
.tm-table tr[data-open]{cursor:pointer}
.tm-table tr[data-open]:hover td{background:var(--green-tint)}
.tm-nm{display:flex;gap:9px;align-items:center}
.tm-ot td.fri,.tm-ot th.fri{background:var(--amber-tint)}
.tm-link{border:0;background:none;padding:0;cursor:pointer;font:inherit;font-weight:700;color:var(--ink);text-align:left}
.tm-link:hover{color:var(--green)}
/* skills matrix */
.tm-matrix{border-collapse:separate;border-spacing:0;font-size:12.5px}
.tm-matrix th,.tm-matrix td{padding:4px;text-align:center;border-bottom:1px solid var(--border)}
.tm-matrix thead th{position:sticky;top:0;background:var(--surface-sunken);z-index:2;height:128px;min-width:38px;vertical-align:bottom}
.tm-matrix{margin-right:120px}
.tm-matrix thead th span{position:absolute;left:50%;bottom:6px;transform-origin:0 100%;transform:rotate(-45deg);white-space:nowrap;width:150px;overflow:hidden;text-overflow:ellipsis;text-align:left;font-size:12px;line-height:1.2;padding-left:4px}
.tm-matrix thead tr.cov th{top:128px;height:28px;font-size:12px;color:var(--ink-soft)}
.tm-matrix th.zero{color:var(--red);font-weight:800} .tm-matrix th.one{color:var(--amber-strong);font-weight:700}
.tm-matrix .stick{position:sticky;left:0;background:var(--surface);text-align:left;padding:6px 12px;min-width:170px;z-index:1;border-right:1px solid var(--border)}
.tm-matrix thead .stick{background:var(--surface-sunken);z-index:75;vertical-align:bottom}
.tm-matrix .stick small{display:block;font-size:10.5px;color:var(--ink-faint);font-weight:400}
.tm-lv{width:30px;height:30px;border-radius:7px;border:1px solid var(--border);background:var(--surface);cursor:pointer;font:inherit;font-weight:800;font-size:12px;color:var(--ink-soft)}
.tm-lv:hover{border-color:var(--green)}
.tm-lv.l1{background:var(--amber-tint);color:var(--amber-strong);border-color:var(--amber-line)}
.tm-lv.l2{background:var(--blue-tint);color:var(--blue);border-color:var(--blue-line)}
.tm-lv.l3{background:var(--green);color:#fff;border-color:var(--green)}
.tm-inline{display:flex;gap:6px}
.tm-inline input{flex:1;min-width:0}
/* certs */
.tm-cover{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:14px}
.tm-cover div{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:9px 12px}
.tm-cover b{display:block;font-size:20px;font-family:var(--head)} .tm-cover span{font-size:11.5px;color:var(--ink-soft)}
/* capacity */
.tm-rollup{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px;margin-bottom:14px}
.tm-roll{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:10px 14px;box-shadow:var(--shadow)}
.tm-roll b{font-family:var(--head)} .tm-roll small{color:var(--ink-faint);margin-left:6px}
.tm-roll div{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px;font-size:12px;color:var(--ink-soft)}
.tm-roll div b{font-family:inherit;color:var(--ink)}
.tm-heat{border-collapse:separate;border-spacing:0;font-size:11px}
.tm-heat th,.tm-heat td{padding:2px;text-align:center}
.tm-heat thead th{position:sticky;top:0;background:var(--surface-sunken);z-index:2;font-weight:600;color:var(--ink-soft);padding:5px 2px}
.tm-heat thead th small{display:block;font-size:9.5px;color:var(--ink-faint);font-weight:400}
.tm-heat th.today{color:var(--green);box-shadow:inset 0 -3px var(--green)}
.tm-heat .stick{position:sticky;left:0;background:var(--surface);text-align:left;padding:3px 10px;min-width:150px;z-index:1;border-right:1px solid var(--border)}
.tm-heat thead .stick{z-index:3;background:var(--surface-sunken)}
.tm-heat tr.grp th{background:var(--green-tint);color:var(--green);text-align:left;padding:5px 10px;font-size:12px;position:static}
.tm-heat .wk{border-left:2px solid var(--border-strong)}
.tm-heat .wkend{opacity:.55}
.tm-h{display:block;width:20px;height:20px;border-radius:4px;margin:1px auto;font-style:normal;font-size:10px;line-height:20px;color:var(--ink-soft)}
.tm-h.open{background:var(--green-tint);border:1px solid var(--green-line)}
.tm-h.part{background:var(--amber-tint);border:1px solid var(--amber-line)}
.tm-h.full{background:var(--blue);} .tm-h.over{background:var(--red)}
.tm-h.off{background:var(--gray-tint);border:1px solid var(--gray-line)}
.tm-heat td.wt{min-width:46px;font-weight:700;font-size:11.5px;border-left:1px solid var(--border)}
.tm-heat td.wt.warn{color:var(--amber-strong);background:var(--amber-tint)} .tm-heat td.wt.over{color:var(--red);background:var(--red-tint)}
/* overtime */
.tm-weeknav{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.tm-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin-bottom:14px}
.tm-tiles div{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px 14px;box-shadow:var(--shadow)}
.tm-tiles b{display:block;font-size:22px;font-family:var(--head)} .tm-tiles span{font-size:12px;color:var(--ink-soft)}
.tm-tiles .bad{border-color:var(--red-line);background:var(--red-tint)} .tm-tiles .warn{border-color:var(--amber-line);background:var(--amber-tint)}
.tm-card2{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;margin-bottom:14px;box-shadow:var(--shadow)}
.tm-h2{font-family:var(--head);font-weight:700;font-size:15px;margin-bottom:10px} .tm-h2 small{font-weight:400;color:var(--ink-soft);margin-left:6px;font-size:12.5px}
.tm-fri{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px}
.tm-fj{border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 12px;display:flex;flex-direction:column;gap:5px}
.tm-fj.bad{border-color:var(--red-line);background:var(--red-tint)} .tm-fj.warn{border-color:var(--amber-line);background:var(--amber-tint)}
.tm-fj-t b{font-family:var(--head)}
.tm-note{margin-top:10px;font-size:12px;color:var(--ink-soft)}
.tm-set summary{cursor:pointer;font-weight:700;font-family:var(--head)}
.tm-cfg{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;margin-top:12px}
.tm-cfg label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--ink-soft)}
.tm-cfg-b{grid-column:1/-1;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
/* profile drawer */
.tm-ov{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:80}
.tm-prof{position:fixed;top:0;right:0;bottom:0;width:min(560px,100vw);background:var(--bg);z-index:81;display:flex;flex-direction:column;box-shadow:var(--shadow-pop)}
.tm-prof-h{display:flex;gap:14px;align-items:center;padding:18px 20px;background:var(--surface);border-bottom:1px solid var(--border)}
.tm-prof-h h2{margin:0;font-family:var(--head);font-size:18px} .tm-prof-h p{margin:2px 0 0;font-size:12.5px;color:var(--ink-soft)}
.tm-prof-h>div:nth-child(2){flex:1;min-width:0}
.tm-x{border:0;background:none;font-size:20px;line-height:1;cursor:pointer;color:var(--ink-soft);padding:4px 8px}
.tm-x.s{font-size:15px}
.tm-prof-b{flex:1;overflow:auto;padding:14px 20px}
.tm-sec{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px 14px;margin-bottom:12px}
.tm-sec input:not([type=checkbox]),.tm-sec textarea{width:100%}
.tm-sub{font-size:11.5px;text-transform:uppercase;letter-spacing:.5px;color:var(--ink-faint);font-weight:700;margin-bottom:8px}
.tm-wk{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:8px}
.tm-wk div,.tm-wk4 div{text-align:center;background:var(--surface-sunken);border-radius:6px;padding:5px 2px}
.tm-wk small,.tm-wk4 small{display:block;font-size:10.5px;color:var(--ink-faint)} .tm-wk b,.tm-wk4 b{font-size:13px}
.tm-wk .fri{background:var(--amber-tint)} .tm-wk .off{opacity:.6}
.tm-wk4{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}
.tm-wk4 .warn{background:var(--amber-tint)} .tm-wk4 .over{background:var(--red-tint);color:var(--red)}
.tm-prof-a{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.tm-sk{display:grid;grid-template-columns:1fr 120px 30px;gap:8px;align-items:center;margin-bottom:6px;font-size:13px}
.tm-sk select{width:100%}
.tm-cert{display:grid;grid-template-columns:1.4fr 1fr 132px auto 28px;gap:6px;align-items:center;margin-bottom:6px}
.tm-pay{display:flex;gap:8px;align-items:center;font-size:13px} .tm-pay input{width:120px!important}
.tm-prof-f{display:flex;gap:8px;padding:12px 20px;background:var(--surface);border-top:1px solid var(--border)}
/* Ask Jarvis */
.tm-chat{position:fixed;right:18px;bottom:18px;width:min(400px,calc(100vw - 24px));height:min(560px,calc(100vh - 36px));background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius);box-shadow:var(--shadow-pop);z-index:90;display:flex;flex-direction:column}
.tm-chat-h{display:flex;justify-content:space-between;align-items:flex-start;padding:12px 14px;border-bottom:1px solid var(--border);background:var(--green-tint);border-radius:var(--radius) var(--radius) 0 0}
.tm-chat-h small{display:block;font-size:11.5px;color:var(--ink-soft);font-weight:400}
.tm-chat-b{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:8px}
.tm-msg{max-width:88%;padding:9px 12px;border-radius:12px;font-size:13px;line-height:1.45;word-wrap:break-word}
.tm-msg.user{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:3px}
.tm-msg.assistant{align-self:flex-start;background:var(--surface-sunken);border-bottom-left-radius:3px}
.tm-msg.err{background:var(--red-tint);color:var(--red)}
.tm-sug{display:flex;flex-direction:column;gap:6px}
.tm-sug button{text-align:left;border:1px solid var(--border);background:var(--surface);padding:8px 11px;border-radius:var(--radius-sm);cursor:pointer;font:inherit;font-size:12.5px;color:var(--ink)}
.tm-sug button:hover{background:var(--green-tint);border-color:var(--green-line)}
.tm-chat-f{display:flex;gap:8px;padding:10px;border-top:1px solid var(--border);align-items:flex-end}
.tm-chat-f textarea{flex:1;resize:none}
.tm-typing i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--ink-faint);margin:0 2px;animation:tmb 1s infinite}
.tm-typing i:nth-child(2){animation-delay:.15s}.tm-typing i:nth-child(3){animation-delay:.3s}
@keyframes tmb{0%,80%,100%{opacity:.25}40%{opacity:1}}
@media (max-width:760px){.tm-cert{grid-template-columns:1fr 1fr}.tm-cert span{grid-column:1}.tm-prof{width:100vw}}
