/* الفرق التدريبية — shared look (navy / red / gold), works in light and dark hosts */
.tm-root{--tn:#0B1F3A;--tr:#C8102E;--tg:#D4A63A;--tl:#DDE3EC;--tm:#5D6B82;--tc:#fff;--tb:#F6F8FB;--tt:#14213D;font-family:inherit}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .tm-root{--tl:#2A3A50;--tm:#9AA7BC;--tc:#152028;--tb:#1B2832;--tt:#E7EDF1}}
:root[data-theme="dark"] .tm-root{--tl:#2A3A50;--tm:#9AA7BC;--tc:#152028;--tb:#1B2832;--tt:#E7EDF1}
.tm-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px;border-radius:14px;color:#fff;background:linear-gradient(100deg,#07162B 0%,#0B1F3A 45%,#7E0A1C 85%,#C8102E 100%);border-bottom:3px solid var(--tg)}
.tm-head h2{margin:0;font-size:22px;color:#F6D77E}.tm-head p{margin:4px 0 0;opacity:.85;font-size:13.5px}
.tm-kpis{display:flex;gap:8px;flex-wrap:wrap}.tm-kpis div{display:flex;flex-direction:column;align-items:center;padding:8px 12px;min-width:72px;border-radius:10px;background:rgba(212,166,58,.12);border:1px solid rgba(212,166,58,.45)}
.tm-kpis b{font-size:20px;color:#F6D77E;line-height:1.2}.tm-kpis span{font-size:11.5px;color:rgba(255,255,255,.85)}
.tm-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0 4px}
.tm-in{font:inherit;font-size:14px;padding:8px 12px;border:1px solid var(--tl);border-radius:10px;background:var(--tc);color:var(--tt);min-width:150px}
.tm-tools input.tm-in{flex:1 1 220px}
.tm-btn{font:inherit;font-size:13.5px;font-weight:700;padding:8px 14px;border:1px solid var(--tl);border-radius:10px;background:var(--tc);color:var(--tt);cursor:pointer;white-space:nowrap}
.tm-btn:hover{border-color:var(--tr)}.tm-btn.pri{background:var(--tr);border-color:var(--tr);color:#fff}
.tm-empty{margin-top:14px;padding:30px 16px;text-align:center;color:var(--tm);border:1px dashed var(--tl);border-radius:14px;background:var(--tb)}
.tm-br{margin-top:20px}
.tm-bh{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.tm-bh h3{margin:0;font-size:18px;color:var(--tr)}.tm-bh span{font-size:12.5px;color:var(--tm);background:var(--tb);border:1px solid var(--tl);border-radius:99px;padding:2px 10px}
.tm-bh::after{content:"";flex:1;height:2px;min-width:30px;background:linear-gradient(90deg,#8A651C,#F6D77E,#B8892F);border-radius:2px;opacity:.7}
.tm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px;align-items:start}
.tm-card{display:flex;flex-direction:column;border:1px solid var(--tl);border-radius:14px;overflow:hidden;background:var(--tc);box-shadow:0 1px 3px rgba(11,31,58,.06)}
.tm-ch{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 12px;background:linear-gradient(100deg,#0B1F3A,#3A1030 55%,#C8102E);border-bottom:3px solid var(--tg)}
.tm-cat{background:linear-gradient(135deg,#8A651C,#F6D77E 45%,#B8892F);color:#0B1F3A;font-weight:800;font-size:13px;padding:2px 12px;border-radius:99px}
.tm-n{font-size:12px;font-weight:700;color:#fff;background:rgba(255,255,255,.15);border-radius:99px;padding:2px 10px}
.tm-coach{display:flex;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--tl)}
.tm-av{width:40px;height:40px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--tr);color:#fff;font-weight:800;box-shadow:0 0 0 2px #E9C46A}
.tm-coach b{display:block;font-size:15px;color:var(--tt);line-height:1.3}.tm-coach small{display:block;font-size:12px;color:var(--tm)}
.tm-as{margin-top:2px}
.tm-list{margin:0;padding:6px 12px 10px;padding-inline-start:34px;display:grid;gap:1px;font-size:13.5px;color:var(--tt);max-height:420px;overflow:auto}
.tm-list li{padding:3px 0;border-bottom:1px dashed var(--tl)}.tm-list li:last-child{border-bottom:0}
.tm-list li::marker{color:var(--tr);font-weight:700}
.tm-list li{display:list-item}.tm-list .nm{font-weight:600}
.tm-list .mt{float:inline-end;color:var(--tm);font-size:12px;display:inline-flex;gap:6px;align-items:center}
.tm-list .mt i{font-style:normal;font-size:10.5px;font-weight:700;background:var(--tb);border:1px solid var(--tl);border-radius:6px;padding:0 5px}
.tm-list .mt i.gk{background:#FFF4D6;border-color:#E9C46A;color:#7A5B00}
.tm-list li.hit{background:#FFF6D8;border-radius:6px}
.tm-chips{display:flex;flex-wrap:wrap;gap:6px}.tm-chips span{font-size:12.5px;padding:4px 10px;border-radius:99px;background:var(--tb);border:1px solid var(--tl);color:var(--tt)}
@media (max-width:640px){.tm-kpis{width:100%}.tm-kpis div{flex:1;min-width:0}.tm-grid{grid-template-columns:1fr}}
@media (min-width:900px){.tab[data-view="teams"]::before{content:"🏟️"}}

.tm-qr{font:inherit;font-size:11.5px;font-weight:700;border:1px solid rgba(255,255,255,.45);background:rgba(255,255,255,.12);color:#fff;border-radius:99px;padding:1px 9px;cursor:pointer;margin-inline-start:auto}
.tm-ch .tm-n{margin-inline-start:6px}
.tm-qr:hover{background:rgba(255,255,255,.25)}
/* QR scanner overlay */
.aq-scrim{position:fixed;inset:0;z-index:9999;background:rgba(7,18,42,.72);display:grid;place-items:center;padding:12px}
.aq-box{width:min(460px,100%);max-height:96vh;overflow:auto;background:#fff;color:#14213D;border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.4);font-family:inherit}
.aq-h{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:linear-gradient(100deg,#0B1F3A,#7E0A1C 70%,#C8102E);color:#fff;border-bottom:3px solid #D4A63A}
.aq-x{border:0;background:rgba(255,255,255,.15);color:#fff;width:32px;height:32px;border-radius:50%;cursor:pointer;font-size:16px}
.aq-cam{position:relative;background:#000;aspect-ratio:4/3}
.aq-cam video{width:100%;height:100%;object-fit:cover;display:block}
.aq-frame{position:absolute;inset:18% 22%;border:3px solid #D4A63A;border-radius:14px;box-shadow:0 0 0 999px rgba(0,0,0,.25)}
.aq-hint{position:absolute;bottom:8px;inset-inline:0;text-align:center;color:#fff;font-size:13px;margin:0;text-shadow:0 1px 3px #000}
.aq-msg{min-height:44px;padding:10px 16px;font-weight:700;font-size:15px}
.aq-msg.ok{background:#E6F4EA;color:#1E7B34}.aq-msg.bad{background:#FDE8EB;color:#A50C25}
.aq-log{margin:0;padding:6px 16px 14px;padding-inline-start:34px;font-size:13.5px;max-height:30vh;overflow:auto}
.aq-log li{padding:3px 0;border-bottom:1px dashed #DDE3EC}
/* phones: nothing may widen the page sideways (language box and watermark used to) */
@media (max-width:760px){html,body{overflow-x:clip}.nav-ctl{flex-wrap:wrap;min-width:0;max-width:100%}.hero-wm{max-width:100%;overflow:hidden}}

/* ── player platform: season calendar of measurement periods + coach notes ── */
.qbar .qnav,.mcal .qnav{font:inherit;font-weight:800;border:1px solid #DDE3EC;background:#fff;border-radius:10px;padding:4px 10px;cursor:pointer;color:#0B1F3A}
.qchip.fut{opacity:.55;cursor:not-allowed;border-style:dashed}
.qchip b{font-weight:800;margin-inline-end:2px}
.mcal{background:#fff;border:1px solid #DDE3EC;border-radius:16px;padding:14px;margin-top:12px}
.mcal-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}.mcal-h b{color:#0B1F3A;font-size:15px}.mcal-h .small{flex-basis:100%}
.mcal-g{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.mper{font:inherit;text-align:start;display:flex;flex-direction:column;gap:3px;border:1.5px solid #DDE3EC;background:#F8FAFC;border-radius:14px;padding:12px;cursor:pointer;color:#14213D;position:relative}
.mper:hover:not([disabled]){border-color:#0B1F3A}
.mper.on{border-color:#C8102E;background:#FFF6F7;box-shadow:0 6px 16px -10px rgba(200,16,46,.6)}
.mper.fut{opacity:.6;cursor:default;border-style:dashed}
.mper .mn{font-size:12px;font-weight:800;color:#C8102E}.mper b{font-size:14.5px}.mper small{color:#5D6B82;font-size:12px}
.mst2{align-self:flex-start;font-size:11px;font-weight:800;border-radius:99px;padding:2px 9px;margin-top:2px}
.mst2.cur{background:#E7F5EC;color:#1F7A4D}.mst2.past{background:#EEF1F6;color:#5D6B82}.mst2.fut{background:#FFF4D6;color:#8A6200}
.mprog{display:block;height:7px;border-radius:99px;background:#E6EAF0;overflow:hidden;margin-top:4px}.mprog i{display:block;height:100%;background:linear-gradient(90deg,#C8102E,#7E0A1C);border-radius:99px}
.nwrap{display:flex;flex-direction:column;gap:10px}
.nhead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:space-between}.nhead h3{margin:0;font-size:17px}
.nranges{display:flex;gap:6px;flex-wrap:wrap}.nranges .qchip small{opacity:.75;font-weight:800}
.nform{display:flex;flex-direction:column;gap:8px;border:1.5px dashed #C9D2E0!important;background:#FAFBFD!important}
.nform-t{color:#0B1F3A}
.nform-g{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.nform textarea{width:100%;resize:vertical;min-height:58px}
.nform-a{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.nchk{display:flex;align-items:center;gap:6px;font-weight:700;font-size:13.5px;cursor:pointer}
.nitem{border:1px solid #E3E8F0;border-inline-start:5px solid;border-radius:12px;padding:10px 12px;background:#fff}
.nh{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.nh .grow{flex:1}
.nitem p{margin:6px 0 0;white-space:pre-wrap;line-height:1.75}
.nempty{text-align:center;padding:16px}
.nmiss summary{cursor:pointer;font-weight:700}.nmiss-l{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
@media (max-width:900px){.mcal-g{grid-template-columns:1fr 1fr}}
@media (max-width:520px){.mcal-g{grid-template-columns:1fr}}
