/* ===== مهارات الفريق (shares the .sd-* look of لوحة المبيعات) ===== */
.tsk .sd-kpis { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.tsk-bar { align-items: center; }
.tsk-intro { flex: 1 1 420px; font-size: .86rem; line-height: 1.8; color: var(--muted); font-weight: 600; }
.tsk-intro b { color: var(--ink); }
.tsk-run { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.tsk-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: tsk-spin .8s linear infinite; vertical-align: -2px; }
@keyframes tsk-spin { to { transform: rotate(360deg); } }
.tsk .sd-chips { margin-top: 2px; }
.tsk-sec { margin-top: 1.1rem; }
.tsk-sec > h3 { margin: 0; font-size: 1.05rem; font-weight: 900; color: var(--ink); }
.tsk-sec > h3 small { color: var(--muted); font-weight: 700; font-size: .8rem; }
.tsk-sec > .tsk-hint { margin: 2px 0 10px; }
.tsk-tbl td, .tsk-tbl th { font-size: .8rem; }
.tsk-sup { display: grid; gap: 6px; margin: 8px 0; }
.tsk-sup > div { background: #f8fafc; border-radius: 10px; padding: 6px 8px; display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 8px; min-width: 0; }
.tsk-sup span { color: var(--muted); font-size: .74rem; font-weight: 700; grid-row: span 2; align-self: center; }
.tsk-sup b { font-size: .85rem; overflow-wrap: anywhere; }
.tsk-sup small { color: var(--muted); font-size: .74rem; overflow-wrap: anywhere; }
.tsk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; align-items: start; }
.tsk-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); border-inline-start: 4px solid var(--line); min-width: 0; transition: box-shadow .18s; }
.tsk-card:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .08); }
.tsk-card.is-new { border-inline-start-color: var(--orange); }
.tsk-card.is-ok { border-inline-start-color: var(--green); }
.tsk-card.is-no, .tsk-card.is-old { border-inline-start-color: #cbd5e1; opacity: .9; }
.tsk-card > header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.tsk-kind, .tsk-st { padding: .1rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 800; background: #f1f5f9; color: var(--ink); }
.tsk-st.is-new { background: #fff3e0; color: #b45309; }
.tsk-st.is-ok { background: #dcfce7; color: #166534; }
.tsk-st.is-no { background: #fee2e2; color: #b91c1c; }
.tsk-st.is-old { background: #e2e8f0; color: #475569; }
.tsk-conf { margin-inline-start: auto; color: var(--muted); font-size: .74rem; font-weight: 700; }
.tsk-card h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 900; color: var(--ink); line-height: 1.6; }
.tsk-card p { margin: 0 0 6px; font-size: .88rem; line-height: 1.8; color: var(--dark); }
.tsk-card ol { margin: 0; padding-inline-start: 1.2rem; font-size: .86rem; line-height: 1.8; }
.tsk-note { margin-top: 8px; padding: 6px 10px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: .8rem; font-weight: 700; }
.tsk-card details { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.tsk-card summary { cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--orange); }
.tsk-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin: 8px 0; }
.tsk-facts > div { background: #f8fafc; border-radius: 10px; padding: 6px 8px; min-width: 0; }
.tsk-facts span { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; }
.tsk-facts b { font-size: .86rem; overflow-wrap: anywhere; }
.tsk-refs, .tsk-hint { margin-top: 6px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.tsk-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tsk-f { display: block; margin-bottom: 8px; font-size: .78rem; font-weight: 800; color: var(--muted); }
.tsk-f input, .tsk-f textarea { display: block; width: 100%; margin-top: 3px; border: 1.5px solid var(--line); border-radius: 10px; padding: .45rem .6rem; font: inherit; font-size: .88rem; color: var(--ink); box-sizing: border-box; }
.tsk-f input:focus, .tsk-f textarea:focus { outline: none; border-color: var(--orange); }

/* «المساعد يراقب ويتعلّم» (team-insights.js) */
.tsk-tabs{margin-bottom:.75rem}
.tin-intro{margin-bottom:.75rem}
.tin-sec{margin-top:1.25rem}
.tin-sec h3{font-size:1rem;margin:0 0 .6rem}
.tin-chats{display:grid;gap:.6rem}
.tin-chat{background:#fff;border:1px solid #e3e8ef;border-radius:12px;padding:.75rem .9rem;min-width:0}
.tin-chat.is-bad{border-color:#f4c7c3;background:#fffafa}
.tin-chat header{display:flex;flex-wrap:wrap;gap:.25rem .6rem;align-items:center;font-size:.82rem}
.tin-chat header span{color:#6b7686}
.tin-fb{margin-inline-start:auto;font-weight:700}.tin-fb.is-ok{color:#15803d}.tin-fb.is-no{color:#b42318}
.tin-q{margin:.45rem 0;font-weight:700;overflow-wrap:anywhere}
.tin-a{white-space:pre-wrap;font-size:.86rem;line-height:1.7;color:#334155;margin-top:.35rem;overflow-wrap:anywhere}
.tin-note{font-size:.82rem;color:#9a5b00;margin-top:.35rem}
.tin-taught{font-size:.85rem;background:#eef8f0;border:1px solid #bfe3c4;border-radius:8px;padding:.45rem .6rem;margin-top:.45rem;overflow-wrap:anywhere}
.tin-teach textarea{width:100%;font:inherit;border:1px solid #dde3ea;border-radius:8px;padding:.5rem .6rem;margin-top:.45rem}
.tin-chat .tsk-acts{margin-top:.45rem}
