/* النسخة التجريبية: شاشة الدخول + لوحة اللاعب. يعتمد على متغيرات style.css */

/* ---------- عام ---------- */
.demo-badge {
  position: fixed; top: calc(12px + env(safe-area-inset-top)); inset-inline-start: 14px; z-index: 40;
  background: rgba(233, 194, 74, .14); border: 1px solid rgba(233, 194, 74, .5);
  color: var(--gold); font-size: .78rem; font-weight: 700;
  border-radius: 99px; padding: 3px 13px 5px;
}

/* ---------- شاشة الدخول ---------- */
.login-body {
  min-height: 100svh;
  background:
    radial-gradient(120% 55% at 50% 0%, #10305F 0%, transparent 60%),
    radial-gradient(100% 40% at 50% 105%, rgba(24, 119, 184, .35), transparent 60%),
    var(--bg0);
}
.login-screen {
  min-height: 100svh; padding: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px;
}
.login-back {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 16px;
  color: var(--mut); font-size: .88rem;
}
.login-crest { background: #fff; border-radius: 26px; padding: 10px; box-shadow: 0 14px 44px rgba(0, 0, 0, .5); margin-bottom: 10px; }
.login-screen h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); font-weight: 800; }
.login-sub { color: var(--mut); margin: 0 0 26px; }
.btn-player {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: min(100%, 360px);
  background: linear-gradient(135deg, var(--accent), #1877B8);
  color: #04121F; font-family: 'Changa'; font-weight: 800; font-size: 1.45rem;
  padding: 18px 20px 21px; border-radius: 20px;
  box-shadow: 0 12px 40px rgba(56, 198, 244, .35);
  transition: transform .15s;
}
.btn-player:active { transform: scale(.96); }
.login-hint { color: var(--mut); font-size: .82rem; margin-top: 12px; }
.btn-coach {
  position: absolute; bottom: calc(26px + env(safe-area-inset-bottom));
  background: none; border: 1px solid var(--line); color: var(--mut);
  font-family: 'Tajawal'; font-size: .9rem; cursor: pointer;
  border-radius: 99px; padding: 8px 22px 10px;
}
.coach-soon { font-family: 'Changa'; font-weight: 800; font-size: 2rem; color: var(--gold); margin: 4px 0; }
.btn-ghost {
  margin-top: 20px; background: none; border: 1px solid var(--accent);
  color: var(--accent-soft); font-family: 'Changa'; font-weight: 700; font-size: 1rem;
  border-radius: 99px; padding: 9px 30px 11px; cursor: pointer;
}

/* ---------- لوحة اللاعب ---------- */
.dash-body { background: var(--bg0); }
.dash-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
  background: rgba(6, 13, 26, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.dash-title { display: flex; align-items: center; gap: 9px; font-family: 'Changa'; font-weight: 700; font-size: 1.05rem; }
.dash-title img { background: #fff; border-radius: 50%; padding: 2px; }
.dash-exit { color: var(--mut); font-size: .88rem; border: 1px solid var(--line); border-radius: 99px; padding: 4px 15px 6px; }
.demo-chip {
  background: rgba(233, 194, 74, .14); border: 1px solid rgba(233, 194, 74, .5);
  color: var(--gold); font-size: .74rem; font-weight: 700; border-radius: 99px; padding: 2px 11px 4px;
}
.dash { max-width: 680px; margin-inline: auto; padding: 18px 16px 40px; }
.d-h { font-size: 1.3rem; font-weight: 800; margin: 26px 2px 12px; }
.d-card {
  background: linear-gradient(160deg, var(--card), var(--bg1));
  border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
}
.d-card h3 { font-size: 1.2rem; font-weight: 800; margin: 2px 0; }
.d-card h3 i { font-style: normal; color: var(--mut); font-size: .85rem; font-weight: 500; }
.d-card p { margin: 2px 0 0; color: #C4D4E8; font-size: .92rem; }
.d-mini { color: var(--accent-soft); font-size: .8rem; font-weight: 700; }
.d-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }

/* الملف الشخصي */
.pf-head { display: flex; align-items: center; gap: 16px; }
.pf-avatar {
  position: relative; flex: none; width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #1877B8);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Changa'; font-weight: 800; font-size: 2rem; color: #04121F;
  box-shadow: 0 6px 22px rgba(56, 198, 244, .3);
}
.pf-avatar b {
  position: absolute; bottom: -4px; inset-inline-end: -4px;
  background: var(--bg0); border: 1px solid var(--accent);
  color: var(--accent-soft); font-size: .8rem;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.pf-head h1 { font-size: 1.7rem; font-weight: 800; margin: 0; }
.pf-meta { color: var(--accent-soft); font-weight: 700; font-size: .9rem; margin: 0; }
.pf-join { color: var(--mut); font-size: .82rem; margin: 2px 0 0; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.pf-stat {
  background: rgba(10, 27, 54, .6); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px;
}
.pf-stat b { font-family: 'Changa'; font-weight: 800; font-size: 1.35rem; display: block; }
.pf-stat span { color: var(--mut); font-size: .74rem; display: block; margin: 0 0 7px; }
.bar { display: block; height: 5px; border-radius: 3px; background: rgba(140, 180, 230, .15); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #1877B8, var(--accent)); }
.bar.gold i { background: linear-gradient(90deg, #B8860B, var(--gold)); }

/* جدول الأسبوع */
.wk-row {
  display: grid; grid-template-columns: 74px 1fr; gap: 10px;
  padding: 11px 4px; border-bottom: 1px solid var(--line); align-items: start;
}
.wk-row.today { background: rgba(56, 198, 244, .07); border-radius: 12px; border-bottom-color: transparent; padding-inline: 10px; }
.wk-day { font-family: 'Changa'; font-weight: 700; font-size: .95rem; padding-top: 6px; }
.wk-day b {
  display: block; width: fit-content; margin-top: 2px;
  background: var(--accent); color: #04121F; font-size: .68rem;
  border-radius: 99px; padding: 1px 9px 2px;
}
.wk-items { display: flex; flex-direction: column; gap: 6px; }
.wk-item {
  display: flex; align-items: center; gap: 9px;
  border-radius: 11px; padding: 8px 12px; font-size: .9rem; font-weight: 500;
  border: 1px solid; background: rgba(10, 27, 54, .5);
}
.wk-item time { margin-inline-start: auto; color: var(--mut); font-size: .78rem; }
.ty-foot { border-color: rgba(56, 198, 244, .45); }  .ty-foot i { filter: none; }
.ty-cf   { border-color: rgba(245, 158, 66, .5); }
.ty-hx   { border-color: rgba(74, 222, 128, .45); }
.ty-st   { border-color: rgba(183, 140, 240, .5); }
.ty-rest { border-color: var(--line); color: var(--mut); }
.wk-match {
  margin-top: 14px; border-radius: var(--r); padding: 18px;
  background: linear-gradient(140deg, #14305E, #0A1B36);
  border: 1px solid rgba(56, 198, 244, .5);
  box-shadow: 0 10px 34px rgba(24, 119, 184, .25);
}
.wk-match.today { border-color: var(--gold); }
.wk-match-tag { color: var(--gold); font-size: .8rem; font-weight: 700; }
.wk-match h3 { font-size: 1.45rem; font-weight: 800; margin: 4px 0 2px; }
.wk-match h3 i { font-style: normal; font-size: .9rem; color: var(--mut); font-weight: 500; margin-inline: 6px; }
.wk-match p { margin: 2px 0 0; color: #C4D4E8; font-size: .92rem; }
.wk-match-note { color: var(--mut) !important; font-size: .82rem !important; margin-top: 8px !important; }

/* الشارات */
.bd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bd {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(10, 27, 54, .55); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 6px; text-align: center;
  color: var(--mut); font-size: .78rem;
}
.bd i { font-style: normal; font-size: 1.6rem; opacity: .45; }
.bd.on { border-color: rgba(233, 194, 74, .55); color: var(--ink); background: rgba(42, 34, 8, .5); }
.bd.on i { opacity: 1; }

/* دعوة صديق */
.d-ref { margin-top: 12px; border-color: rgba(37, 211, 102, .4); background: linear-gradient(150deg, #12301C, #0A180E); }
.d-ref h3 { color: #C9F29B; }
.ref-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.ref-code {
  font-family: 'Changa'; font-weight: 800; letter-spacing: 2px; font-size: 1.15rem;
  background: rgba(6, 13, 26, .6); border: 1px dashed rgba(37, 211, 102, .6);
  color: #A8F5C4; border-radius: 12px; padding: 6px 18px 8px;
}
.ref-copy {
  background: none; border: 1px solid var(--line); color: var(--ink);
  font-family: 'Tajawal'; font-weight: 700; border-radius: 99px; padding: 7px 18px 9px; cursor: pointer;
}
.ref-share {
  background: var(--wa); color: #04240F; font-weight: 700; font-family: 'Changa';
  border-radius: 99px; padding: 8px 20px 10px; font-size: .92rem;
}

/* قسم أولياء الأمور */
.d-h-parents { margin-bottom: 2px; }
.d-h-parents::before { content: '👨‍👩‍👦 '; }
.d-parents-line { color: var(--mut); font-size: .88rem; margin: 0 2px 12px; }
.pr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pr {
  display: flex; align-items: center; gap: 11px;
  background: linear-gradient(160deg, var(--card), var(--bg1));
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  color: var(--ink); font-family: 'Tajawal'; font-weight: 700; font-size: .9rem;
  text-align: start; cursor: pointer;
}
.pr i { font-style: normal; font-size: 1.35rem; }
.pr:active { background: var(--card2); }

.dash-foot { text-align: center; color: var(--mut); font-size: .8rem; margin-top: 34px; }

/* ---------- لوحة المدرب ---------- */
.pf-avatar.co { background: linear-gradient(135deg, var(--gold), #B8860B); }
.co-cert { color: var(--gold); font-size: .8rem; margin: 3px 0 0; }
.co-today { display: grid; gap: 8px; margin-top: 4px; }
.att-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.att-head b { font-family: 'Changa'; color: var(--accent-soft); }
.att-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: rgba(10, 27, 54, .55); border: 1px solid var(--line);
  border-radius: 13px; padding: 9px 12px; margin-bottom: 8px;
  color: var(--ink); font-family: 'Tajawal'; font-size: .95rem; cursor: pointer;
  text-align: start; transition: border-color .2s, background .2s;
}
.att-av {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--card2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Changa'; font-weight: 700; font-size: 1.05rem;
}
.att-name { flex: 1; font-weight: 700; }
.att-name i, .ro-info b i { font-style: normal; color: var(--mut); font-size: .78rem; font-weight: 400; margin-inline-start: 5px; }
.att-state { font-size: .82rem; font-weight: 700; border-radius: 99px; padding: 3px 13px 5px; }
.att-row.in { border-color: rgba(37, 211, 102, .45); }
.att-row.in .att-state { background: rgba(37, 211, 102, .16); color: #7BE3A1; }
.att-row.out { opacity: .75; }
.att-row.out .att-state { background: rgba(226, 88, 88, .16); color: #F0A0A0; }
.plan-bar { height: 7px; border-radius: 4px; background: rgba(140, 180, 230, .15); overflow: hidden; }
.plan-bar i { display: block; height: 100%; background: linear-gradient(90deg, #1877B8, var(--accent)); border-radius: 4px; transition: width .3s; }
.plan-n { color: var(--mut); font-size: .8rem; margin: 6px 0 12px; }
.chk {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: rgba(10, 27, 54, .55); border: 1px solid var(--line);
  border-radius: 13px; padding: 11px 13px; margin-bottom: 8px;
  color: var(--ink); font-family: 'Tajawal'; font-size: .92rem; cursor: pointer; text-align: start;
}
.chk-box {
  flex: none; width: 26px; height: 26px; border-radius: 9px;
  border: 2px solid var(--line); color: #04121F; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.chk.on { border-color: rgba(56, 198, 244, .4); }
.chk.on .chk-box { background: var(--accent); border-color: var(--accent); }
.chk.on > span:last-child { color: var(--mut); text-decoration: line-through; }
.ro-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.ro-row:last-child { border-bottom: 0; }
.ro-info { flex: 1; min-width: 0; }
.ro-info b { font-size: .95rem; }
.ro-meters {
  display: grid; grid-template-columns: auto 1fr; gap: 3px 10px;
  align-items: center; margin-top: 5px;
}
.ro-meters > span { color: var(--mut); font-size: .72rem; white-space: nowrap; }
.ro-rate {
  flex: none; background: rgba(233, 194, 74, .12); border: 1px solid rgba(233, 194, 74, .45);
  color: var(--gold); font-family: 'Tajawal'; font-weight: 700; font-size: .82rem;
  border-radius: 99px; padding: 6px 14px 8px; cursor: pointer;
}
.stars { display: flex; gap: 6px; justify-content: center; margin: 10px 0 4px; direction: ltr; }
.stars button {
  background: none; border: 0; cursor: pointer;
  font-size: 2.1rem; line-height: 1; color: rgba(140, 180, 230, .3);
  transition: color .15s, transform .15s;
}
.stars button.on { color: var(--gold); transform: scale(1.12); }
.d-announce { margin-top: 26px; border-color: rgba(56, 198, 244, .35); }
.d-announce .sh-submit { margin-top: 14px; }

/* ---------- لوحة الإدارة ---------- */
.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ov {
  background: linear-gradient(160deg, var(--card), var(--bg1));
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.ov b { font-family: 'Changa'; font-weight: 800; font-size: 1.5rem; display: block; }
.ov span { color: var(--mut); font-size: .8rem; }
.ov.gold { border-color: rgba(233, 194, 74, .45); }
.ov.gold b { color: var(--gold); }
.ov.alert { border-color: rgba(56, 198, 244, .45); }
.ov.alert b { color: var(--accent-soft); }
.gr-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin-top: 12px; }
.gr-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.gr-col b { font-family: 'Changa'; font-size: .85rem; color: var(--accent-soft); }
.gr-col i {
  width: 100%; max-width: 44px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--accent), #1877B8);
}
.gr-col span { color: var(--mut); font-size: .7rem; }
.gp-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 2px; border-bottom: 1px solid var(--line);
}
.gp-row:last-child { border-bottom: 0; }
.gp-info b { display: block; font-size: .98rem; }
.gp-info > span > span, .gp-info span { color: var(--mut); font-size: .8rem; }
.gp-att { width: 120px; flex: none; }
.gp-att > span { color: var(--mut); font-size: .74rem; display: block; margin-bottom: 4px; }
.rq-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 2px; border-bottom: 1px solid var(--line);
}
.rq-row:last-child { border-bottom: 0; }
.rq-row.settled { opacity: .65; }
.rq-ic { font-size: 1.4rem; flex: none; }
.rq-body { flex: 1; min-width: 0; }
.rq-body b { display: block; font-size: .92rem; }
.rq-body span { color: var(--mut); font-size: .8rem; }
.rq-acts { display: flex; gap: 7px; flex: none; }
.rq-ok, .rq-no {
  font-family: 'Tajawal'; font-weight: 700; font-size: .8rem;
  border-radius: 99px; padding: 6px 14px 8px; cursor: pointer;
}
.rq-ok { background: rgba(37, 211, 102, .15); border: 1px solid rgba(37, 211, 102, .5); color: #7BE3A1; }
.rq-no { background: none; border: 1px solid var(--line); color: var(--mut); }
.rq-done { font-size: .8rem; font-weight: 700; flex: none; }
.rq-done.ok { color: #7BE3A1; }
.rq-done.no { color: #F0A0A0; }
.pay-sum { display: flex; gap: 8px; flex-wrap: wrap; }
.ps {
  background: rgba(10, 27, 54, .55); border: 1px solid var(--line);
  border-radius: 99px; padding: 6px 16px 8px; font-size: .85rem; color: var(--mut);
}
.ps b { font-family: 'Changa'; color: var(--ink); }
.ps.ok { border-color: rgba(37, 211, 102, .4); } .ps.ok b { color: #7BE3A1; }
.ps.due { border-color: rgba(226, 88, 88, .4); } .ps.due b { color: #F0A0A0; }
.ps.total b { color: var(--gold); }
.du-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid var(--line);
}
.du-row:last-child { border-bottom: 0; }
.du-info b { display: block; font-size: .9rem; }
.du-info span { color: var(--mut); font-size: .78rem; }
.du-btn {
  background: rgba(56, 198, 244, .12); border: 1px solid rgba(56, 198, 244, .45);
  color: var(--accent-soft); font-family: 'Tajawal'; font-weight: 700; font-size: .8rem;
  border-radius: 99px; padding: 6px 14px 8px; cursor: pointer; flex: none;
}
.du-sent { color: #7BE3A1; font-size: .8rem; font-weight: 700; flex: none; }
button.gp-row {
  width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--ink); font-family: 'Tajawal'; font-size: 1rem; cursor: pointer; text-align: start;
}
button.gp-row:last-child { border-bottom: 0; }
.dash-top { top: 0; }
.ad-nav {
  position: sticky; top: calc(55px + env(safe-area-inset-top)); z-index: 25;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 16px;
  background: rgba(6, 13, 26, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.ad-nav::-webkit-scrollbar { display: none; }
.ad-nav a {
  flex: none; border: 1px solid var(--line); border-radius: 99px;
  padding: 4px 15px 6px; color: var(--mut); font-size: .84rem; font-weight: 700;
}
.ov a, a.ov { color: inherit; }
#toast[hidden] { display: none; }
#toast {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); inset-inline: 0;
  margin-inline: auto; width: fit-content; max-width: 88vw; z-index: 90;
  background: #0E2A20; border: 1px solid rgba(37, 211, 102, .55); color: #C9F2D6;
  border-radius: 99px; padding: 9px 22px 11px; font-weight: 700; font-size: .9rem;
  opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
#toast.in { opacity: 1; transform: none; }
.pl-tools { display: flex; gap: 10px; margin-bottom: 10px; }
.pl-search { flex: 1; }
.add-btn {
  flex: none; background: linear-gradient(135deg, var(--accent), #1877B8);
  border: 0; color: #04121F; font-family: 'Changa'; font-weight: 800; font-size: .92rem;
  border-radius: 12px; padding: 9px 16px 11px; cursor: pointer;
}
.add-btn.wide { width: 100%; margin-top: 12px; padding-block: 12px 14px; }
.pl-chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; margin-bottom: 4px; }
.pl-chips::-webkit-scrollbar { display: none; }
.pl-chip {
  flex: none; background: rgba(10, 27, 54, .55); border: 1px solid var(--line);
  color: var(--mut); font-family: 'Tajawal'; font-weight: 700; font-size: .8rem;
  border-radius: 99px; padding: 5px 15px 7px; cursor: pointer;
}
.pl-chip.on { border-color: var(--accent); color: var(--accent-soft); background: rgba(56, 198, 244, .1); }
.pl-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--ink); font-family: 'Tajawal'; text-align: start; }
.pl-open { flex: none; color: var(--accent-soft); font-size: .82rem; font-weight: 700; }
.co-card { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.pf-avatar.sm { width: 52px; height: 52px; font-size: 1.4rem; }
.co-info { flex: 1; min-width: 0; }
.co-info b { display: block; font-family: 'Changa'; font-size: 1.05rem; }
.co-info span { display: block; color: var(--mut); font-size: .8rem; }
.co-ph { font-size: .76rem !important; }
.co-side { flex: none; text-align: center; }
.co-side b { font-family: 'Changa'; color: var(--gold); display: block; }
.co-side > span { color: var(--mut); font-size: .72rem; display: block; margin-bottom: 6px; }
.co-edit {
  background: none; border: 1px solid var(--line); color: var(--mut);
  font-family: 'Tajawal'; font-weight: 700; font-size: .78rem;
  border-radius: 99px; padding: 4px 14px 6px; cursor: pointer;
}
/* الإيجابية في لوحة اللاعب */
.streak {
  display: inline-block; margin-top: 7px;
  background: rgba(233, 149, 74, .14); border: 1px solid rgba(233, 149, 74, .5);
  color: #F5C08A; font-size: .78rem; font-weight: 700;
  border-radius: 99px; padding: 3px 13px 5px;
}
.pos-line {
  margin: 14px 0 0 !important; text-align: center;
  color: #A8F5C4 !important; font-weight: 700; font-size: .95rem !important;
}
.d-quote {
  margin-top: 12px; text-align: center; position: relative;
  background: linear-gradient(140deg, #14305E, #0A1B36);
  border-color: rgba(56, 198, 244, .4);
}
.dq-mark { font-size: 1.5rem; display: block; }
.d-quote p { font-family: 'Changa'; font-weight: 700; font-size: 1.15rem; color: var(--ink); margin: 6px 0 8px; line-height: 1.6; }
.d-note { margin-top: 12px; border-color: rgba(233, 194, 74, .4); }
.dn-text { font-size: .98rem !important; line-height: 1.8 !important; color: #EAF2FB !important; margin-top: 8px !important; }
.dn-by { color: var(--gold) !important; font-weight: 700; margin-top: 8px !important; }
/* قفل قسم أولياء الأمور */
.pr-lock {
  background: linear-gradient(160deg, var(--card), var(--bg1));
  border: 1px dashed var(--line); border-radius: var(--r);
  padding: 28px 22px; text-align: center;
}
.pr-lock-ic { font-size: 2rem; display: block; margin-bottom: 6px; }
.pr-lock h3 { font-size: 1.2rem; font-weight: 800; margin: 0; }
.pr-lock p { color: var(--mut); font-size: .9rem; margin: 4px 0 14px; }
.pr-lock form { max-width: 260px; margin-inline: auto; }
.lock-in { text-align: center; letter-spacing: 8px; font-size: 1.3rem; }
.pr-lock .sh-submit { margin-top: 10px; }
#parents.unlocked .pr-grid { animation: prIn .45s ease; }
@keyframes prIn { from { opacity: 0; transform: translateY(12px); } }
/* بطاقات اللاعبين — قالب الدرع الذهبي (نِسَب المناطق مضبوطة على شرائط القالب) */
.fut {
  position: relative; width: 100%; max-width: 270px; aspect-ratio: 244 / 337;
  margin-inline: auto; font-family: 'Changa'; container-type: inline-size;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45));
  color: #4A3A12;
}
.fut-tpl { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; }
.fut-silver { color: #313A46; }
.fut-silver .fut-tpl { filter: saturate(0) brightness(1.04); }
.fut-elite { color: #F4E5AE; }
.fut-elite .fut-tpl { filter: hue-rotate(190deg) saturate(1.15) brightness(.82); }
.fut-top { position: absolute; top: 6.5%; inset-inline: 12%; height: 38.5%; display: flex; }
.fut-side { display: flex; flex-direction: column; align-items: center; gap: 1cqw; width: 30%; padding-top: 2.5cqw; }
.fut-side > b { font-size: 12.5cqw; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.fut-side > span { font-size: 6.2cqw; font-weight: 700; border-bottom: 1px solid currentColor; padding-bottom: 1.5cqw; opacity: .92; }
.fut-flag { flex: none; width: 11cqw; height: 5.5cqw; border-radius: 1cqw; margin-top: 2cqw; }
.fut-crest { flex: none; width: 12.5cqw; background: #fff; border-radius: 22%; padding: 1cqw; margin-top: 1.5cqw; }
.fut-photo {
  flex: 1; display: flex; align-items: flex-end; justify-content: center;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25));
}
.fut-photo .tc-av { width: 44cqw; height: 44cqw; display: block; }
.fut-name {
  position: absolute; top: 44.9%; height: 9.6%; inset-inline: 10%;
  display: flex; align-items: center; justify-content: center; gap: 2.5cqw;
  font-size: 10cqw; font-weight: 800; line-height: 1;
}
.fut-name i { font-style: normal; font-size: 5cqw; font-weight: 700; opacity: .75; margin-top: 2cqw; }
.fut-stats {
  position: absolute; top: 56.5%; inset-inline: 13.5%; height: 19%;
  display: flex; justify-content: space-between;
}
.fs-col { display: flex; flex-direction: column; justify-content: space-between; width: 47%; }
.fs-col > span {
  display: flex; align-items: center; gap: 2.5cqw;
  font-size: 6.4cqw; font-weight: 700; opacity: .95; line-height: 1;
}
.fs-col b { font-size: 8.6cqw; font-weight: 800; min-width: 10cqw; text-align: center; line-height: 1; }
.fut-mini {
  position: relative; flex: none; width: 46px; aspect-ratio: 244 / 337;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: flex-start;
  font-family: 'Changa'; color: #4A3A12;
}
.fut-mini .fut-tpl { position: absolute; inset: 0; width: 100%; height: 100%; }
.fut-mini.fut-silver { color: #313A46; }
.fut-mini.fut-silver .fut-tpl { filter: saturate(0) brightness(1.04); }
.fut-mini.fut-elite { color: #F4E5AE; }
.fut-mini.fut-elite .fut-tpl { filter: hue-rotate(190deg) saturate(1.15) brightness(.82); }
.fut-mini b { position: relative; font-size: .84rem; font-weight: 800; line-height: 1; margin-top: 6px; }
.fut-mini i { position: relative; font-style: normal; line-height: 0; margin-top: 1px; }
.fut-mini .tc-av { width: 25px; height: 25px; display: block; }
.fut-prev { margin-bottom: 6px; }
.fut-prev .fut { max-width: 190px; }
.fut-sl-lab { display: flex; justify-content: space-between; align-items: center; }
.fut-sl-lab b { color: var(--accent-soft); font-family: 'Changa'; }
.fut-sl { width: 100%; accent-color: var(--accent); margin-top: 2px; }
.card-sec { margin-top: 12px; }
.card-sec .d-mini { display: block; text-align: center; margin-bottom: 10px; }
.card-btn {
  flex: none; background: rgba(233, 194, 74, .12); border: 1px solid rgba(233, 194, 74, .45);
  color: var(--gold); font-family: 'Tajawal'; font-weight: 700; font-size: .8rem;
  border-radius: 99px; padding: 6px 13px 8px; cursor: pointer;
}
/* ملف اللاعب (ولي الأمر + التاريخ) */
.pl-num { font-style: normal; font-family: 'Changa'; font-weight: 800; color: var(--accent-soft); font-size: .85em; margin-inline-start: 3px; }
.pp-grid { display: grid; gap: 8px; margin: 12px 0 14px; }
.pp-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: rgba(10, 27, 54, .55); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 13px;
}
.pp-l { color: var(--mut); font-size: .82rem; flex: none; }
.pp-v { font-weight: 700; font-size: .92rem; text-align: start; }
.pp-v b { font-family: 'Changa'; color: var(--accent-soft); }
.pp-chips { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.pp-att {
  font-style: normal; width: 24px; height: 24px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800;
}
.pp-att.ok { background: rgba(37, 211, 102, .15); color: #7BE3A1; border: 1px solid rgba(37, 211, 102, .4); }
.pp-att.no { background: rgba(226, 88, 88, .13); color: #F0A0A0; border: 1px solid rgba(226, 88, 88, .35); }
.pp-pay {
  font-style: normal; font-size: .76rem; font-weight: 700;
  border-radius: 99px; padding: 3px 10px 5px;
}
.pp-pay.ok { background: rgba(37, 211, 102, .13); color: #7BE3A1; border: 1px solid rgba(37, 211, 102, .4); }
.pp-pay.no { background: rgba(233, 194, 74, .13); color: var(--gold); border: 1px solid rgba(233, 194, 74, .45); }
.pp-note {
  background: rgba(233, 194, 74, .1); border: 1px dashed rgba(233, 194, 74, .4);
  border-radius: 12px; padding: 9px 13px; font-size: .85rem; color: #F0DCA0;
}
.co-click { cursor: pointer; }
/* صور رمزية بالإيموجي */
.av-em { font-size: 1.25rem; border: 0; }
.co-kfa { color: var(--gold) !important; font-size: .74rem !important; }
.med-head { display: flex; align-items: center; gap: 12px; }
.med-ic {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(37, 211, 102, .13); border: 1px solid rgba(37, 211, 102, .45);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.fin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.fin {
  background: rgba(10, 27, 54, .55); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 13px;
}
.fin span { color: var(--mut); font-size: .76rem; display: block; }
.fin b { font-family: 'Changa'; font-size: 1.1rem; }
.fin b.ok { color: #7BE3A1; }
.fin b.gold { color: var(--gold); }
.fin.net { border-color: rgba(233, 194, 74, .45); }
.du-acts { display: flex; gap: 7px; align-items: center; flex: none; }
.du-pay {
  background: rgba(37, 211, 102, .13); border: 1px solid rgba(37, 211, 102, .5);
  color: #7BE3A1; font-family: 'Tajawal'; font-weight: 700; font-size: .8rem;
  border-radius: 99px; padding: 6px 13px 8px; cursor: pointer; flex: none;
}
.ev-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.ev-acts { display: flex; gap: 7px; align-items: center; flex: none; }
.ev-del {
  background: none; border: 1px solid rgba(226, 88, 88, .4); color: #F0A0A0;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: .8rem;
}
.sh-danger {
  width: 100%; margin-top: 10px; background: none;
  border: 1px solid rgba(226, 88, 88, .45); color: #F0A0A0;
  font-family: 'Tajawal'; font-weight: 700; font-size: .95rem;
  border-radius: 14px; padding: 11px; cursor: pointer;
}
.gd-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.gd-p {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(10, 27, 54, .55); border: 1px solid var(--line);
  border-radius: 99px; padding: 4px 14px 6px 6px; font-size: .85rem;
}
.gd-p i {
  font-style: normal; width: 26px; height: 26px; border-radius: 50%;
  background: var(--card2); display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
}
.gd-p .tc-av { width: 88%; height: 88%; display: block; }
.pf-bust .tc-av {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 50%;
}
@media (min-width: 700px) { .ov-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- الجرس والتنبيهات ---------- */
.dash-end { display: flex; align-items: center; gap: 8px; }
.dash-bell {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(10, 27, 54, .6); border: 1px solid var(--line); color: var(--ink);
  font-size: 1.05rem; line-height: 1; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.dash-bell b {
  position: absolute; top: -5px; inset-inline-end: -5px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: #E25858; color: #fff; font-family: 'Changa'; font-size: .68rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg0);
}
.dash-bell b[hidden] { display: none; }
.dash-bell.ring { animation: bellRing .9s ease-in-out 2; }
@keyframes bellRing {
  0%, 100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-13deg); }
  60% { transform: rotate(9deg); } 80% { transform: rotate(-6deg); }
}
.nt-list { display: grid; gap: 8px; }
.nt {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(10, 27, 54, .55); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px;
}
.nt i { font-style: normal; font-size: 1.3rem; flex: none; line-height: 1.3; }
.nt-body { flex: 1; min-width: 0; }
.nt-body b { display: block; font-size: .92rem; }
.nt-body span { display: block; color: #C4D4E8; font-size: .84rem; margin-top: 2px; }
.nt-body time { display: block; color: var(--mut); font-size: .74rem; margin-top: 4px; }
.nt.unread { border-color: rgba(56, 198, 244, .45); background: rgba(56, 198, 244, .07); }
.nt.unread b::before {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-inline-end: 6px; vertical-align: middle;
}

/* ---------- تقرير الشهر ---------- */
.d-report { margin-top: 12px; border-color: rgba(127, 209, 240, .35); }
.rp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.rp { background: rgba(10, 27, 54, .6); border: 1px solid var(--line); border-radius: 12px; padding: 9px 4px; text-align: center; }
.rp b { font-family: 'Changa'; font-weight: 800; font-size: 1.25rem; display: block; line-height: 1.1; }
.rp b i { font-style: normal; font-size: .72rem; color: var(--mut); font-weight: 700; }
.rp span { color: var(--mut); font-size: .68rem; display: block; margin-top: 3px; }
.rp.gold b { color: var(--gold); }
.rp-lab { display: block; margin: 14px 2px 8px; }
.rp-weeks { display: flex; align-items: flex-end; gap: 10px; height: 96px; }
.rp-w { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; gap: 3px; }
.rp-w b { flex: none; font-family: 'Changa'; font-size: .8rem; color: var(--accent-soft); line-height: 1; }
.rp-w em { flex: 1; min-height: 0; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.rp-w i { display: block; width: 100%; max-width: 40px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent), #1877B8); }
.rp-w span { flex: none; color: var(--mut); font-size: .68rem; white-space: nowrap; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.rp-chips span {
  background: rgba(37, 211, 102, .12); border: 1px solid rgba(37, 211, 102, .4); color: #A8F5C4;
  border-radius: 99px; padding: 4px 12px 6px; font-size: .8rem; font-weight: 700;
}
.rp-coach { margin: 14px 0 0 !important; font-size: .92rem !important; line-height: 1.7 !important; color: #EAF2FB !important; }
.rp-coach b { color: var(--gold); font-weight: 700; white-space: nowrap; }
.rp-share { display: flex; margin-top: 14px; }
.rp-share .ref-share { width: 100%; text-align: center; padding-block: 11px 13px; }
.sh-submit.alt {
  margin-top: 10px; background: rgba(233, 194, 74, .12);
  border: 1px solid rgba(233, 194, 74, .45); color: var(--gold);
}

/* ---------- تشكيلة المباراة ---------- */
.lu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.lu-n { font-family: 'Changa'; color: var(--accent-soft); font-weight: 700; flex: none; }
.lu-forms { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; margin-bottom: 6px; }
.lu-forms::-webkit-scrollbar { display: none; }
.pitch {
  position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .45);
  background: repeating-linear-gradient(180deg, #1F7F41 0 12.5%, #238C49 12.5% 25%);
  box-shadow: inset 0 0 44px rgba(0, 0, 0, .28);
}
.pitch::before { content: ''; position: absolute; inset: 4% 5%; border: 2px solid rgba(255, 255, 255, .55); border-radius: 2px; }
.pl-half { position: absolute; left: 5%; right: 5%; top: 50%; border-top: 2px solid rgba(255, 255, 255, .55); }
.pl-circle {
  position: absolute; left: 50%; top: 50%; width: 26%; aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, .55); border-radius: 50%; transform: translate(-50%, -50%);
}
.pl-box { position: absolute; left: 50%; width: 50%; height: 15%; border: 2px solid rgba(255, 255, 255, .55); transform: translateX(-50%); }
.pl-box.top { top: 4%; border-top: 0; }
.pl-box.bot { bottom: 4%; border-bottom: 0; }
.lu-bench { display: flex; flex-wrap: wrap; gap: 8px; }
.lu-acts { display: flex; gap: 10px; align-items: stretch; margin-top: 14px; }
.lu-acts .sh-submit { margin-top: 0; flex: 1; }
.lu-acts .ref-copy { flex: none; border-radius: 14px; padding-inline: 14px; }
.lu-pick { display: grid; }
.lu-row {
  width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--ink); font-family: 'Tajawal'; text-align: start; cursor: pointer;
}
.lu-row:last-child { border-bottom: 0; }
.lu-row .d-mini { display: block; margin-top: 3px; font-weight: 500; }
.lu-row.used { opacity: .6; }

/* ---------- لوحة الخطط والتدريب ---------- */
.tb-groups { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; margin-bottom: 8px; }
.tb-groups::-webkit-scrollbar { display: none; }
.tb {
  position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.tb .pitch { position: absolute; inset: 0; aspect-ratio: auto; }
.tb-tk { position: absolute; inset: 0; }
.tb-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tb.draw .tb-svg { pointer-events: auto; cursor: crosshair; }
.tb.draw .tb-tk { pointer-events: none; }
.tk {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: #fff; font-family: 'Tajawal'; line-height: 1; cursor: grab;
}
.tk.drag { cursor: grabbing; z-index: 3; }
.tk.sel { z-index: 2; }
.tb:not(.edit) .tk { cursor: default; }
.tk-av {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center;
}
.tk-av i { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.tk-av i .tc-av { width: 88%; height: 88%; display: block; pointer-events: none; }
.tk-av b {
  position: absolute; bottom: -5px; inset-inline-end: -6px;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px;
  background: var(--bg0); color: var(--accent-soft); border: 1px solid var(--accent);
  font-family: 'Changa'; font-size: .62rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.tk-nm { font-size: .72rem; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); white-space: nowrap; }
.tk-opp .tk-av { background: #E23A3A; border-color: #fff; }
.tk-opp .tk-av b { position: static; background: none; border: 0; color: #fff; font-size: 1.05rem; min-width: 0; height: auto; padding: 0; }
.tk-kit svg { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); pointer-events: none; }
.tk-ball svg { width: 24px; height: 24px; }
.tk-cone svg { width: 26px; height: 26px; }
.tk-disc svg { width: 28px; height: 14px; }
.tk-goal svg { width: 68px; height: 34px; }
.tk-ladder svg { width: 26px; height: 52px; }
.tk-hurdle svg { width: 42px; height: 25px; }
.tk-flag svg { width: 22px; height: 30px; }
.tk-txt span {
  background: rgba(6, 13, 26, .82); border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 99px; padding: 4px 11px 6px; font-size: .74rem; font-weight: 700; white-space: nowrap;
}
.tk.sel > :first-child { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.tk.sel .tk-av { border-radius: 50%; }
.tk-x {
  position: absolute; top: -12px; inset-inline-start: -12px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; background: #E25858; color: #fff;
  font-style: normal; font-size: .72rem; font-weight: 800; border: 2px solid #fff;
  display: none; align-items: center; justify-content: center; cursor: pointer;
}
.tk.sel .tk-x { display: flex; }
.tk.me .tk-av { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(233, 194, 74, .5), 0 4px 14px rgba(0, 0, 0, .4); }
.tk.me .tk-nm { color: var(--gold); }
.tk.me .tk-nm::after { content: ' · أنت'; }
.tb-row { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.tb-row::-webkit-scrollbar { display: none; }
.tb-row > button {
  flex: none; background: rgba(10, 27, 54, .6); border: 1px solid var(--line); color: var(--mut);
  font-family: 'Tajawal'; font-weight: 700; font-size: .8rem; border-radius: 99px; padding: 6px 13px 8px; cursor: pointer;
}
.tb-row > button.on { border-color: var(--accent); color: var(--accent-soft); background: rgba(56, 198, 244, .12); }
.tb-lab { flex: none; color: var(--mut); font-size: .76rem; }
.tb-colors { display: flex; gap: 6px; align-items: center; flex: none; margin-inline: 2px; }
.tb-colors button { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.tb-colors [data-color=w] { background: #fff; }
.tb-colors [data-color=y] { background: #FACC15; }
.tb-colors [data-color=r] { background: #F05050; }
.tb-colors button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--bg0) inset; }
.tb-hint { color: var(--mut); font-size: .76rem; margin: 6px 2px 0; line-height: 1.6; }
.tb-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--mut); font-size: .76rem; margin: 10px 2px 0; }
.tb-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-inline-end: 3px; vertical-align: -1px; }
.lg-me { background: #fff; border: 2px solid var(--gold); }
.lg-us { background: #fff; border: 2px solid var(--accent); }
.lg-opp { background: #E23A3A; border: 2px solid #fff; }
#coBoard.full {
  position: fixed; inset: 0; z-index: 70; border-radius: 0; border: 0; overflow-y: auto;
  background: var(--bg0);
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
}
#coBoard.full .tb-wrap { max-width: calc((100svh - 250px) * .75 + 140px); margin-inline: auto; }
#coBoard.full .tb-forms, #coBoard.full .tb-hint { max-width: 560px; margin-inline: auto; }

/* ---------- صفحة الخطة المستقلة ---------- */
.plan .tb-groups { margin-top: 2px; }
.plan-board { padding: 14px; }
.plan-me { background: rgba(233, 194, 74, .08); border-radius: 12px; }
.plan-you { font-style: normal; color: var(--gold); font-size: .78rem; font-weight: 700; margin-inline-start: 4px; }
.gd-p.plan-me { border-color: var(--gold); }
.plan-texts { margin-top: 10px; }
.plan-note-line { color: #F0DCA0 !important; font-size: .9rem !important; margin-top: 10px !important; line-height: 1.6; }
a.plan-open { display: block; text-align: center; margin-top: 12px; }
.plan-link { display: block; text-align: center; color: var(--accent-soft); font-size: .84rem; font-weight: 700; margin-top: 12px; }
#tbNote { margin-top: 0; }

/* ---------- دخول الطاقم المخفي (شاشة الدخول) ---------- */
.staff {
  /* في تدفق الصفحة (لا فوقها): عند فتح القائمة يرتفع المحتوى بدل أن تغطيه */
  width: 100%; margin-top: auto; padding-top: 28px; padding-bottom: env(safe-area-inset-bottom);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.login-crest { margin-top: auto; }
.login-logo {
  background: none; border: 0; padding: 6px; cursor: pointer; opacity: .45; transition: opacity .2s, transform .2s;
}
.login-logo img { display: block; background: #fff; border-radius: 12px; padding: 4px; }
.login-logo:hover, .login-logo:active { opacity: 1; transform: scale(1.06); }
.staff-step { width: min(100%, 360px); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.staff-step.in { opacity: 1; transform: none; }
.staff-step[hidden] { display: none; }
.btn-staff {
  width: 100%; background: rgba(10, 27, 54, .75); border: 1px solid rgba(233, 194, 74, .5); color: var(--gold);
  font-family: 'Changa'; font-weight: 700; font-size: 1.05rem; border-radius: 16px; padding: 13px 16px 15px; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.staff-lab { color: var(--mut); font-size: .84rem; margin: 0 0 8px; text-align: center; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role, .pick {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: linear-gradient(160deg, var(--card), var(--bg1)); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 8px 13px; color: var(--ink); cursor: pointer; font-family: 'Tajawal'; text-align: center;
}
.role i, .pick i { font-style: normal; font-size: 1.5rem; }
.role span, .pick span { font-family: 'Changa'; font-weight: 700; font-size: 1rem; }
.role small, .pick small { color: var(--mut); font-size: .72rem; }
.role:active, .pick:active { background: var(--card2); }
.coach-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick { border-color: rgba(56, 198, 244, .45); padding-block: 16px; }
.staff-back {
  display: block; margin: 10px auto 0; background: none; border: 0; color: var(--mut);
  font-family: 'Tajawal'; font-size: .84rem; cursor: pointer;
}
.login-screen { padding-bottom: 14px; }

/* ---------- وضع الخطط فقط في لوحة المدرب ---------- */
.co-switch { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 10px 2px 0; }
.co-switch .pl-chip { text-decoration: none; }
body.planner-only .dash > :not(.keep):not(.tb-card):not(.co-switch):not(.dash-foot) { display: none; }
body.planner-only .co-switch { justify-content: space-between; }
body.planner-only .keep.d-h { margin-top: 8px; }

/* ---------- لوحة الطاقم ---------- */
.pf-avatar.md { background: linear-gradient(135deg, #7BE3A1, #1F9D55); font-size: 2rem; }
.gd-btn { cursor: pointer; font-family: 'Tajawal'; color: var(--ink); }

/* ---------- حسابات المنصات (لوحة الإعلام) ---------- */
.so-head { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.so-ic {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(56, 198, 244, .12); border: 1px solid rgba(56, 198, 244, .45);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 800; color: var(--ink);
}
.so-ic.sm { width: 36px; height: 36px; font-size: 1rem; }
.so-grid { grid-template-columns: repeat(3, 1fr); }
.so-growth { margin-top: 10px !important; }
.so-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px;
  color: var(--ink); font-family: 'Tajawal'; text-align: start; cursor: pointer;
}
.so-row:last-child { border-bottom: 0; }
.so-info { flex: 1; min-width: 0; }
.so-info b { display: block; font-size: .92rem; margin-bottom: 5px; }
.so-info b i { font-style: normal; color: var(--mut); font-size: .76rem; font-weight: 400; margin-inline-start: 6px; direction: ltr; unicode-bidi: isolate; }
.so-n { flex: none; text-align: center; }
.so-n b { font-family: 'Changa'; color: var(--accent-soft); display: block; font-size: 1rem; }
.so-n span { color: var(--mut); font-size: .72rem; }

/* ---------- تخطيط المخطط: أدوات الرسم يمينًا، الإضافات يسارًا، بطاقات اللاعبين ---------- */
#coBoard.tb-card { padding: 8px 6px; }
.tb-wrap {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; gap: 6px; align-items: stretch;
  grid-template-areas: "tools pitch add" "tray tray tray";
}
.tb-tools { grid-area: tools; }
.tb-wrap .tb { grid-area: pitch; align-self: center; }
.tb-add { grid-area: add; }
.tb-tray { grid-area: tray; }
.tb-rail { display: flex; flex-direction: column; gap: 4px; }
.rb {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 100%; height: 42px; padding: 0; border-radius: 11px; cursor: pointer;
  background: rgba(10, 27, 54, .65); border: 1px solid var(--line); color: var(--mut); font-family: 'Tajawal';
}
.rb i { font-style: normal; font-size: 1rem; line-height: 1; color: var(--ink); }
.rb span { font-size: .54rem; font-weight: 700; line-height: 1; white-space: nowrap; }
.rb.on { border-color: var(--accent); background: rgba(56, 198, 244, .16); color: var(--accent-soft); box-shadow: 0 0 0 1px rgba(56, 198, 244, .35) inset; }
.rb.armed { border-color: #E25858; background: rgba(226, 88, 88, .2); color: #F0A0A0; }
.rb:active { transform: scale(.94); }
.tb-tools .tb-colors { flex-direction: column; gap: 5px; margin: 2px 0; align-items: center; }
.tb-tools .tb-colors button { width: 20px; height: 20px; }
.tb-tray {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 6px 2px 4px;
  border-top: 1px solid var(--line); margin-top: 2px;
}
.tb-tray::-webkit-scrollbar { display: none; }
.tray-card {
  position: relative; flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; padding: 4px 2px; color: var(--ink); font-family: 'Tajawal'; cursor: grab;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.tray-card .fut-mini { width: 58px; pointer-events: none; }
.tray-card .fut-mini b { font-size: 1.05rem; margin-top: 8px; }
.tray-card .fut-mini .tc-av { width: 32px; height: 32px; }
.tray-card > span { font-size: .74rem; font-weight: 700; white-space: nowrap; max-width: 66px; overflow: hidden; text-overflow: ellipsis; }
.tray-card.used { opacity: .38; cursor: default; }
.tray-card > b {
  position: absolute; top: 2px; inset-inline-end: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--wa); color: #04240F; font-size: .7rem; display: flex; align-items: center; justify-content: center;
}
.tray-ghost {
  position: fixed; z-index: 95; pointer-events: none; transform: translate(-50%, -50%) scale(1.15);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5));
}
.tray-ghost .tk-av { width: 46px; height: 46px; display: block; position: relative; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.tray-ghost .tk-av i { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.tray-ghost .tc-av { width: 88%; height: 88%; }
.tb.drop { box-shadow: 0 0 0 3px var(--accent), 0 0 24px rgba(56, 198, 244, .5); }
.tb.erasing .tb-svg { cursor: cell; }
.tb.erasing .tb-tk { pointer-events: none; }
.tb-forms { margin-top: 8px; }
.tk-av { width: 44px; height: 44px; }
@media (min-width: 760px) {
  .tb-wrap { grid-template-columns: 60px 150px minmax(0, 1fr) 60px; grid-template-areas: "tools tray pitch add"; }
  .tb-tray { flex-wrap: wrap; overflow: visible; border-top: 0; padding: 0; margin: 0; align-content: flex-start; }
  .tray-card { width: 66px; }
  .rb { height: 50px; }
  .rb span { font-size: .62rem; }
}

/* ---------- تشغيل الخطة ▶ ---------- */
.tb-play {
  position: absolute; left: 10px; bottom: 10px; z-index: 6;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: rgba(6, 13, 26, .74); color: #fff; border: 2px solid rgba(255, 255, 255, .85);
  font-size: 1.1rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: transform .15s, background .2s;
}
.tb-play[hidden] { display: none; }
.tb-play:active { transform: scale(.92); }
.tb.playing .tb-play { background: var(--accent); color: #04121F; border-color: var(--accent); animation: playPulse 1.2s ease-in-out infinite; }
@keyframes playPulse { 50% { box-shadow: 0 0 0 8px rgba(56, 198, 244, .25); } }
.tb.playing .tk-x { display: none; }
.tb.playing .tb-tk, .tb.playing .tb-svg { pointer-events: none; }
.tk.moving { z-index: 5; }
.tk.moving .tk-av { box-shadow: 0 0 0 4px rgba(56, 198, 244, .55), 0 6px 18px rgba(0, 0, 0, .5); }
.tk.moving.tk-kit svg { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .8)); }
@media (prefers-reduced-motion: reduce) { .tb.playing .tb-play { animation: none; } }

/* ---------- التنبيهات الذكية (الإدارة) + أعياد الميلاد ---------- */
.al-sum { display: flex; flex-wrap: wrap; gap: 7px; }
.al-chip {
  display: inline-block; background: rgba(56, 198, 244, .1); border: 1px solid rgba(56, 198, 244, .4); color: var(--accent-soft);
  border-radius: 99px; padding: 5px 13px 7px; font-size: .82rem; font-weight: 700;
}
.al-chip.warn { background: rgba(233, 194, 74, .12); border-color: rgba(233, 194, 74, .5); color: var(--gold); }
.al-g { font-style: normal; color: var(--mut); font-size: .76rem; font-weight: 400; margin-inline-start: 5px; }
.al-exp { padding-inline: 12px; font-size: .8rem; }
.al-exp b { color: var(--ink); margin-inline-end: 2px; }
.bday-card { margin-top: 12px; border-color: rgba(233, 194, 74, .45); }
.streak.bday { background: rgba(233, 194, 74, .14); border-color: rgba(233, 194, 74, .55); color: #F5DE8A; margin-inline-start: 6px; }

/* ---------- نتائج المباريات ---------- */
.mt-rec { align-items: center; }
.mt-form { display: inline-flex; gap: 4px; margin-inline-start: auto; direction: ltr; }
.mt-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.mt-dot.mt-W { background: #7BE3A1; } .mt-dot.mt-D { background: var(--gold); } .mt-dot.mt-L { background: #F0A0A0; }
.mt-filters { margin-top: 12px; }
.mt-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.mt-row:last-of-type { border-bottom: 0; }
.mt-out {
  flex: none; width: 52px; text-align: center; font-family: 'Changa'; font-weight: 800; font-size: .8rem;
  border-radius: 10px; padding: 8px 0 9px; color: #04121F;
}
.mt-out.mt-W { background: #7BE3A1; } .mt-out.mt-D { background: var(--gold); } .mt-out.mt-L { background: #F0A0A0; }
.mt-body { flex: 1; min-width: 0; }
.mt-score { display: block; font-family: 'Changa'; font-weight: 800; font-size: 1.15rem; line-height: 1.2; text-align: right; }
.mt-score i { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--mut); }
.mt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 4px; }
.mt-tag { font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 1px 9px 2px; border: 1px solid; }
.mt-tag.mt-away { color: var(--mut); background: rgba(159, 180, 206, .1); border-color: var(--line); }
.mt-g { color: var(--mut); font-size: .74rem; }
.mt-sc { display: block; color: #C4D4E8; font-size: .8rem; margin-top: 3px; }
.mt-act { margin-inline-start: auto; }
.mt-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt-score-in { display: grid; grid-template-columns: auto 1fr auto 1fr auto; gap: 8px; align-items: center; margin-top: 4px; }
.mt-score-in span { color: var(--mut); font-size: .84rem; }
.mt-score-in b { font-family: 'Changa'; font-size: 1.4rem; color: var(--mut); }
.mt-score-in input { text-align: center; font-family: 'Changa'; font-size: 1.4rem; font-weight: 800; padding: 6px; }
.mt-card-img { display: block; width: min(100%, 320px); margin: 0 auto 6px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* ---------- تقارير المباريات ---------- */
.mt-click { cursor: pointer; }
.mt-click:active { background: rgba(56, 198, 244, .06); }
.mt-more { flex: none; color: var(--accent-soft); font-size: .9rem; font-weight: 700; }
.mr-head { text-align: center; padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
.mr-head .mt-out { display: inline-block; width: auto; padding: 4px 16px 6px; }
.mr-score { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; }
.mr-score b { font-family: 'Changa'; font-weight: 800; font-size: 2.4rem; line-height: 1; }
.mr-score span { font-family: 'Changa'; font-weight: 700; color: var(--mut); font-size: .95rem; max-width: 34%; }
.mr-meta { justify-content: center; margin-top: 8px; }
.mr-empty { text-align: center; padding: 22px 0 6px; color: var(--mut); }
.mr-empty span { font-size: 2rem; display: block; }
.mr-empty p { margin: 6px 0 0; }
.mr-goals { display: flex; flex-wrap: wrap; gap: 7px; }
.mr-goal {
  display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700;
  background: rgba(123, 227, 161, .12); border: 1px solid rgba(123, 227, 161, .4); color: #A8F5C4;
  border-radius: 99px; padding: 3px 11px 5px;
}
.mr-goal b { font-family: 'Changa'; color: var(--ink); }
.mr-goal i { font-style: normal; color: var(--mut); font-weight: 400; font-size: .76rem; }
.mr-goal.opp { background: rgba(226, 88, 88, .1); border-color: rgba(226, 88, 88, .35); color: #F0A0A0; }
.mr-goal.me { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(233, 194, 74, .25); }
.mr-legend { font-style: normal; color: var(--mut); font-weight: 400; }
.mr-stats { display: grid; gap: 7px; }
.rp2 { display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; align-items: center; }
.rp2 > b { font-family: 'Changa'; font-weight: 800; text-align: center; font-size: 1rem; }
.rp2-mid { display: block; }
.rp2-l { display: block; font-style: normal; color: var(--mut); font-size: .72rem; text-align: center; margin-bottom: 3px; }
.rp2-bar { display: block; height: 7px; border-radius: 4px; background: rgba(226, 88, 88, .35); overflow: hidden; direction: ltr; }
.rp2-bar i { display: block; height: 100%; background: linear-gradient(90deg, #1877B8, var(--accent)); border-radius: 4px 0 0 4px; }
.mr-best span.me { border-color: var(--gold); color: var(--gold); background: rgba(233, 194, 74, .12); }
.mr-box { margin-top: 12px; background: rgba(10, 27, 54, .55); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; }
.mr-box p { margin: 4px 0 0; color: #EAF2FB; font-size: .92rem; line-height: 1.7; }
.mr-box.ok { border-color: rgba(123, 227, 161, .35); }
.mr-box.warn { border-color: rgba(233, 194, 74, .35); }
.mr-by { color: var(--gold); font-size: .8rem; font-weight: 700; margin: 10px 2px 0; }
.mr-hint { font-style: normal; color: var(--mut); font-weight: 400; font-size: .74rem; }
.mr-pair { grid-template-columns: 1fr auto 1fr; }

/* ---------- طيّ أدوات المخطط ---------- */
.tb-rails {
  position: absolute; right: 10px; bottom: 10px; z-index: 6;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: rgba(6, 13, 26, .74); color: #fff; border: 2px solid rgba(255, 255, 255, .85);
  font-size: 1.15rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.tb-rails.on { background: var(--gold); color: #1A1400; border-color: var(--gold); }
.tb-rails:active { transform: scale(.92); }
.tb-wrap.rails-off { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pitch" "tray"; }
.tb-wrap.rails-off .tb-rail { display: none; }
.tb-wrap.rails-off .tb-tray { flex-wrap: nowrap; overflow-x: auto; border-top: 1px solid var(--line); padding: 6px 2px 4px; }

/* ---------- مشاركة الخطة كصورة ---------- */
.tb-img { width: min(100%, 300px); }
#tbShare { padding-inline: 12px; }
button.plan-open { width: 100%; }

/* ---------- النافذة السفلية ---------- */
#sheetWrap[hidden] { display: none; }
#sheetWrap { position: fixed; inset: 0; z-index: 80; }
#sheetBack { position: absolute; inset: 0; background: rgba(3, 7, 14, .7); opacity: 0; transition: opacity .25s; }
#sheet {
  position: absolute; bottom: 0; inset-inline: 0;
  max-width: 560px; margin-inline: auto;
  background: var(--bg1); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .25, 1);
  max-height: 86svh; overflow-y: auto;
}
#sheetWrap.in #sheetBack { opacity: 1; }
#sheetWrap.in #sheet { transform: none; }
#sheetClose {
  position: absolute; top: 12px; inset-inline-end: 12px;
  background: var(--card); border: 1px solid var(--line); color: var(--mut);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
}
.sh-t { font-size: 1.25rem; font-weight: 800; margin: 0 0 14px; }
.f-lab { display: block; color: var(--mut); font-size: .84rem; margin: 12px 2px 5px; }
.f-in {
  width: 100%; box-sizing: border-box;
  background: rgba(6, 13, 26, .6); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-family: 'Tajawal'; font-size: 1rem; padding: 11px 13px;
  color-scheme: dark;
}
.f-in:focus { outline: none; border-color: var(--accent); }
.sh-submit {
  width: 100%; margin-top: 18px;
  background: linear-gradient(135deg, var(--accent), #1877B8); border: 0;
  color: #04121F; font-family: 'Changa'; font-weight: 800; font-size: 1.1rem;
  border-radius: 14px; padding: 13px 10px 15px; cursor: pointer;
}
.sh-note { text-align: center; color: var(--mut); font-size: .78rem; margin: 12px 0 0; }
.pay-rows { display: grid; gap: 8px; }
.pay-row {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(6, 13, 26, .55); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 14px; font-size: .95rem;
}
.pay-row b { font-family: 'Changa'; }
.pay-row.ok b { color: #7BE3A1; }
.pay-row.due b { color: var(--gold); }
.sh-done { text-align: center; padding: 10px 0 4px; }
.sh-check {
  display: flex; align-items: center; justify-content: center;
  width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 50%;
  background: rgba(37, 211, 102, .16); border: 2px solid var(--wa);
  color: #7BE3A1; font-size: 2.2rem;
  animation: popIn .4s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes popIn { from { transform: scale(.4); opacity: 0; } }
.sh-done h3 { font-size: 1.3rem; font-weight: 800; margin: 0; }
.sh-done p { color: #C4D4E8; margin: 6px 0 0; }
@media (prefers-reduced-motion: reduce) {
  #sheet, #sheetBack { transition: none; }
  .sh-check { animation: none; }
}

@media (min-width: 700px) {
  .bd-grid { grid-template-columns: repeat(6, 1fr); }
  .pr-grid { grid-template-columns: repeat(3, 1fr); }
}
