@font-face { font-family: "Circle"; src: url("../assets/fonts/circle-light.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --navy: #25458E; --navy-ink: #1F3A6E; --magenta: #E6007E; --magenta-2: #D9027B;
  --gold: #FABE0A; --gold-2: #FFD610; --green: #128A5C;
  --bg: #FFFFFF; --surface: #F4F6FB; --surface-2: #EAEFF8; --line: #DFE5F0;
  --ink: #1F3A6E; --text: #22304A; --muted: #66728A; --on-accent: #FFFFFF;
  --navy-tint: rgba(37, 69, 142, .09); --magenta-tint: rgba(230, 0, 126, .09); --gold-tint: rgba(250, 190, 10, .18); --green-tint: rgba(18, 138, 92, .1);
  --gold-ink: #7A5B00;
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --nav-h: 64px; --side-w: 248px;
  --focus: 0 0 0 3px rgba(37, 69, 142, .35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0D1527; --surface: #141F37; --surface-2: #1B2945; --line: #26375A; --ink: #E8EEFB; --text: #D3DCEE; --muted: #8C9AB6; --navy: #5F86E0; --navy-ink: #A9C0F5; --navy-tint: rgba(95, 134, 224, .16); --magenta: #FF3A9D; --magenta-tint: rgba(255, 58, 157, .14); --gold-tint: rgba(250, 190, 10, .16); --gold-ink: #FFD866; --green: #3CC48D; --green-tint: rgba(60, 196, 141, .14); color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #0D1527; --surface: #141F37; --surface-2: #1B2945; --line: #26375A; --ink: #E8EEFB; --text: #D3DCEE; --muted: #8C9AB6; --navy: #5F86E0; --navy-ink: #A9C0F5; --navy-tint: rgba(95, 134, 224, .16); --magenta: #FF3A9D; --magenta-tint: rgba(255, 58, 157, .14); --gold-tint: rgba(250, 190, 10, .16); --gold-ink: #FFD866; --green: #3CC48D; --green-tint: rgba(60, 196, 141, .14); color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15.5px/1.7 "Circle", system-ui, sans-serif; font-variant-numeric: lining-nums tabular-nums; font-synthesis: weight; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.25; }
h1 { font-weight: 900; font-size: 26px; letter-spacing: -.2px; }
h2 { font-weight: 900; font-size: 19px; }
h3 { font-weight: 700; font-size: 16px; }
p { margin: 0; }
a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.ic { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ——— الهيكل ——— */
.shell { min-height: 100dvh; }
.side { display: none; }
.main { padding: 16px 16px calc(var(--nav-h) + 96px); max-width: 1180px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 900; color: var(--ink); font-size: 18px; text-decoration: none; }
.topbar .brand img { width: 30px; height: auto; }
.topbar .grow { flex: 1; }
.offline { font-size: 12px; color: var(--gold-ink); background: var(--gold-tint); padding: 2px 10px; border-radius: 999px; }
.bottomnav { position: fixed; inset: auto 0 0 0; height: var(--nav-h); background: var(--bg); border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700; position: relative; }
.bottomnav a[aria-current="page"] { color: var(--navy); }
.bottomnav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--magenta); }
.badge { position: absolute; top: 8px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--magenta); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--side-w) 1fr; }
  .bottomnav, .topbar .brand { display: none; }
  .side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100dvh; padding: 20px 14px; border-inline-end: 1px solid var(--line); background: var(--surface); }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; text-decoration: none; }
  .side .brand img { width: 128px; height: auto; }
  .side a.nav { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 700; position: relative; }
  .side a.nav:hover { background: var(--surface-2); }
  .side a.nav[aria-current="page"] { background: var(--navy-tint); color: var(--navy); }
  .side a.nav .badge { position: static; margin-inline-start: auto; }
  .side .spacer { flex: 1; }
  .side .me { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); }
  .main { padding: 28px 32px 48px; }
  .topbar:not(:has(.offline)) { display: none; }
}
:root[data-theme="dark"] .side .brand img, :root:not([data-theme="light"]) .side .brand img.dark-swap { filter: none; }

/* ——— رؤوس الصفحات ——— */
.pagehead { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pagehead .t { flex: 1; min-width: 0; }
.pagehead p { color: var(--muted); margin-top: 2px; }
.section { margin-top: 26px; }
.section > h2, .section > .sec-h { margin-bottom: 10px; }
.sec-h { display: flex; align-items: center; gap: 8px; }
.sec-h h2, .sec-h h3 { flex: 1; }
.count { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 0 9px; }

/* ——— الأزرار ——— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-ink); }
:root[data-theme="dark"] .btn.primary:hover { background: #4C72CC; }
.btn.accent { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.btn.accent:hover { background: var(--magenta-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #3B2C00; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--magenta); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; text-decoration: none; }
.iconbtn:hover { background: var(--surface); color: var(--ink); }
.iconbtn.wa { color: #1DA851; }
.fab { position: fixed; inset-inline-start: 16px; bottom: calc(var(--nav-h) + 16px); z-index: 25; width: 56px; height: 56px; border-radius: 16px; border: 0; background: var(--magenta); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(230, 0, 126, .32); }
@media (min-width: 900px) { .fab { display: none; } }
.only-desk { display: none; }
@media (min-width: 900px) { .only-desk { display: inline-flex; } }

/* ——— الحقول ——— */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; color: var(--ink); }
.field .hint { color: var(--muted); font-size: 12.5px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: var(--focus); }
input[type="date"] { direction: ltr; text-align: right; }
input.ltr { direction: ltr; text-align: right; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .row2.stack { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-weight: 700; font-size: 14px; color: var(--text); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.search { position: relative; flex: 1; min-width: 180px; }
.search input { padding-inline-start: 38px; }
.search .ic { position: absolute; inset-inline-start: 12px; top: 12px; color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--surface); border-radius: 10px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; }
.seg button { border: 0; background: transparent; min-height: 36px; padding: 0 12px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(31, 58, 110, .12); }

/* ——— الشارات ——— */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.pill.navy { background: var(--navy-tint); color: var(--navy); }
.pill.magenta, .pill.late { background: var(--magenta-tint); color: var(--magenta); }
.pill.gold, .pill.today { background: var(--gold-tint); color: var(--gold-ink); }
.pill.green { background: var(--green-tint); color: var(--green); }
.pill.soon { background: var(--navy-tint); color: var(--navy); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot.navy { background: var(--navy); } .dot.gold { background: var(--gold); } .dot.magenta { background: var(--magenta); } .dot.green { background: var(--green); } .dot.muted { background: var(--line); border: 1px solid var(--muted); }
.av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy-tint); color: var(--navy); font-size: 12px; font-weight: 700; flex: none; }
.av.lg { width: 40px; height: 40px; font-size: 14px; }

/* ——— القوائم ——— */
.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg); }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; position: relative; min-height: 60px; }
.item:first-child { border-top: 0; }
a.item:hover, button.item:hover { background: var(--surface); }
button.item { width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: start; cursor: pointer; }
.item .body { flex: 1; min-width: 0; }
.item .ttl { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { color: var(--muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.item .end { display: flex; align-items: center; gap: 6px; flex: none; }
.item.stripe::before { content: ""; position: absolute; inset-block: 10px; inset-inline-start: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--stripe, var(--line)); }
.prog { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; width: 64px; }
.prog i { display: block; height: 100%; background: var(--navy); border-radius: 4px; }

/* ——— صندوق المهام في الرئيسية ——— */
.hello { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.hello h1 { font-size: 28px; }
.buckets { display: grid; gap: 22px; margin-top: 18px; }
@media (min-width: 1000px) { .buckets.cols { grid-template-columns: 1fr 1fr; align-items: start; } }
.bucket h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 15px; }
.bucket h3 .dot { width: 8px; height: 8px; }
.allclear { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--surface); color: var(--muted); }
.allclear .ic { color: var(--green); }

/* ——— مسار المشروع: شيفرونات مطوية ——— */
.fold { display: flex; gap: 3px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: thin; }
/* في RTL يبدأ المسار من اليمين ويتجه يسارًا: كل شريحة رأسها لليسار وثنيتها لليمين */
.fold .st { position: relative; flex: 1 0 auto; min-width: 96px; height: 46px; display: flex; align-items: center; justify-content: center; padding: 0 22px 0 18px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface); white-space: nowrap; clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 12px 100%, 0 50%); margin-inline-start: -6px; }
.fold .st:first-child { clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%); margin-inline-start: 0; padding-inline-start: 14px; }
.fold .st.done { background: var(--navy-tint); color: var(--navy); }
.fold .st.now { background: var(--navy); color: #fff; }
.fold .st.gate { padding-inline-start: 42px; }
.fold .st.gate::after { content: ""; position: absolute; inset-inline-start: 22px; top: calc(50% - 5px); width: 10px; height: 10px; transform: rotate(45deg); background: var(--line); }
.fold .st.gate.done::after { background: var(--navy); }
.fold .st.gate.now::after { background: var(--gold); }
.fold .st.gate.wait { background: var(--gold); color: #3B2C00; }
.fold .st.gate.wait::after { background: #3B2C00; }
.fold .st.ret { background: var(--magenta); color: #fff; }

/* ——— بطاقة الإجراء ——— */
.panel { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--bg); }
.panel.soft { background: var(--surface); border-color: transparent; }
.panel.call { border-color: var(--navy); border-width: 1.5px; }
.panel.wait { border-color: var(--gold); background: var(--gold-tint); }
.panel.ret { border-color: var(--magenta); background: var(--magenta-tint); }
.panel h3 { margin-bottom: 4px; }
.panel .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.grid2 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 16px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--magenta); }
.money { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.money div { padding: 12px; border-radius: 10px; background: var(--surface); }
.money b { display: block; color: var(--ink); font-size: 18px; font-weight: 900; }
.money span { font-size: 12.5px; color: var(--muted); }

/* ——— المهام ——— */
.phase { margin-bottom: 18px; }
.phase-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.phase-h h3 { font-size: 15px; }
.task .sel { width: 20px; height: 20px; min-height: 0; accent-color: var(--navy); flex: none; }
.task .ttl.done { text-decoration: line-through; color: var(--muted); }
.status-btn { border: 0; cursor: pointer; }
.bulkbar { position: sticky; bottom: calc(var(--nav-h) + 10px); z-index: 15; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--navy-ink); color: #fff; margin-top: 12px; }
.bulkbar .btn { min-height: 36px; background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }
.bulkbar b { margin-inline-end: auto; }
@media (min-width: 900px) { .bulkbar { bottom: 16px; } }

/* ——— الجدول الزمني ——— */
.gantt { border: 1px solid var(--line); border-radius: var(--r); overflow: auto; background: var(--bg); }
.gantt-in { position: relative; min-width: 100%; }
.g-row { display: grid; grid-template-columns: 190px 1fr; min-height: 48px; border-top: 1px solid var(--line); }
.g-row:first-child { border-top: 0; }
.g-name { position: sticky; inset-inline-start: 0; z-index: 2; background: var(--bg); padding: 8px 12px; border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.g-name a { font-weight: 700; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.g-name small { color: var(--muted); font-size: 12px; }
.g-track { position: relative; }
.g-head { height: 34px; position: relative; font-size: 12px; color: var(--muted); }
.g-head span { position: absolute; top: 8px; transform: translateX(50%); white-space: nowrap; }
.g-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); opacity: .7; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--magenta); z-index: 1; }
.g-bar { position: absolute; top: 14px; height: 20px; border-radius: 6px; background: var(--navy-tint); border: 1px solid var(--navy); display: flex; overflow: hidden; }
.g-bar i { height: 100%; border-inline-start: 1px solid rgba(37, 69, 142, .35); }
.g-bar i.cur { background: var(--navy); opacity: .8; }
.g-bar i.past { background: rgba(37, 69, 142, .35); }
.g-gate { position: absolute; top: 18px; width: 12px; height: 12px; transform: translateX(50%) rotate(45deg); background: var(--bg); border: 2px solid var(--gold); z-index: 1; }
.g-gate.ok { background: var(--gold); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

/* ——— اللوحة (كانبان) ——— */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(185px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface); border-radius: var(--r); padding: 10px; min-height: 160px; }
.col h3 { font-size: 14px; display: flex; gap: 6px; align-items: center; padding: 2px 4px 10px; }
.card { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; text-decoration: none; color: inherit; }
.card:hover { border-color: var(--navy); }
.card .ttl { font-weight: 700; color: var(--ink); font-size: 14px; }
.card .sub { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }

/* ——— النوافذ ——— */
.scrim { position: fixed; inset: 0; background: rgba(13, 21, 39, .45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .16s ease; }
.scrim.out { opacity: 0; transition: opacity .16s; }
.sheet { background: var(--bg); width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: up .2s ease; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 8px 8px; }
.sheet-head h2 { flex: 1; font-size: 18px; padding-inline-start: 8px; }
.sheet-body { padding: 4px 16px 16px; overflow-y: auto; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
@media (min-width: 700px) {
  .scrim { align-items: center; }
  .sheet { width: 520px; border-radius: 18px; max-height: 86dvh; }
  .sheet.wide { width: 720px; }
  .sheet-foot .btn { flex: 0 0 auto; min-width: 110px; }
}
@keyframes up { from { transform: translateY(24px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.menu { position: fixed; z-index: 120; min-width: 190px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 10px 30px rgba(13, 21, 39, .18); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; text-align: start; font-weight: 700; }
.menu button:hover, .menu button:focus-visible { background: var(--surface); }
.menu button.on { color: var(--navy); }
#toasts { position: fixed; z-index: 200; inset-inline: 16px; bottom: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--navy-ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; box-shadow: 0 8px 24px rgba(13, 21, 39, .25); animation: up .18s ease; max-width: 520px; }
.toast.err { background: var(--magenta); }
.toast.out { opacity: 0; transition: opacity .3s; }
:root[data-theme="dark"] .toast { background: #2C4580; }
@media (min-width: 900px) { #toasts { bottom: 24px; } }

/* ——— الفراغ والتحميل ——— */
.empty { text-align: center; padding: 36px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty img { opacity: .9; margin-bottom: 4px; }
.empty h3 { color: var(--ink); }
.empty p { max-width: 380px; }
.empty .btn { margin-top: 8px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* ——— الدخول ——— */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; background: var(--bg); border-radius: 20px; padding: 28px 22px; border: 1px solid var(--line); }
.auth-card .logo { display: block; width: 168px; margin: 0 auto 18px; }
.auth-card h1 { font-size: 22px; text-align: center; margin-bottom: 4px; }
.auth-card .lead { text-align: center; color: var(--muted); margin-bottom: 20px; }
.auth-card .btn { width: 100%; }
.auth-card .alt { text-align: center; margin-top: 14px; font-size: 14px; }
.linkbtn { border: 0; background: none; color: var(--navy); font-weight: 700; cursor: pointer; padding: 4px; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; color: var(--muted); font-size: 12.5px; }
.auth-foot img { height: 26px; width: auto; }
.wait-bird { width: 86px; display: block; margin: 0 auto 14px; }
:root[data-theme="dark"] .logo-img, :root:not([data-theme="light"]) .logo-img.auto { }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-swap { content: url("../assets/img/bird.png"); width: 72px !important; } }
:root[data-theme="dark"] .logo-swap { content: url("../assets/img/bird.png"); width: 72px !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .side, .bottomnav, .topbar, .fab, .bulkbar { display: none !important; } .main { padding: 0; } }

.main:focus, .main:focus-visible { outline: none; box-shadow: none; }

/* ——— التقويم ——— */
.monthnav { display: inline-flex; align-items: center; gap: 4px; }
.monthnav b { min-width: 118px; text-align: center; color: var(--ink); }
.cal { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg); }
.cal-head, .cal-body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 8px 4px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface); }
.cal-head .short { display: none; }
.cal-cell { min-height: 112px; border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); padding: 5px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; }
.cal-cell:nth-child(7n+1) { border-inline-start: 0; }
.cal-cell:hover { background: var(--surface); }
.cal-cell.out { background: var(--surface); }
.cal-cell.out .cal-d span:first-child { color: var(--muted); opacity: .6; }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--navy); }
.cal-cell.drop { background: var(--navy-tint); }
.cal-d { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink); min-width: 0; }
.cal-cell.today .cal-d span:first-child { background: var(--magenta); color: #fff; border-radius: 999px; min-width: 24px; height: 24px; display: inline-grid; place-items: center; }
.occ { font-size: 10.5px; font-weight: 700; color: var(--gold-ink); background: var(--gold-tint); border-radius: 6px; padding: 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-chip { font-size: 12px; line-height: 1.35; padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, var(--bg)); border-inline-start: 3px solid var(--c); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal-chip b { font-size: 10.5px; color: var(--muted); }
.cal-chip.pub { opacity: .55; text-decoration: line-through; }
.cal-chip.late { box-shadow: inset 0 0 0 1px var(--magenta); }
.cal-chip[draggable="true"] { cursor: grab; }
.cal-more { font-size: 11.5px; color: var(--muted); padding-inline-start: 4px; }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; margin-top: auto; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; }
.cal-cell.has-late::after { content: ""; position: absolute; top: 7px; inset-inline-end: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--magenta); }
@media (max-width: 700px) {
  .cal-head .long { display: none; } .cal-head .short { display: inline; }
  .cal-cell { min-height: 58px; padding: 4px 3px; align-items: center; }
  .cal-items, .occ { display: none; }
  .cal-dots { display: flex; justify-content: center; }
  .cal-d { justify-content: center; }
}
.week { display: grid; gap: 10px; }
@media (min-width: 900px) { .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; } }
.wk-day { background: var(--surface); border-radius: var(--r); padding: 10px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
.wk-day.today { box-shadow: inset 0 0 0 2px var(--magenta); }
.wk-day h3 { font-size: 14px; display: flex; justify-content: space-between; gap: 6px; }
.wk-day h3 small { color: var(--muted); font-weight: 400; }
.wk-item { all: unset; display: block; background: var(--bg); border: 1px solid var(--line); border-inline-start: 3px solid var(--c); border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.wk-item:hover { border-color: var(--navy); }
.wk-item .ttl { font-weight: 700; color: var(--ink); font-size: 13.5px; margin: 2px 0 4px; }
.capcount { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.capcount .over { color: var(--magenta); font-weight: 700; }
.stage-row.cur { background: var(--navy-tint); }
.stage-row .sel { width: 20px; height: 20px; min-height: 0; accent-color: var(--green); }
table.mini { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 6px; }
table.mini th { text-align: start; color: var(--muted); font-weight: 700; padding: 6px; border-bottom: 1px solid var(--line); }
table.mini td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.mini td.short { color: var(--magenta); font-weight: 700; }
table.mini tr.bad td { background: var(--magenta-tint); }
table.mini tr.warn td { background: var(--gold-tint); }
.tablewrap { max-height: 46dvh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; }
details.panel summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details.panel textarea { margin-top: 10px; font-size: 12px; direction: ltr; text-align: left; }
.briefdoc h3 { color: var(--navy); }

/* ——— نسخة الطباعة ——— */
body.printing .side, body.printing .bottomnav, body.printing .topbar { display: none !important; }
body.printing .shell { display: block; }
.printdoc { max-width: 1060px; margin: 0 auto; color: #1F3A6E; }
.pd-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 3px solid #E6007E; padding-bottom: 14px; margin-bottom: 18px; }
.pd-head img { width: 150px; }
.pd-head h1 { font-size: 26px; text-align: end; }
.pd-head p { color: var(--muted); text-align: end; }
.printdoc section { margin-bottom: 18px; break-inside: avoid; }
.printdoc h2 { font-size: 17px; margin-bottom: 8px; color: #25458E; }
.pd-cal .cal-cell { min-height: 90px; cursor: default; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pd-table th { background: #1F3A6E; color: #fff; padding: 7px; text-align: start; }
.pd-table td { padding: 7px; border-bottom: 1px solid #DFE5F0; vertical-align: top; }
.pd-table tr { break-inside: avoid; }
.pd-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 12px; border-top: 1px solid #DFE5F0; font-size: 12px; color: #66728A; }
.pd-foot img { height: 26px; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  :root { --bg: #fff; --surface: #F4F6FB; --ink: #1F3A6E; --text: #22304A; --line: #DFE5F0; }
  body { background: #fff; }
  .noprint { display: none !important; }
  .cal-items, .occ { display: flex !important; } .cal-dots { display: none !important; }
  .cal-head .long { display: inline !important; } .cal-head .short { display: none !important; }
}
@media (max-width: 700px) { .pd-cal .cal-items { display: none; } .pd-table { font-size: 12px; } .pd-head { flex-direction: column; align-items: flex-start; } .pd-head h1, .pd-head p { text-align: start; } }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; accent-color: var(--navy); }
input[type="color"] { min-height: 40px; }
input[type="file"] { padding: 8px; }
textarea.ltr { direction: ltr; text-align: left; }
.panel h3, .item .ttl, .card .ttl { overflow-wrap: anywhere; }
.grid2 > *, .buckets > *, .pagehead .t { min-width: 0; }

/* ——— مواعيد التصوير ——— */
.cal-shoot { font-size: 12px; line-height: 1.35; padding: 3px 6px; border-radius: 6px; background: var(--gold-tint); border-inline-start: 3px solid var(--gold); color: var(--ink); display: flex; flex-direction: column; overflow: hidden; cursor: pointer; min-width: 0; }
.cal-shoot .l1 { display: flex; align-items: center; gap: 4px; white-space: nowrap; min-width: 0; font-weight: 700; }
.cal-shoot .l1 .ic { flex: none; color: var(--gold-ink); }
.cal-shoot .l1 .t { overflow: hidden; text-overflow: ellipsis; }
.cal-shoot b { font-size: 11px; direction: ltr; color: var(--gold-ink); }
.cal-shoot .who { color: var(--gold-ink); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-dots i.shoot { background: var(--gold); border-radius: 2px; transform: rotate(45deg); }
.wk-shoot { all: unset; display: block; background: var(--gold-tint); border-radius: 8px; padding: 6px 8px; cursor: pointer; color: var(--gold-ink); }
.wk-shoot .ttl { font-weight: 700; color: var(--ink); font-size: 13.5px; display: flex; align-items: center; gap: 4px; }
.row3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0 10px; }
@media (max-width: 420px) { .row3 { grid-template-columns: 1fr 1fr; } .row3 > :first-child { grid-column: 1 / -1; } }
.btn.gold:hover { background: var(--gold-2); }

/* ===================================================================
   الشكل الجديد (على نمط تطبيق فريق نادي مهارة): شريط علوي كحلي،
   عمود واحد في الوسط، بطاقات بيضاء، شريط سفلي دائم
   =================================================================== */
:root { --page: #F3F5FC; --bg: #FFFFFF; --surface: #EEF1FA; --surface-2: #E4E9F6; --line: #DDE2F2; --input: #FFFCEB; --bar: #25458E; --ink: #1F2547; --text: #1F2547; --muted: #5B6285; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --page: #121933; --bg: #1B2347; --surface: #232A55; --surface-2: #2A3263; --line: #2E3664; --input: #262B45; --bar: #18205C; --ink: #E8EBFA; --text: #DCE1F5; --muted: #A3AAD0; } }
:root[data-theme="dark"] { --page: #121933; --bg: #1B2347; --surface: #232A55; --surface-2: #2A3263; --line: #2E3664; --input: #262B45; --bar: #18205C; --ink: #E8EBFA; --text: #DCE1F5; --muted: #A3AAD0; }
html, body { background: var(--page); }
body { font-synthesis: none; font-size: 15px; line-height: 1.6; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; box-shadow: none; }

/* الشريط العلوي */
.appbar { position: sticky; top: 0; z-index: 40; background: var(--bar); color: #fff; padding: 10px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); padding-top: calc(10px + env(safe-area-inset-top)); }
.ab1 { display: flex; align-items: center; gap: 12px; max-width: 1200px; margin: 0 auto; }
.brandbar { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brandbar img { height: 32px; width: auto; filter: drop-shadow(0 0 1px rgba(255,255,255,.4)); }
.brandbar span { display: flex; flex-direction: column; line-height: 1.25; }
.brandbar b { font-size: 16px; }
.brandbar small { font-size: 11.5px; opacity: .8; }
.appbar .offline { background: var(--gold-2); color: #3A3200; }
.who { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; min-width: 0; }
.whotxt { text-align: left; font-size: 12.5px; line-height: 1.3; opacity: .92; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whotxt b { display: block; font-size: 14px; }
.avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); background: var(--magenta); color: #fff; font-size: 16px; flex: none; cursor: pointer; padding: 0; }
.avatar .dotbadge { position: absolute; top: -2px; left: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold-2); border: 2px solid var(--bar); }
@media (max-width: 420px) { .whotxt { display: none; } }
.appmenu { position: fixed; z-index: 120; top: calc(62px + env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); width: min(290px, calc(100vw - 32px)); max-height: calc(100dvh - 140px); overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgba(10,20,60,.25); padding: 6px; display: flex; flex-direction: column; }
.appmenu .mh { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.appmenu .mh b { font-size: 15px; color: var(--ink); }
.appmenu a, .appmenu button { display: flex; align-items: center; gap: 10px; text-align: start; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; background: none; border: 0; font-size: 15px; cursor: pointer; position: relative; }
.appmenu a:hover, .appmenu button:hover { background: var(--surface); }
.appmenu .badge { position: static; margin-inline-start: auto; }

/* المحتوى: عمود في الوسط، والصفحات العريضة (التقويم والمشاريع) أعرض */
.main, .main.wide { margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.main { max-width: 820px; }
.main.wide { max-width: 1200px; }
@media (min-width: 900px) { .main { padding-top: 22px; } .topbar:not(:has(.offline)) { display: none; } }
.side, .topbar, .fab { display: none !important; }

/* الشريط السفلي دائمًا */
.bottomnav { display: flex !important; justify-content: center; background: var(--bg); border-top: 1px solid var(--line); height: auto; padding: 0 8px env(safe-area-inset-bottom); }
.bottomnav a { flex: 1; max-width: 120px; padding: 9px 4px 8px; font-size: 12px; gap: 3px; }
.bottomnav a[aria-current="page"] { color: var(--magenta); }
.bottomnav a[aria-current="page"]::before { display: none; }

/* البطاقات */
.list { border-radius: 18px; background: var(--bg); }
.panel { border-radius: 18px; background: var(--bg); }
.panel.soft { background: var(--surface); }
.panel.call { border: 2px solid var(--navy); }
.item { min-height: 58px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.card.hero { background: var(--bar); color: #fff; border-color: transparent; }
.card.hero h1 { color: #fff; }
.card.hero .muted { color: #C9D3FF; margin-top: 2px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tile { border-radius: 14px; padding: 12px; background: rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.tile b { font-size: 26px; line-height: 1.1; color: #fff; }
.tile span { font-size: 12.5px; color: #C9D3FF; }
.tile:hover { background: rgba(255,255,255,.16); }
.card.day { background: linear-gradient(135deg, var(--magenta), #B8005F); color: #fff; border: 0; }
.card.day h2 { color: #fff; }
.bigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.big { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; border-radius: 14px; background: #fff; color: #8E0F4E; border: 0; font-size: 16px; cursor: pointer; }
.big:hover { background: #FFF2F8; }
.buckets { display: grid; gap: 14px; margin-top: 0; }
.bucket { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 6px; }
.bucket h3 { margin-bottom: 4px; }
.bucket .list { border: 0; border-radius: 0; background: transparent; }
.bucket .item { padding-inline: 2px; }
.bucket .allclear { margin-bottom: 10px; background: var(--surface); }

/* الحقول والأزرار */
input, select, textarea { background: var(--input); border-radius: 12px; }
input[type="checkbox"], input[type="radio"], input[type="color"] { background: transparent; }
.search input { background: var(--bg); }
.btn { border-radius: 12px; }
.btn.sm { border-radius: 10px; }
.chip { background: var(--bg); }
.seg { background: var(--bg); border: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; box-shadow: none; }
.pagehead h1 { font-size: 23px; }
.cal, .gantt, .board .col { border-radius: 18px; }
.sheet { border-radius: 22px 22px 0 0; }
@media (min-width: 700px) { .sheet { border-radius: 20px; } }
.auth { background: var(--page); }
.auth-card { border-radius: 18px; }
#toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { #toasts { bottom: 90px; } .bulkbar { bottom: 80px; } }
.ab1 { max-width: 788px; }
.appbar.wide .ab1 { max-width: 1168px; }
.bucket .item.stripe, .list .item.stripe { padding-inline-start: 14px; }
.bucket .item.stripe::before { inset-block: 12px; }
.auth { min-height: calc(100dvh - 62px); align-items: start; padding-top: 28px; }

/* ——— 2.3: الأنشطة الإعلامية، البريفات، الفريق ——— */
.modeseg { display: flex; width: 100%; margin: 4px 0 14px; }
.modeseg button { flex: 1 1 0; justify-content: center; white-space: normal; text-align: center; min-height: 44px; line-height: 1.3; }
.acted { display: grid; gap: 10px; }
.actrows { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.actrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-width: 0; }
.actrow.on { border-color: var(--navy); background: var(--navy-tint, rgba(37, 69, 142, .07)); }
.actrow .an { display: grid; min-width: 0; }
.actrow .an b { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.actrow .an small { color: var(--muted); font-size: 12px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.stepper .iconbtn { width: 32px; height: 32px; font-size: 20px; font-weight: 700; background: var(--surface); color: var(--ink); }
.stepper input { width: 52px; min-height: 34px; padding: 0 4px; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.act-sum { font-size: 14px; color: var(--text); background: var(--surface); border-radius: 10px; padding: 10px 12px; }
.act-sum b { color: var(--magenta); font-size: 16px; }
.briefbox { border: 1px dashed var(--line); border-radius: 14px; padding: 12px 12px 2px; margin: 4px 0 14px; background: var(--surface); }
.briefbox h4 { margin: 0 0 10px; font-size: 15px; color: var(--ink); }
.actsum { margin-top: 14px; display: grid; gap: 8px; }
.actline { display: grid; grid-template-columns: 1fr 70px auto; align-items: center; gap: 10px; font-size: 14px; }
.actline .prog { width: 100%; }
.panel.ok { border-color: var(--green); background: var(--green-tint, rgba(18, 138, 92, .08)); }
.panel.ready .chip { background: var(--bg); }
.chip.static { cursor: default; font-weight: 400; min-height: 32px; }
.item.todo .tick { width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--magenta); display: block; }
.item.todo .status-btn:hover .tick { background: var(--magenta-tint); }
.wa-send { display: inline-flex; gap: 8px; margin-top: 8px; }

/* هيكل الفريق */
.orgwrap { overflow-x: auto; padding: 6px 0 4px; }
.orgtree, .orgtree ul { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; direction: ltr; }
.orgtree ul { padding-top: 18px; position: relative; }
.orgtree li { position: relative; padding: 18px 6px 0; display: flex; flex-direction: column; align-items: center; }
.orgtree > li { padding-top: 0; }
.orgtree li::before, .orgtree li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 18px; border-top: 2px solid var(--line); }
.orgtree li::after { right: auto; left: 50%; border-left: 2px solid var(--line); }
.orgtree li:only-child::before, .orgtree li:only-child::after { display: none; }
.orgtree li:only-child { padding-top: 0; }
.orgtree li:first-child::before, .orgtree li:last-child::after { border: 0 none; }
.orgtree li:last-child::before { border-right: 2px solid var(--line); }
.orgtree ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 18px; border-left: 2px solid var(--line); }
.orgtree li:only-child > ul::before { }
.orgnode { direction: rtl; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; min-width: 160px; max-width: 240px; display: grid; gap: 4px; text-align: center; box-shadow: 0 1px 2px rgba(31, 58, 110, .06); }
.orgnode > b { color: var(--ink); font-size: 15px; }
.orgnode > small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.orgnode.k-naseej { border-color: #13B3A9; }
.orgnode.k-leader { background: var(--bar, var(--navy)); border-color: transparent; }
.orgnode.k-leader > b, .orgnode.k-leader > small, .orgnode.k-leader .orgp { color: #fff; }
.orgnode.k-ops { border: 2px solid var(--magenta); }
.orgppl { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.orgp { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); text-align: start; }
.orgp i { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); }
.orgnode.k-leader .orgp i { color: rgba(255, 255, 255, .75); }
@media (max-width: 640px) {
  .orgtree, .orgtree ul { flex-direction: column; align-items: stretch; direction: rtl; }
  .orgtree li { padding: 10px 0 0; align-items: stretch; }
  .orgtree ul { padding-top: 0; padding-inline-start: 18px; border-inline-start: 2px solid var(--line); margin-inline-start: 14px; }
  .orgtree li::before, .orgtree li::after, .orgtree ul::before { display: none; }
  .orgnode { max-width: none; text-align: start; }
  .orgppl { justify-content: flex-start; }
}
.specgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.spec { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--bg); }
.spec .sec-h { margin-bottom: 8px; }

/* مسار استلام المشروع */
.card.flow h2 { margin-bottom: 12px; }
.flowlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.flowlist li { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border-radius: 14px; padding: 10px 12px; }
.flowlist .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--magenta); color: #fff; font-weight: 700; font-size: 13px; }
.flowlist b { display: block; color: var(--ink); }
.flowlist small { display: block; color: var(--magenta); font-weight: 700; font-size: 12px; }
.flowlist p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.card.flow.compact { padding: 14px; margin-bottom: 14px; }
.card.flow.compact h2 { font-size: 15px; margin-bottom: 8px; }
.card.flow.compact .flowlist { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; }
.flowhide { position: absolute; top: 12px; inset-inline-end: 14px; }
@media (max-width: 640px) { .card.flow.compact .flowlist { grid-template-columns: 1fr; } .actline { grid-template-columns: 1fr 50px auto; } }
button.phase-h { width: 100%; border: 0; background: none; padding: 6px 2px; cursor: pointer; text-align: start; color: inherit; font: inherit; align-items: center; flex-wrap: wrap; }
button.phase-h h3 { margin: 0; flex: 1 1 auto; min-width: 0; }
.phase-h .chev { display: inline-grid; transform: rotate(-90deg); transition: transform .15s; color: var(--muted); }
.phase.shut .phase-h .chev { transform: rotate(0deg); }
.phase.shut { margin-bottom: 6px; border-bottom: 1px solid var(--line); }

/* ========== 2.4: المهام السريعة، المشاريع، الملاحظات ========== */
/* — المهام السريعة — */
.todo-list { display: grid; gap: 10px; }
.todo { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; cursor: pointer; position: relative; transition: border-color .15s, box-shadow .15s; }
.todo:hover { border-color: var(--navy); box-shadow: 0 2px 10px rgba(31, 58, 110, .08); }
.todo:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.todo.fresh { border-color: var(--magenta); box-shadow: inset 4px 0 0 var(--magenta); }
html[dir="rtl"] .todo.fresh { box-shadow: inset -4px 0 0 var(--magenta); }
.todo.late { border-color: var(--magenta); }
.todo.urgent:not(.late) { border-color: var(--gold); }
.todo.done { opacity: .75; }
.todo.done .td-title b { text-decoration: line-through; text-decoration-color: var(--muted); }
.td-top { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.td-title { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.td-title b { color: var(--ink); font-size: 15.5px; overflow-wrap: anywhere; }
.cd { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.cd.late { background: var(--magenta); color: #fff; }
.cd.soon { background: var(--gold); color: #3A2A00; }
.cd.today { background: var(--gold-tint); color: var(--gold-ink); }
.cd.ok { background: var(--green-tint); color: var(--green); }
.td-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.td-meta .av { width: 22px; height: 22px; font-size: 10px; }
.td-meta a { color: var(--navy); text-decoration: none; font-weight: 700; }
.td-n { display: inline-flex; gap: 3px; align-items: center; margin-inline-start: auto; }
.td-last { font-size: 13.5px; color: var(--text); background: var(--surface); border-radius: 10px; padding: 6px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.td-acts.big { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.tsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tsteps li { display: grid; gap: 3px; font-size: 11.5px; color: var(--muted); text-align: center; }
.tsteps li i { display: block; height: 4px; border-radius: 4px; background: var(--surface-2); }
.tsteps li.on i, .tsteps li.cur i { background: var(--navy); }
.tsteps li.cur span { color: var(--ink); font-weight: 700; }
.tsteps li.ret i { background: var(--magenta); }
.tsteps li.ret span { color: var(--magenta); }
.todo.done .tsteps li i { background: var(--green); }
.todo-group { margin-bottom: 18px; }
.todo-group > h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 8px; }
.more-link { display: inline-block; margin-top: 8px; }
.notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--navy-tint, #EEF2FB); color: var(--ink); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.notice span { flex: 1 1 200px; }
.tdetail { display: grid; gap: 12px; }
.td-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.td-head h3 { font-size: 18px; }
.td-note { white-space: pre-wrap; background: var(--surface); border-radius: 12px; padding: 10px 12px; margin: 0; }
.thread-h { margin: 6px 0 0; font-size: 14px; }
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.thread li { display: flex; gap: 8px; align-items: flex-start; }
.thread li > div { background: var(--surface); border-radius: 14px; padding: 8px 12px; min-width: 0; max-width: 85%; }
.thread li.me > div { background: var(--navy-tint, #EEF2FB); }
.thread p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.th-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.th-meta b { color: var(--ink); font-size: 13px; }
.thread.small li > div { padding: 6px 10px; font-size: 14px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 44px; }
.cbox { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; display: grid; gap: 10px; }
.cbox h4 { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 14px; }

/* — صفحة المشاريع — */
.ph-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { display: grid; gap: 2px; text-align: start; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; min-width: 0; position: relative; }
button.kpi:hover { border-color: var(--navy); }
.kpi b { font-size: 24px; line-height: 1.15; color: var(--ink); }
.kpi b.small { font-size: 15px; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 700; }
.kpi small { font-size: 11.5px; color: var(--muted); }
.kpi.magenta:not(.zero) b { color: var(--magenta); }
.kpi.gold:not(.zero) b { color: var(--gold-ink, #A87A00); }
.kpi.navy:not(.zero) b { color: var(--navy); }
.kpi.zero { opacity: .65; }
.kpi.on { border: 2px solid var(--ink); padding: 11px 13px; opacity: 1; }
.kpi.info { cursor: default; }
.kpi.info.late b { color: var(--magenta); }
.kpi .bar, .pc-prog .bar { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.kpi .bar i, .pc-prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--magenta)); border-radius: 6px; }
.pfilters { display: grid; gap: 10px; margin-bottom: 14px; }
.pf-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pf-row select { width: auto; max-width: 100%; min-height: 40px; }
.pf-row .seg { margin-inline-start: auto; }
.activef { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pcard { display: grid; gap: 10px; align-content: start; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; text-decoration: none; color: inherit; position: relative; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pcard::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--green); }
.pcard.h-warn::before { background: var(--gold); }
.pcard.h-bad::before { background: var(--magenta); }
.pcard:hover { border-color: var(--navy); box-shadow: 0 4px 16px rgba(31, 58, 110, .1); transform: translateY(-1px); }
.pc-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pc-top h3 { font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.pc-client { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pc-stage { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-prog { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.pc-prog .bar { margin: 0; }
.pc-prog b { color: var(--ink); }
.pc-alerts { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-pin { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; background: var(--gold-tint); color: var(--text); border-radius: 10px; padding: 6px 10px; }
.pc-pin span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; color: var(--muted); }
.pc-next { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--text); }
.pc-next span { display: inline-flex; gap: 6px; align-items: center; }
.pc-next.late { color: var(--magenta); }
.pc-ops { display: inline-flex; gap: 6px; align-items: center; }
.pc-ops .av { width: 24px; height: 24px; font-size: 10px; }

/* — صفحة المشروع — */
.phead { gap: 12px; }
.ph-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.ph-t { flex: 1 1 260px; min-width: 0; }
.ph-t h1 { font-size: 22px; overflow-wrap: anywhere; }
.ph-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 14px; }
.qlinks { display: flex; gap: 8px; flex-wrap: wrap; }
.qlink { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 13.5px; text-decoration: none; cursor: pointer; font-family: inherit; }
.qlink:hover { border-color: var(--navy); }
.qlink.add { border-style: dashed; color: var(--muted); background: transparent; }
.phead .fold { margin: 0; }
.kpis.prj { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.kpis.prj .progress { grid-column: span 2; cursor: default; }
.pgrid2 { display: grid; gap: 16px; }
.pgrid2 > * { min-width: 0; }
.pside { display: grid; gap: 14px; align-content: start; }
@media (min-width: 980px) {
  .pgrid2 { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
  .pside { position: sticky; top: 80px; }
  .pin-top { display: none; }
}
@media (max-width: 979px) { .pin-side, .pin-empty { display: none; } }
.pincard { background: var(--gold-tint); border: 1px solid var(--gold); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; }
.pside .pincard { margin: 0; }
.pincard.t-alert { background: var(--magenta-tint); border-color: var(--magenta); }
.pincard.t-decision { background: var(--green-tint); border-color: var(--green); }
.pincard.t-client { background: var(--navy-tint, #EEF2FB); border-color: var(--navy); }
.pincard .pc-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.pincard .pc-h .linkbtn { margin-inline-start: auto; }
.pincard p { margin: 6px 0 0; white-space: pre-wrap; font-size: 14.5px; color: var(--ink); }
.pin-empty { display: flex; gap: 8px; align-items: center; justify-content: center; border: 1.5px dashed var(--line); border-radius: 16px; background: transparent; color: var(--muted); padding: 12px; cursor: pointer; font: inherit; font-weight: 700; }
.pin-empty:hover { border-color: var(--gold); color: var(--ink); }
.teamp .list { margin-top: 8px; }
.item.tight { min-height: 0; padding: 8px 2px; gap: 10px; }
.item.tight .body { border: 0; background: none; text-align: start; cursor: pointer; padding: 0; font: inherit; color: inherit; min-width: 0; flex: 1; }
.tabs .tabn { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-inline-start: 6px; border-radius: 999px; background: var(--surface); font-size: 11.5px; color: var(--muted); }
.tabs button[aria-selected="true"] .tabn { background: var(--magenta); color: #fff; }
.qadd { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1.5px dashed var(--line); border-radius: 14px; padding: 6px 8px 6px 12px; margin-bottom: 12px; }
.qadd:focus-within { border-color: var(--navy); border-style: solid; }
.qadd > .ic { color: var(--muted); flex: none; }
.qadd input[name=t] { flex: 1; border: 0; background: transparent; min-width: 0; padding-inline: 4px; }
.qadd input[name=t]:focus { outline: none; box-shadow: none; }
.qadd select, .qadd input[type=date] { width: auto; max-width: 150px; min-height: 36px; font-size: 13px; }
@media (max-width: 560px) { .qadd { flex-wrap: wrap; } .qadd input[name=t] { flex-basis: calc(100% - 40px); } .qadd select { flex: 1; max-width: none; } }
.tcontrols { display: grid; gap: 10px; margin-bottom: 12px; }
.tc-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search.sm { min-width: 160px; }
.search.sm input { min-height: 40px; }
.search.sm .ic { top: 12px; }
.fchips .chip { min-height: 32px; font-size: 13px; padding: 0 12px; }
.fchips .chip.warn:not([aria-pressed="true"]) { border-color: var(--magenta); color: var(--magenta); }
.fchips .check { min-height: 32px; margin-inline-start: auto; }
.phase-hw { display: flex; align-items: center; gap: 8px; }
.phase-hw .phase-h { flex: 1; min-width: 0; }
.phase-h .av { width: 26px; height: 26px; font-size: 11px; }
.wa-all { flex: none; color: #128C4A; }
.phase.warnbox .phase-h h3 { color: var(--magenta); }
.item.task.is-late .ttl { color: var(--magenta); }
.sub .nowho { color: var(--gold-ink, #A87A00); font-weight: 700; }
.ind { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 0 7px; }
.ind.ok { color: var(--green); border: 1px solid transparent; background: var(--green-tint); }
.note-new { display: grid; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 14px; }
.nn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nn-row .btn { margin-inline-start: auto; }
.tagseg button { min-height: 32px; font-size: 13px; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.note.t-alert { border-color: var(--magenta); }
.note.t-decision { border-color: var(--green); }
.note.t-client { border-color: var(--navy); }
.note .nb { flex: 1; min-width: 0; }
.nm { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.nm b { color: var(--ink); font-size: 13.5px; }
.note p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.pagehead .t { flex: 1 1 240px; }
@media (max-width: 640px) {
  .kpis.prj, .kpis.pkpis { display: flex; overflow-x: auto; scrollbar-width: none; gap: 8px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .kpis.prj::-webkit-scrollbar, .kpis.pkpis::-webkit-scrollbar { display: none; }
  .kpis.prj .kpi, .kpis.pkpis .kpi { flex: 0 0 auto; min-width: 104px; padding: 9px 12px; border-radius: 14px; }
  .kpis.prj .kpi.on, .kpis.pkpis .kpi.on { padding: 8px 11px; }
  .kpis.prj .kpi b, .kpis.pkpis .kpi b { font-size: 20px; }
  .kpis.prj .progress { min-width: 170px; }
}

/* ========== 2.5: الخطة العامة واعتماد المواد على دفعات ========== */
.prewrap { white-space: pre-wrap; }
.plansum { display: grid; gap: 8px; margin: 8px 0; }
.phlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.phlist li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14px; padding: 6px 10px; background: var(--bg); border-radius: 10px; }
.phlist li span { color: var(--muted); font-size: 13px; }
.phlist li small { margin-inline-start: auto; color: var(--muted); }
.checklist { list-style: none; margin: 12px 0 4px; padding: 0; display: grid; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; padding: 8px 10px; border-radius: 12px; background: var(--surface); }
.checklist li > span:nth-child(2) { flex: 1; min-width: 0; }
.checklist .ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--magenta); display: grid; place-items: center; flex: none; }
.checklist li.ok .ck { border-color: var(--green); background: var(--green); color: #fff; }
.checklist li.opt .ck { border-color: var(--line); border-style: dashed; }
.phedit { display: grid; gap: 8px; }
.phrow { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 560px) { .phrow { grid-template-columns: 1fr 1fr auto; } .phrow > :first-child { grid-column: 1 / -1; } }
.panel.queue { margin-bottom: 12px; }
.qprev { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.qprev li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.qprev li span { color: var(--muted); font-size: 13px; }
.panel.ok.slim { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 700; color: var(--green); }
.panel.exec h3 { font-size: 15px; }
.rlist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.rlist li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--bg); }
.rlist li > input { width: 20px; height: 20px; min-height: 0; flex: none; accent-color: var(--navy); }
.rlist .rb { flex: 1 1 200px; min-width: 0; }
.rlist .rb b { color: var(--ink); }
.rlist .ra { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ========== 2.6: ربط المحتوى بالمشروع ========== */
.ctab { display: grid; gap: 14px; }
.csec .chip.static { display: inline-flex; gap: 6px; align-items: center; }
.list.cards { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); overflow: hidden; }
.list.cards .item { border: 0; border-top: 1px solid var(--line); background: none; width: 100%; text-align: start; cursor: pointer; font: inherit; color: inherit; }
.list.cards .item:first-child { border-top: 0; }
.linkbox { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; background: var(--navy-tint, #EEF2FB); border-radius: 14px; padding: 10px 12px; margin: 6px 0 12px; }
.linkbox > div:nth-child(2) { flex: 1 1 200px; min-width: 0; }
.linkbox .acts { display: flex; gap: 6px; }
.tlinks .item.tight .sub a { color: var(--navy); font-weight: 700; text-decoration: none; }
label.item.tight { cursor: pointer; }
label.item.tight input { width: 20px; height: 20px; min-height: 0; accent-color: var(--navy); }

/* ========== 2.7: الجدول الزمني بدون سحب ========== */
.g-ctl { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.g-nav { display: flex; gap: 4px; align-items: center; }
.gantt.fit { overflow: hidden; }
.gantt.fit .g-row { grid-template-columns: minmax(110px, 190px) minmax(0, 1fr); }
.gantt.fit .g-track { position: relative; min-width: 0; }
.gantt.fit .g-name { position: static; }
.g-lbl { font-weight: 700; color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-head span { transform: translateX(50%); }
.g-head span.first { transform: none; }
.g-head .g-tl { top: 18px; color: var(--magenta); font-weight: 700; font-size: 11px; }
.g-head .g-mark { top: 18px; color: var(--gold-ink, #A87A00); font-weight: 700; font-size: 11px; }
.g-hrow .g-name small { font-size: 11px; }
.g-bar.cut-s { border-start-start-radius: 0; border-end-start-radius: 0; border-inline-start-style: dashed; }
.g-bar.cut-e { border-start-end-radius: 0; border-end-end-radius: 0; border-inline-end-style: dashed; }
.g-out { position: absolute; top: 15px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.g-out.before { inset-inline-start: 6px; }
.g-out.after { inset-inline-end: 6px; }
@media (max-width: 560px) {
  .gantt.fit .g-row { grid-template-columns: 104px minmax(0, 1fr); }
  .gantt.fit .g-name { padding: 6px 8px; }
  .gantt.fit .g-name a, .g-lbl { font-size: 12.5px; }
  .gantt.fit .g-name small { font-size: 10.5px; }
  .g-head { font-size: 10.5px; }
}
@media (max-width: 760px) { .g-head.dense span.tk:nth-of-type(2n) { display: none; } }
/* صفحة المهام */
.todo.ptask { border-inline-start: 4px solid var(--navy); }
.todo.ptask.fix { border-color: var(--magenta); }
.todo-group.warn > h3 { color: var(--magenta); }
.todo-search { max-width: 280px; }
.selbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.selwrap { display: flex; gap: 10px; align-items: flex-start; }
.selwrap > input { width: 22px; height: 22px; min-height: 0; margin-top: 14px; flex: none; accent-color: var(--navy); }
.selwrap > .todo { flex: 1; min-width: 0; }
details.person { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
details.person > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; list-style: none; }
details.person > summary::-webkit-details-marker { display: none; }
details.person[open] > summary { margin-bottom: 10px; }
details.person > summary .small { margin-inline-start: auto; }
/* خطة المحتوى داخل المشروع */
.mbar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.mbar::-webkit-scrollbar { display: none; }
.mbar button { flex: 0 0 auto; display: grid; gap: 2px; justify-items: start; min-width: 92px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font: inherit; color: var(--text); position: relative; text-align: start; }
.mbar button b { color: var(--ink); font-size: 14px; }
.mbar button small { font-size: 11.5px; color: var(--muted); }
.mbar button[aria-pressed="true"] { border: 2px solid var(--navy); padding: 7px 11px; }
.mbar .mdot { position: absolute; top: 10px; inset-inline-end: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.mbar .mdot.green { background: var(--green); } .mbar .mdot.gold { background: var(--gold); } .mbar .mdot.muted { background: var(--muted); }
.planbox { display: grid; gap: 10px; }
.planbox .sec-h { flex-wrap: wrap; gap: 8px; }
.plan-goals { margin: 0; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.plan-prog { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.plan-prog .bar { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.plan-prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--magenta)); }
.chip.static.ok { border-color: var(--green); color: var(--green); }
.plan-empty .acts { margin-top: 8px; }
.gantt.fit .g-track { overflow: hidden; }
.g-out { max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; }

/* الحساب الموحد: هوية واحدة ومنصاتها */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.acard { display: flex; flex-direction: column; gap: 10px; text-align: start; padding: 14px; border: 1px solid var(--line); border-inline-start: 4px solid var(--ac); border-radius: var(--r); background: var(--bg); color: inherit; cursor: pointer; font: inherit; }
.acard:hover { background: var(--surface); }
.ac-h { display: flex; align-items: center; gap: 8px; } .ac-h b { font-size: 16px; color: var(--ink); }
.ac-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ac); flex: none; }
.ac-plats { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-p { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--surface); font-size: 13px; max-width: 100%; }
.ac-p i { font-style: normal; font-weight: 800; font-size: 11px; min-width: 24px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: var(--navy-tint); color: var(--navy-ink); }
.ac-p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-f { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; color: var(--muted); }
.ac-n { flex-basis: 100%; }
.plrows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.plrow { display: grid; grid-template-columns: 76px 1fr auto auto; gap: 6px; align-items: center; }
.plrow .pl-n { font-weight: 700; font-size: 14px; }
.accgroups { display: flex; flex-direction: column; gap: 8px; }
.accg { padding: 8px; border: 1px dashed var(--line); border-radius: 12px; }
.chip.gchip { display: inline-flex; align-items: center; gap: 6px; }

/* الخدمات والقوالب */
.tplrows { display: flex; flex-direction: column; gap: 6px; }
.tplrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 150px) auto auto auto auto; gap: 4px; align-items: center; }
.tplrow.c { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 130px) auto auto auto; }
.tplrow .num { font-size: 12px; color: var(--muted); text-align: center; }
.tplrow .iconbtn { width: 34px; height: 34px; }
.tplrow select, .tplrow input { min-height: 40px; }
.tplchk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tplchk input { width: 16px; height: 16px; min-height: 0; accent-color: var(--gold); }
.tplphases { display: flex; flex-direction: column; gap: 10px; }
.tplphase { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.tplph-h { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: 4px; align-items: center; }
.tplph-h > input { font-weight: 700; }
.tpldays { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.tpldays input { width: 64px; text-align: center; }
@media (max-width: 560px) {
  .tplrow { grid-template-columns: 18px minmax(0, 1fr) auto auto auto; }
  .tplrow.c { grid-template-columns: 18px minmax(0, 1fr) auto auto auto; }
  .tplrow > select, .tplrow > .tplchk { grid-column: 2 / -1; grid-row: 2; }
  .tplrow > .tplchk { grid-row: 3; }
  .tplph-h { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .tplph-h .tpldays { grid-column: 1 / -1; grid-row: 2; }
}
.shoot-del { display: inline-flex; align-items: center; gap: 4px; }
fieldset.shootdel { margin: 4px 0 12px; border: 1px solid var(--line); }
fieldset.shootdel legend { font-weight: 800; padding: 0 6px; display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }

/* المالية */
.fin2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.fintbl td:nth-child(2), .fintbl th:nth-child(2) { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fintbl tr.tot td { font-weight: 900; color: var(--ink); border-top: 2px solid var(--line); }
.fintbl td select { min-height: 34px; padding: 4px 8px; font-size: 13px; }
.neg { color: var(--magenta) !important; }
.kpi.warn b { color: var(--magenta); }
.catbars { display: grid; gap: 8px; margin-top: 8px; }
.cb { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.cb .bar { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.cb .bar i { display: block; height: 100%; background: var(--navy); border-radius: 8px; }
.finlist .item .end { flex-direction: column; align-items: flex-end; gap: 2px; text-align: end; }
.finlist .item .end b { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.finlist .item .end small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.finrow .bar { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin-top: 8px; max-width: 360px; }
.finrow .bar i { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.finrow .bar.near i { background: var(--gold); } .finrow .bar.over i { background: var(--magenta); }
.selrow { gap: 10px; }
.selrow .bodybtn { border: 0; background: none; text-align: start; padding: 0; cursor: pointer; flex: 1; min-width: 0; font: inherit; color: inherit; }
.ms-auto { margin-inline-start: auto; }
.fin-h { margin: 16px 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.autoprice { padding: 10px 12px; border-radius: 10px; background: var(--surface); margin: -4px 0 12px; font-size: 14px; }
.pctgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0 10px; }
.pricegrp table { margin-bottom: 4px; }
.impprev { margin-top: 12px; }
.impprev .item select { max-width: 220px; min-height: 38px; }
form.inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
form.inline .field { flex: 1; min-width: 180px; margin: 0; }
@media (max-width: 560px) { .impprev .item { flex-wrap: wrap; } .impprev .item .end { width: 100%; } .impprev .item select { max-width: none; } .row3 { grid-template-columns: 1fr; } }
.fppick { display: grid; gap: 8px; }
.newfp { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.newfp select { width: auto; }
.dupbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dupbar p { margin: 2px 0 0; }

/* اختصارات الرئيسية */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 14px 0 18px; }
.sc { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); text-decoration: none; text-align: center; min-width: 0; }
.sc:hover { background: var(--surface); }
.sc-i { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--navy-tint); color: var(--navy-ink); }
.sc-i .badge { position: absolute; top: -6px; inset-inline-start: auto; inset-inline-end: -8px; }
.sc-n { font-size: 12.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 560px) { .shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .sc { padding: 10px 2px; } .sc-n { font-size: 11.5px; } }
.btn.wa { color: #128C4A; }

/* عروض الأسعار */
.qhead, .qline { display: grid; grid-template-columns: minmax(0, 2.4fr) 70px minmax(0, 1fr) 100px 40px; gap: 6px; align-items: center; }
.qhead { font-size: 12px; color: var(--muted); font-weight: 700; padding: 0 2px 4px; }
.qlines { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.qline input { min-height: 40px; }
.qtot { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface); margin: 4px 0 14px; }
.qtot div { display: flex; justify-content: space-between; gap: 10px; } .qtot span { color: var(--muted); } .qtot b { font-variant-numeric: tabular-nums; color: var(--ink); }
.qtot .big b { font-size: 20px; color: var(--navy-ink); } .qtot .big span { color: var(--ink); font-weight: 700; }
.pricegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }
.money.rep small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 560px) {
  .qhead { display: none; }
  .qline { grid-template-columns: 1fr 1fr 1fr 40px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
  .qline > input:first-child { grid-column: 1 / -1; }
}

/* ——— لمسات بصرية خفيفة (CSS بس، بدون صور ولا مكتبات) ——— */
:root { --shadow: 0 1px 2px rgba(31, 58, 110, .05), 0 8px 24px -14px rgba(31, 58, 110, .22); --shadow-h: 0 2px 4px rgba(31, 58, 110, .06), 0 14px 30px -14px rgba(31, 58, 110, .32); --ease: cubic-bezier(.2, .7, .2, 1); }
:root[data-theme="dark"] { --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px -16px rgba(0, 0, 0, .7); --shadow-h: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 32px -14px rgba(0, 0, 0, .8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px -16px rgba(0, 0, 0, .7); --shadow-h: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 32px -14px rgba(0, 0, 0, .8); } }
body { background:
  radial-gradient(900px 380px at 100% -80px, var(--navy-tint), transparent 70%),
  radial-gradient(700px 320px at 0% -60px, var(--magenta-tint), transparent 70%) no-repeat, var(--bg); background-repeat: no-repeat; }
.main .list, .main .panel:not(.soft), .bucket, .kpi, .sc, .acard, .agrid .acard { box-shadow: var(--shadow); }
.main .panel:not(.soft), .bucket { border-radius: var(--r-lg); }
.pagehead h1 { position: relative; padding-bottom: 6px; }
.pagehead h1::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 38px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--magenta), var(--navy)); }
.btn, .chip, .sc, .kpi, .item, .acard, .iconbtn { transition: background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease), color .18s; }
.btn.primary { background: linear-gradient(135deg, var(--navy), color-mix(in srgb, var(--navy) 78%, var(--magenta))); border-color: transparent; box-shadow: 0 6px 14px -8px var(--navy); }
.btn.primary:hover { filter: brightness(1.06); }
.btn:active, .chip:active, .sc:active, .kpi:active { transform: scale(.98); }
.sc:hover, .kpi:hover, .acard:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.sc-i { background: linear-gradient(135deg, var(--navy-tint), var(--magenta-tint)); }
.sec-h h2::before, .section > h2::before { content: ""; display: inline-block; width: 6px; height: 16px; border-radius: 3px; background: linear-gradient(var(--magenta), var(--navy)); margin-inline-end: 8px; vertical-align: -2px; }
.tabs button[aria-selected="true"] { border-image: linear-gradient(90deg, var(--magenta), var(--navy)) 1; border-bottom-width: 2.5px; border-bottom-style: solid; }
.pill { letter-spacing: .1px; }
.bottomnav { backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); background: color-mix(in srgb, var(--bg) 86%, transparent) !important; }
.bottomnav a[aria-current="page"] svg { filter: drop-shadow(0 4px 6px rgba(230, 0, 126, .35)); }
.topbar { backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
/* تحميل: هيكل نابض بدل نص بس */
.loading { position: relative; }
.loading::after { content: ""; display: block; height: 10px; max-width: 260px; margin: 14px auto 0; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
/* دخول ناعم للصفحات */
#main > * { animation: rise .28s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.empty img { animation: float 3.2s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.panel + .panel { margin-top: 14px; }
.pagehead .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pagehead .acts select { width: auto; min-width: 150px; }

/* تقويم لكل حساب */
.accbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; scrollbar-width: thin; }
.accchip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.accchip i { width: 10px; height: 10px; border-radius: 50%; background: var(--ac, var(--navy)); }
.accchip[aria-pressed="true"] { background: var(--ac, var(--navy)); border-color: transparent; color: #fff; }
.accchip[aria-pressed="true"] i { background: #fff; }

/* مهام التصوير بالخطوات */
.ssteps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; list-style: none; padding: 0; margin: 0 0 14px; counter-reset: s; }
.ssteps li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; position: relative; }
.ssteps li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 13px; z-index: 1; }
.ssteps li::before { content: ""; position: absolute; top: 14px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--surface-2); }
.ssteps li:first-child::before { display: none; }
.ssteps li.done span { background: var(--green); color: #fff; } .ssteps li.done::before, .ssteps li.cur::before { background: var(--green); }
.ssteps li.cur { color: var(--ink); } .ssteps li.cur span { background: linear-gradient(135deg, var(--magenta), var(--navy)); color: #fff; box-shadow: 0 4px 10px -4px var(--magenta); }
.shootview .sv-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; } .shootview .sv-head b { font-size: 18px; color: var(--ink); }
.sv-when { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 12px; border-radius: 12px; background: var(--gold-tint); color: var(--ink); font-weight: 700; margin-bottom: 12px; }
.sv-when span { display: inline-flex; align-items: center; gap: 6px; }
.shootview .bb { padding: 10px 0; border-bottom: 1px solid var(--line); } .shootview .bb h5 { margin: 0 0 4px; font-size: 13px; color: var(--muted); } .shootview .bb p { white-space: pre-wrap; color: var(--text); }
.sv-deliver { margin-top: 14px; padding: 12px; border-radius: 14px; border: 1.5px dashed var(--navy); }
.prepbox { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--navy-tint); }
.readyck { font-weight: 800; color: var(--ink); }
.shootcard.st-ready { border-inline-start: 4px solid var(--gold); } .shootcard.st-doing { border-inline-start: 4px solid var(--navy); } .shootcard.st-prep { opacity: .82; }
.notif-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 12px 14px; margin: 0 0 14px; border-radius: 14px; border: 0; cursor: pointer; font: inherit; color: #fff; background: linear-gradient(135deg, var(--magenta), var(--navy)); box-shadow: var(--shadow); }
.notif-cta span { display: flex; flex-direction: column; } .notif-cta small { opacity: .9; }
/* فحص التنبيهات */
.diag { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.diag li { padding: 10px 12px; border-radius: 10px; background: var(--soft, #F4F6FB); border-inline-start: 4px solid var(--line); line-height: 1.6; }
.diag li.ok { border-inline-start-color: #1F9D6B; } .diag li.ok b { color: #1F9D6B; }
.diag li.bad { border-inline-start-color: #E6007E; } .diag li.bad b { color: #E6007E; }
.diag li .small { margin-top: 2px; overflow-wrap: anywhere; }
/* نيون: شارة «عاجلة» على المهام المفتوحة تنبض عشان تلفت النظر */
.pill.neon { --neon: #FF8A00; color: var(--neon); background: transparent; border: 1px solid var(--neon); border-radius: 100px; animation: neon-pulse 2s ease-in-out infinite; }
@keyframes neon-pulse {
  0%, 100% { text-shadow: 0 0 4px var(--neon); box-shadow: 0 0 6px -1px var(--neon), inset 0 0 6px -2px var(--neon); }
  50% { text-shadow: 0 0 12px var(--neon), 0 0 22px var(--neon); box-shadow: 0 0 18px 0 var(--neon), inset 0 0 12px -2px var(--neon); }
}
@media (prefers-reduced-motion: reduce) { .pill.neon { animation: none; box-shadow: 0 0 8px -1px var(--neon); } }
/* سطر الترحيب اللي يكتب نفسه في شاشة الدخول */
.tw-line { min-height: 1.7em; }
.tw { white-space: nowrap; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 3px; vertical-align: -0.15em; background: #FF8A00; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
/* أدوار متعددة */
.rolepills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rolelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.rolechk { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.rolechk:has(input:checked) { border-color: var(--navy); background: var(--navy-tint); }
.rolechk input { width: 20px; height: 20px; accent-color: var(--navy); }
/* اختصارات الرئيسية: صف واحد بسيط */
.quick { display: flex; gap: 8px; margin: 12px 0 18px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.quick::-webkit-scrollbar { display: none; }
.qk { position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.qk .ic, .qk svg { color: var(--navy-ink); }
.qk .badge { position: static; margin-inline-start: 2px; }
.qk.more { background: var(--navy); border-color: var(--navy); color: #fff; }
.qk.more svg { color: #fff; }
.allpages section + section { margin-top: 14px; }
.allpages h3 { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.allpages .item { padding: 0; gap: 0; }
.ap-link { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; color: inherit; text-decoration: none; }
.ap-link .ttl { font-weight: 700; flex: 1; }
.pin { flex: none; width: 52px; min-height: 52px; border: 0; border-inline-start: 1px solid var(--line); background: none; font-size: 22px; color: var(--muted); cursor: pointer; }
.pin[aria-pressed="true"] { color: var(--gold); }
/* سجل الإنجاز */
.qk.act { background: var(--gold); border-color: var(--gold); color: var(--navy-ink, #1B2547); }
.qk.act svg { color: inherit; }
.wl-month { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wl-month b { font-size: 18px; min-width: 9em; text-align: center; }
.wl-month .iconbtn svg { transform: scaleX(-1); } .wl-month .iconbtn.flip svg { transform: none; }
.wl-kpis .kpi.gold b { color: var(--gold-ink, #8a6500); }
.wl-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.wl-filters select { width: auto; min-width: 150px; }
.wl-row { width: 100%; text-align: start; }
.wl-row .ttl .muted { font-weight: 400; }
.wl-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22em; }
.wl-hours { display: grid; gap: 4px; }
.wl-fromtasks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; padding: 10px; border-radius: 12px; background: var(--surface); }
.wl-detail { display: grid; gap: 12px; }
.wl-detail .kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.wl-detail dt { color: var(--muted); } .wl-detail dd { margin: 0; overflow-wrap: anywhere; }
.imp-map { display: grid; gap: 8px; }
.imp-map .item { gap: 10px; }
.imp-map select { width: auto; min-width: 200px; max-width: 100%; }
.imp-raw { font-size: 13px; color: var(--muted); }

/* ===================================================================
   5.0 — مساحة العمل: شريط جانبي بمجموعات + شريط علوي فيه البحث الشامل
   (الكمبيوتر). الجوال يبقى بشريطه السفلي.
   =================================================================== */
:root { --page: #F5F6FA; --r-lg: 16px; --shadow-1: 0 1px 2px rgba(20, 30, 70, .05); --shadow-pop: 0 18px 50px -12px rgba(20, 30, 70, .35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --page: #10162E; --shadow-pop: 0 18px 50px -12px rgba(0, 0, 0, .7); } }
:root[data-theme="dark"] { --page: #10162E; --shadow-pop: 0 18px 50px -12px rgba(0, 0, 0, .7); }
.card, .bucket, .panel, .list { border-radius: 14px; }
.card, .bucket { box-shadow: var(--shadow-1); }
kbd { font: 600 11px/1 system-ui, sans-serif; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); direction: ltr; white-space: nowrap; }

.wside { display: none; }
.wcol { min-width: 0; }
/* أزرار الشريط العلوي على الجوال */
.tsearch, .tbell, .tnew { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; position: relative; }
.tsearch, .tbell { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; padding: 0; }
.tsearch span, .tsearch kbd, .tnew { display: none; }
.tb { position: absolute; top: -3px; left: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold-2); color: #3A3200; font-size: 11px; line-height: 18px; font-weight: 800; }
.ab1 { gap: 8px; }

/* البحث الشامل */
.cmdk-wrap { position: fixed; inset: 0; z-index: 300; background: rgba(12, 18, 40, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); padding: max(12px, 8vh) 12px 12px; animation: fadein .12s ease; }
.cmdk { width: min(660px, 100%); margin: 0 auto; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; }
.cmdk-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-in { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--ink); padding: 6px 0; }
.cmdk-in, .cmdk-in:focus, .cmdk-in:focus-visible { outline: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important; }
.cmdk-list { overflow: auto; padding: 6px 8px 10px; }
.cmdk-gt { font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 10px 4px; }
.cmdk-r { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: start; cursor: pointer; color: var(--ink); }
.cmdk-r .ic { color: var(--muted); }
.cmdk-r .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.cmdk-r .s { color: var(--muted); font-size: 12.5px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-r[aria-selected="true"] { background: var(--navy-tint); }
.cmdk-r[aria-selected="true"] .ic { color: var(--navy); }
.cmdk-empty { padding: 28px 12px; text-align: center; color: var(--muted); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* بانتظارك */
.inbox-pop { position: fixed; z-index: 160; width: 340px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 6px; }
.inbox-pop .ih { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 12px 8px; }
.inbox-pop .ih b { color: var(--ink); font-size: 16px; }
.irow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.irow:hover, .irow:focus-visible { background: var(--surface); }
.irow .t { flex: 1; min-width: 0; }
.irow .n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 12px; line-height: 22px; text-align: center; font-weight: 700; }
.irow .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--gold); }
.irow .dot.magenta { background: var(--magenta); } .irow .dot.navy { background: var(--navy); }
.iempty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 12px 28px; color: var(--green); }
.iempty b { color: var(--ink); }
@media (max-width: 600px) { .inbox-pop { left: 12px !important; right: 12px; width: auto; } }

@media (min-width: 1024px) {
  #app.ws { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100dvh; }
  .ws .bottomnav { display: none !important; }
  /* الشريط الجانبي */
  .wside { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 18px 12px 12px; background: var(--bg); border-inline-end: 1px solid var(--line); }
  .sbrand { display: flex; align-items: center; padding: 2px 10px 10px; }
  .sbrand img { height: 34px; width: auto; }
  .ssearch { display: none; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 14px; margin-bottom: 6px; }
  .ssearch span { flex: 1; text-align: start; }
  .ssearch:hover { border-color: var(--navy); }
  .sgroups { display: flex; flex-direction: column; gap: 14px; }
  .stitle { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 0 10px 4px; letter-spacing: .2px; }
  .snav { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; border: 0; background: none; color: var(--text); text-decoration: none; font-size: 14.5px; cursor: pointer; text-align: start; position: relative; }
  .snav .ic { color: var(--muted); }
  .snav:hover { background: var(--surface); }
  .snav[aria-current="page"] { background: var(--navy-tint); color: var(--navy); font-weight: 700; }
  .snav[aria-current="page"] .ic { color: var(--navy); }
  .snav[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--magenta); }
  .snav span:not(.sbadge) { flex: 1; }
  .sbadge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--magenta); color: #fff; font-size: 11.5px; line-height: 20px; text-align: center; font-weight: 700; }
  .sfoot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
  .sme { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; padding: 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: start; color: var(--ink); }
  .sme:hover { background: var(--surface); }
  .sme .av { width: 34px; height: 34px; border-radius: 50%; background: var(--magenta); color: #fff; display: grid; place-items: center; flex: none; font-size: 15px; }
  .sme .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
  .sme .t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sme .t small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* الشريط العلوي */
  .ws .appbar { background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); color: var(--ink); border-bottom: 1px solid var(--line); padding: 10px 28px; z-index: 50; }
  .ws .ab1 { max-width: none; gap: 12px; }
  .ws .brandbar, .ws .whotxt, .ws .appbar .avatar { display: none; }
  .ws .tsearch { width: min(460px, 46%); height: 40px; border-radius: 10px; justify-content: flex-start; padding: 0 12px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
  .ws .tsearch span { display: inline; flex: 1; text-align: start; }
  .ws .tsearch kbd { display: inline; }
  .ws .tsearch:hover { border-color: var(--navy); }
  .ws .who { flex-direction: row; gap: 8px; }
  .ws .tbell { width: 40px; height: 40px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); }
  .ws .tbell:hover { border-color: var(--navy); }
  .ws .tb { background: var(--magenta); color: #fff; }
  .ws .tnew { display: inline-flex; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; font-size: 14.5px; box-shadow: 0 6px 16px -8px rgba(37, 69, 142, .7); }
  .ws .tnew:hover { filter: brightness(1.08); }
  .ws .main, .ws .main.wide { padding: 24px 28px 48px; }
  .ws .main { max-width: 1040px; }
  .ws .main.wide { max-width: 1440px; }
  /* الإضافة السريعة صارت في الشريط العلوي */
  .ws .card.day, .ws nav.quick { display: none; }
  .ws, .ws .wcol { background: var(--page); }
  .appmenu { top: auto; bottom: 72px; left: auto; inset-inline-start: 16px; }
}

body:has(#app.ws) { background: var(--page) !important; }
.avs { display: inline-flex; }
.avs .av + .av { margin-inline-start: -8px; box-shadow: 0 0 0 2px var(--bg); }
@media (min-width: 1024px) { #app.ws { background: linear-gradient(to left, var(--bg) 264px, var(--page) 264px); } }
/* منيو الخدمات (المحرر) والتكرار */
.me-svc .item[aria-expanded="true"] { background: var(--surface); }
.me-body { padding: 12px 14px 16px; border-top: 1px solid var(--line); background: var(--bg); }
.me-body h4 { margin: 14px 0 6px; color: var(--ink); font-size: 14.5px; }
.me-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.me-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
.mbar-save { position: sticky; bottom: 12px; z-index: 5; margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-pop); }
@media (max-width: 1023px) { .mbar-save { bottom: calc(var(--nav-h) + 12px); } }
.recur { margin: -4px 0 12px; }
.recur-box { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.recur-box .chips { margin-top: 8px; }

/* ——— الأصول والعهد ——— */
.athumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface); border: 1px solid var(--line); }
.athumb.ph { display: grid; place-items: center; color: var(--muted); }
.athumb.lg { width: 88px; height: 88px; margin-bottom: 10px; }
.arow .ttl { display: flex; gap: 6px; align-items: center; }
.ano { font-weight: 800; color: var(--navy-ink, var(--navy)); letter-spacing: .3px; }
.ahead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; }
.afilters input[type=search] { flex: 1 1 240px; }
.afilters select { flex: 0 1 150px; }
.adist { display: grid; gap: 4px; }
.adrow { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; gap: 10px; align-items: center; border: 0; background: none; padding: 6px 4px; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; text-align: start; }
.adrow:hover { background: var(--surface); }
.adrow .t { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adrow .bar { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.adrow .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--magenta)); border-radius: 8px; }
.adrow b { min-width: 24px; text-align: end; }
.agal { margin-bottom: 12px; }
.agal .amain { width: 100%; max-height: 340px; object-fit: contain; border-radius: 14px; background: var(--surface); display: block; }
.athumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.athumbs button { border: 1px solid var(--line); padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; flex: none; background: none; }
.athumbs img { width: 56px; height: 56px; object-fit: cover; display: block; }
.aphoto-empty { display: grid; place-items: center; gap: 4px; padding: 26px; border-radius: 14px; background: var(--surface); color: var(--muted); }
.awrap { flex-wrap: wrap; margin: 14px 0 6px; }
.alog { margin: 6px 0 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13.5px; }
.anohint { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.anohint b { color: var(--ink); }
.asteps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; }
.asteps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 10px; border-radius: 10px; background: var(--surface); min-width: 0; }
.asteps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); flex: none; font-size: 12px; }
.asteps li.on { color: var(--ink); background: var(--navy-tint, var(--surface-2)); }
.asteps li.on span { background: var(--navy); border-color: var(--navy); color: #fff; }
.asteps li.done span { background: var(--green); border-color: var(--green); color: #fff; }
@media (max-width: 560px) { .asteps li { font-size: 0; justify-content: center; } .asteps li span { font-size: 12px; } }
.lbl { display: block; font-weight: 700; font-size: 14px; margin: 10px 0 6px; color: var(--ink); }
.apics { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.apic { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.apic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.apic .iconbtn { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; min-height: 0; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 50%; }
.apic .cover { position: absolute; bottom: 4px; inset-inline-start: 4px; font-size: 11px; font-weight: 700; background: var(--navy); color: #fff; padding: 2px 6px; border-radius: 6px; }
.apic .mk { position: absolute; inset: auto 4px 4px; font-size: 10.5px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .9); color: #111; cursor: pointer; padding: 3px; opacity: 0; transition: opacity .15s; }
.apic:hover .mk, .apic:focus-within .mk { opacity: 1; }
.apic.add { display: grid; place-items: center; align-content: center; gap: 4px; cursor: pointer; border-style: dashed; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; }
.afile { align-items: end; }
.wamsg { white-space: pre-wrap; font: inherit; font-size: 14px; background: var(--surface); padding: 12px; border-radius: 12px; margin: 8px 0 0; }
.tblwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; padding: 4px 8px; }
.atbl td.nowrap { white-space: nowrap; }
.audrow { flex-wrap: wrap; }
.audbtns .chip { min-height: 32px; padding: 0 12px; font-size: 13px; }
.audbtns .chip.green[aria-pressed="true"] { background: var(--green); border-color: var(--green); }
.audbtns .chip.magenta[aria-pressed="true"] { background: var(--magenta); border-color: var(--magenta); }
.audbtns .chip.gold[aria-pressed="true"] { background: #E0A800; border-color: #E0A800; color: #111; }
@media (max-width: 560px) { .audrow .audbtns { width: 100%; justify-content: flex-end; } }
.ain { width: 100%; border: 1px solid transparent; background: transparent; font: inherit; font-weight: 700; color: var(--ink); padding: 6px 8px; border-radius: 8px; min-height: 36px; }
.ain:hover, .ain:focus { border-color: var(--line); background: var(--bg); }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 26px; background: var(--surface-2); border: 1px solid var(--line); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.switch input:checked + span { background: var(--green); border-color: var(--green); }
.switch input:checked + span::after { inset-inline-start: 20px; }
.switch input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ——— النشر التلقائي (Postiz) ——— */
.pzbox, .dzbox { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 14px 0; background: var(--surface); }
.pzh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pzh b { margin-inline-end: auto; }
.pzbox p { margin: 4px 0; }
.pzbox .acts, .dzbox .acts { margin-top: 8px; }
.pzerr { color: var(--magenta); }
.pzwarn { color: #9A6B00; }
.pzchans { display: grid; gap: 6px; }
.pzch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pzch.off { opacity: .55; cursor: default; }
.pzch img, .pzi { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.pzi { display: inline-grid; place-items: center; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; }
.pzprev { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.pztext { white-space: pre-wrap; font-size: 14.5px; margin-top: 4px; max-height: 220px; overflow: auto; }
.pzmsgs { display: grid; gap: 2px; margin-top: 8px; }
.pzmsgs p { margin: 0; }
.pzrow { cursor: pointer; align-items: flex-start; }
.pzrow input { margin-top: 4px; }
.pzrow.off { opacity: .75; cursor: default; }
.pzlink .end select { max-width: 230px; }
@media (max-width: 560px) { .pzlink { flex-wrap: wrap; } .pzlink .end { width: 100%; } .pzlink .end select { max-width: none; width: 100%; } }

/* ——— طلبات التصميم ——— */
.dkpis { margin-bottom: 14px; }
.dboard { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(185px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; align-items: start; }
.dcol { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: grid; gap: 8px; scroll-snap-align: start; min-height: 120px; }
.dch { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
.dch b { font-size: 14px; }
.dch .count { margin-inline-start: auto; }
.dempty { text-align: center; padding: 14px 0; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.dcard { display: grid; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.dcard:hover { border-color: var(--navy); box-shadow: 0 4px 14px rgba(37, 69, 142, .1); }
.dcard.late { border-inline-start: 3px solid var(--magenta); }
.dthumb { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; background: var(--surface); }
.dct { display: flex; gap: 6px; align-items: flex-start; justify-content: space-between; }
.dct b { font-size: 14.5px; line-height: 1.45; }
.dcs { font-size: 12.5px; color: var(--muted); }
.dcf { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dncount { display: inline-flex; align-items: center; gap: 3px; color: var(--magenta); font-weight: 700; }
.dwho { margin-inline-start: auto; }
.dwho .av, .dhead .av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--navy); color: #fff; font-size: 12px; font-weight: 800; }
.dform .dtip { margin: 6px 0 0; }
.dscore { margin: 14px 0 4px; }
.dsbar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-bottom: 6px; }
.dsbar i { display: block; height: 100%; border-radius: 8px; transition: width .2s; }
.dsbar i.good { background: var(--green); } .dsbar i.mid { background: #E0A800; } .dsbar i.low { background: var(--magenta); }
.dmeta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.dmeta > span { font-size: 13.5px; color: var(--muted); }
.dhead .acts { flex-wrap: wrap; }
.dlayout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; margin-top: 8px; }
@media (max-width: 1000px) { .dlayout { grid-template-columns: 1fr; } }
.dviewer { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px; min-width: 0; }
.dviewer.dwait { display: grid; place-items: center; gap: 6px; min-height: 280px; color: var(--muted); text-align: center; }
.dvbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dvbar .btn { margin-inline-start: auto; }
.dvers button { min-width: 44px; font-weight: 800; }
.dslides { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; }
.dslides button { position: relative; border: 2px solid transparent; border-radius: 10px; padding: 0; background: none; cursor: pointer; flex: none; overflow: hidden; }
.dslides button[aria-pressed="true"] { border-color: var(--navy); }
.dslides img { width: 64px; height: 64px; object-fit: cover; display: block; }
.dslides span { position: absolute; bottom: 2px; inset-inline-start: 4px; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.dstage { position: relative; display: grid; place-items: center; background: repeating-conic-gradient(var(--surface-2) 0% 25%, transparent 0% 50%) 50% / 18px 18px; border-radius: 12px; overflow: hidden; }
.dstage img { max-width: 100%; max-height: 72vh; display: block; user-select: none; }
.dstage.pinnable img { cursor: crosshair; }
.dpin { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50% 50% 50% 4px; background: var(--magenta); color: #fff; border: 2px solid #fff; font: 800 12px/1 inherit; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer; padding: 0; z-index: 2; }
.dpin.done { background: var(--green); }
.dpin.draft { background: var(--navy); animation: dpulse 1.2s infinite; }
@keyframes dpulse { 50% { box-shadow: 0 0 0 8px rgba(37, 69, 142, .2); } }
.dpin.sm { position: static; transform: none; width: 24px; height: 24px; flex: none; font-size: 11px; box-shadow: none; }
.dpin.sm.gen { background: var(--navy); }
.dcompare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .dcompare { grid-template-columns: 1fr; } }
.dhint { margin: 8px 0 0; }
.dvnote { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 14px; }
.dside { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
@media (max-width: 1000px) { .dside { position: static; max-height: none; } }
.dside .tabs { margin-bottom: 10px; }
.dnotes { display: grid; gap: 8px; }
.dnote { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.dnote.done { opacity: .6; }
.dnote.done .dtext { text-decoration: line-through; }
.dnote .body { flex: 1; min-width: 0; }
.dtext { white-space: pre-wrap; font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.dok { color: var(--green); font-weight: 700; margin-top: 2px; }
.dchk input { width: 20px; height: 20px; margin: 2px 0 0; cursor: pointer; }
.dsep { font-size: 12px; font-weight: 800; color: var(--muted); margin-top: 6px; }
.dcompose { display: grid; gap: 6px; margin-top: 6px; position: sticky; bottom: 0; background: var(--bg); padding-top: 6px; }
.dcompose .btn { justify-self: end; }
.dpinhint { display: flex; align-items: center; gap: 6px; }
.dblock { margin-top: 12px; }
.dpre { white-space: pre-wrap; font: inherit; font-size: 14px; background: var(--surface); padding: 10px 12px; border-radius: 12px; margin: 6px 0 0; }
.dfix { display: grid; gap: 6px; max-height: 220px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }

/* ——— صفحة المشروع 5.5: المراحل الأربع، نظرة عامة، الأيام الجاية، التسليمات ——— */
.fold.ph4 { gap: 6px; overflow: visible; padding: 6px 0 2px; }
.fold.ph4 .st { clip-path: none; margin: 0; flex: 1 1 0; min-width: 0; height: auto; min-height: 52px; border-radius: 12px; padding: 8px 10px; flex-direction: column; gap: 2px; white-space: normal; text-align: center; }
.fold.ph4 .st:first-child { clip-path: none; padding-inline-start: 10px; }
.fold.ph4 .st .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.fold.ph4 .st.done .n { background: var(--navy); color: #fff; border-color: var(--navy); }
.fold.ph4 .st.now .n { background: #fff; color: var(--navy); border-color: #fff; }
.fold.ph4 .st .t { font-size: 13.5px; }
.fold.ph4 .st small { font-size: 11px; font-weight: 600; opacity: .9; line-height: 1.3; }
.fold.ph4 .st.now.wait { background: #E0A800; color: #111; }
@media (max-width: 560px) { .fold.ph4 .st small { display: none; } .fold.ph4 .st .t { font-size: 12px; } }
.kpis.prj { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.ptabs { margin: 16px 0 14px; }
.ptab { min-width: 0; }
.pover { display: grid; gap: 14px; }
.pover > .panel, .pover > div > .panel { margin: 0; }
.ptiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .ptiles { grid-template-columns: 1fr; } }
.ptile { display: flex; gap: 10px; align-items: center; text-align: start; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, transform .15s; }
.ptile:hover { border-color: var(--navy); transform: translateY(-1px); }
.ptile .pti { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-tint, var(--surface)); color: var(--navy); flex: none; }
.ptile b { font-size: 22px; display: block; line-height: 1.1; }
.ptile span { font-size: 13px; font-weight: 700; display: block; }
.ptile small { font-size: 12px; color: var(--muted); display: block; }
.pagenda .list { gap: 0; }
.agd { font-size: 12.5px; font-weight: 800; color: var(--muted); padding: 10px 4px 4px; }
.agd.late { color: var(--magenta); }
.agr { text-decoration: none; color: inherit; }
.agi { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface); color: var(--navy); }
.agi.k-shoot { color: #B07800; background: rgba(250, 190, 10, .15); }
.agi.k-content { color: var(--green); background: rgba(18, 138, 92, .1); }
.agi.k-design { color: var(--magenta); background: rgba(230, 0, 126, .08); }
.agi.k-due { color: #fff; background: var(--navy); }
.pdes { margin-bottom: 14px; }
.pfiles .toolbar { align-items: center; }
.frow .ttl { text-decoration: none; color: inherit; }
.frow .end { display: flex; gap: 6px; align-items: center; }
.plog { margin-top: 18px; }
.nextstep { display: grid; gap: 12px; }
.nextstep > .panel { margin: 0; }
.readyrow { display: grid; gap: 6px; margin: 8px 0 4px; }
.okline { color: var(--green); display: flex; align-items: center; gap: 4px; margin: 6px 0; }
.qlink.up { background: var(--navy); border-color: var(--navy); color: #fff; }
.qlink.up:hover { filter: brightness(1.1); }
.pagenda .agr { padding-block: 8px; min-height: 0; }

/* ——— مسار الإنتاج 5.6 ——— */
.kw { display: grid; gap: 10px; }
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.kcount { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); transition: border-color .15s, background .15s; }
.kcount.on { border-color: var(--navy); background: var(--navy-tint, var(--surface)); }
.kic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--navy); flex: none; }
.kt { flex: 1; min-width: 0; display: grid; }
.kt b { font-size: 14px; } .kt small { font-size: 11.5px; color: var(--muted); }
.kstep { display: flex; align-items: center; gap: 4px; }
.kstep .iconbtn { width: 32px; height: 32px; min-height: 0; border-radius: 10px; border: 1px solid var(--line); font-size: 18px; font-weight: 800; }
.kn { min-width: 24px; text-align: center; font-size: 17px; }
.kshoot { border-style: dashed; }
.ksum { font-weight: 800; color: var(--navy); padding: 8px 2px; }
.kick h3 { margin-bottom: 4px; }
.pboard { display: grid; gap: 12px; }
.pbhead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pbstats { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.pbs { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 700; color: var(--muted); }
.pbs b { color: var(--ink); font-size: 15px; }
.pbs.hot { background: rgba(230, 0, 126, .1); color: var(--magenta); }
.ptable-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.ptable { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 520px; }
.ptable th, .ptable td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center; font-size: 12.5px; }
.ptable thead th { color: var(--muted); font-weight: 800; background: var(--surface); position: sticky; top: 0; }
.ptable tr:last-child > * { border-bottom: 0; }
.ptable .prow { text-align: start; min-width: 170px; position: sticky; inset-inline-start: 0; background: var(--bg); }
.ptable .prow .linkbtn { font-weight: 800; color: var(--ink); text-align: start; }
.ptable .prow small { display: block; color: var(--muted); font-weight: 600; }
.pcell.na { background: repeating-linear-gradient(45deg, transparent 0 6px, var(--surface) 6px 7px); }
.pchip { width: 36px; height: 36px; border-radius: 12px; border: 0; display: inline-grid; place-items: center; cursor: pointer; font: inherit; background: var(--surface); color: var(--muted); transition: transform .12s; }
.pchip:hover { transform: scale(1.08); }
.pchip.s-todo, i.s-todo { background: #FFF1C2; color: #7A5500; }
.pchip.s-doing, i.s-doing { background: var(--navy); color: #fff; }
.pchip.s-review, i.s-review { background: var(--magenta); color: #fff; }
.pchip.s-retake, i.s-retake { background: #FFD6E8; color: var(--magenta); box-shadow: inset 0 0 0 2px var(--magenta); }
.pchip.s-done, i.s-done { background: var(--green); color: #fff; }
.pchip.s-wait, i.s-wait { background: var(--surface); color: var(--muted); }
.pchip.late { box-shadow: 0 0 0 2px var(--magenta); }
.pav { font-weight: 800; font-size: 13px; }
.pav.none { opacity: .6; }
.plegend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.plegend span { display: inline-flex; gap: 5px; align-items: center; }
.plegend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.ipath { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.ipstep { flex: 1 0 110px; display: grid; gap: 2px; text-align: center; padding: 10px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; font: inherit; color: inherit; }
.ipstep b { font-size: 13px; } .ipstep small { font-size: 11.5px; }
.ipn { width: 22px; height: 22px; border-radius: 50%; margin: 0 auto 2px; display: grid; place-items: center; background: var(--surface); font-size: 12px; font-weight: 800; }
.ipstep.s-done { border-color: var(--green); } .ipstep.s-done .ipn { background: var(--green); color: #fff; }
.ipstep.s-todo, .ipstep.s-doing, .ipstep.s-review, .ipstep.s-retake { border-color: var(--navy); background: var(--navy-tint, var(--surface)); }
.ipstep.s-review .ipn, .ipstep.s-retake .ipn { background: var(--magenta); }
.ssheet { display: grid; gap: 12px; }
.shead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swho { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
.sprev, .sbr { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface); }
.sprev h4, .sbr h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.sprow { display: grid; gap: 4px; padding: 6px 0; border-top: 1px dashed var(--line); }
.sprow:first-of-type { border-top: 0; }
.sbrief { margin: 4px 0; }
.sretake { padding: 10px 12px; border-radius: 12px; background: #FFE3EF; color: #8A0048; }
.supl { display: flex; align-items: center; gap: 4px; color: var(--navy); }
.sbedit { display: grid; gap: 4px; }
.spbrief summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.mywork { margin-bottom: 18px; }
.wlist { display: grid; gap: 8px; }
.wcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; font: inherit; color: inherit; text-align: start; transition: transform .12s, border-color .12s, box-shadow .12s; }
.wcard:hover { transform: translateY(-1px); border-color: var(--navy); box-shadow: 0 6px 18px rgba(37, 69, 142, .08); }
.wcard .body { flex: 1; min-width: 0; }
.wcard .ttl { font-weight: 800; }
.wcard .sub { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; font-size: 13px; }
.wic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; background: #FFF1C2; color: #7A5500; }
.wcard.s-doing .wic { background: var(--navy); color: #fff; }
.wcard.s-retake .wic, .wcard.s-review .wic { background: #FFE3EF; color: var(--magenta); }
.wcard.s-wait { opacity: .75; } .wcard.s-wait .wic { background: var(--surface); color: var(--muted); }
.wcard.s-done .wic { background: rgba(18, 138, 92, .12); color: var(--green); }
.wlater summary { cursor: pointer; font-weight: 700; color: var(--muted); margin: 10px 0 8px; }
.psum .pflow { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pfs { flex: 1 0 70px; display: grid; justify-items: center; padding: 8px 6px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; }
.pfs b { font-size: 18px; color: var(--muted); }
.pfs.on { background: var(--navy-tint, var(--surface)); color: var(--navy); } .pfs.on b { color: var(--navy); }
.shitems { margin: 4px 0 10px; padding-inline-start: 18px; display: grid; gap: 6px; }
.rolelist.skills .rolechk { border-style: dashed; }

/* ——— نسيج: المالية قراءة فقط ——— */
.finro .btn.primary, .finro .btn.sm, .finro .iconbtn[aria-label*="تعديل"], .finro .iconbtn[aria-label*="حذف"], .finro .linkbtn[data-edit],
body.ro-fin .sheet-foot .btn.primary, body.ro-fin .sheet-foot .btn.danger, body.ro-fin .sheet form button[type="submit"] { display: none !important; }
body.ro-fin .sheet input, body.ro-fin .sheet select, body.ro-fin .sheet textarea { pointer-events: none; background: var(--surface); }

/* ════════ 5.6 — واجهة أبهج وأرتب: ألوان رمز في كل زاوية، بنفس الهدوء ════════ */
:root { --violet: #6A4BD8; --violet-tint: rgba(106, 75, 216, .1); --grad: linear-gradient(135deg, #25458E 0%, #3A3FA8 55%, #6A2FA0 100%); --grad-warm: linear-gradient(135deg, #E6007E, #FF6A3D); }
:root[data-theme="dark"] { --violet: #9C85FF; --violet-tint: rgba(156, 133, 255, .16); --grad: linear-gradient(135deg, #1D2D6B 0%, #2C2C82 55%, #4C2175 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --violet: #9C85FF; --violet-tint: rgba(156, 133, 255, .16); --grad: linear-gradient(135deg, #1D2D6B 0%, #2C2C82 55%, #4C2175 100%); } }

/* خلفية فيها دفء خفيف من ألوان الشعار */
body:has(#app.ws) { background:
  radial-gradient(900px 420px at 100% -120px, rgba(230, 0, 126, .07), transparent 70%),
  radial-gradient(800px 380px at 0% -80px, rgba(250, 190, 10, .09), transparent 70%),
  var(--page) !important; background-attachment: fixed !important; }
.ws, .ws .wcol { background: transparent; }

/* الأزرار: الأساسي بتدرج رمز وظل ناعم */
.btn { border-radius: 11px; transition: transform .15s var(--ease, ease), box-shadow .15s, background .15s; }
.btn.primary { background: var(--grad); border-color: transparent; box-shadow: 0 8px 18px -10px rgba(58, 63, 168, .8); }
.btn.primary:hover { background: var(--grad); filter: brightness(1.08); transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0); }
.ws .tnew { background: var(--grad); }

/* الشريط الجانبي: كل مجموعة بلونها، والأيقونة في كبسولة */
@media (min-width: 1024px) {
  .wside { background: color-mix(in srgb, var(--bg) 92%, transparent); }
  .sgroup { --tone: var(--navy); --tone-tint: var(--navy-tint); }
  .sgroup.t-magenta { --tone: var(--magenta); --tone-tint: var(--magenta-tint); }
  .sgroup.t-gold { --tone: #C99500; --tone-tint: var(--gold-tint); }
  .sgroup.t-green { --tone: var(--green); --tone-tint: var(--green-tint); }
  .sgroup.t-violet { --tone: var(--violet); --tone-tint: var(--violet-tint); }
  .stitle { display: flex; align-items: center; gap: 6px; color: var(--tone); opacity: .85; }
  .stitle::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
  .snav { padding: 6px 8px; gap: 10px; transition: background .15s; }
  .snav .sic { flex: 0 0 30px !important; }
  .sic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--tone-tint); color: var(--tone); transition: transform .2s var(--ease, ease), background .2s, color .2s; }
  .sic .ic { color: inherit !important; }
  .snav:hover .sic { transform: scale(1.06) rotate(-4deg); }
  .snav[aria-current="page"] { background: var(--tone-tint); color: var(--ink); }
  .snav[aria-current="page"] .sic { background: var(--tone); color: #fff; box-shadow: 0 6px 14px -6px var(--tone); }
  .snav[aria-current="page"]::before { background: var(--tone); inset-inline-start: -12px; }
  .sfoot .snav .ic { margin-inline: 5px; }
}

/* البطاقة الترحيبية: تدرج رمز + طائر الشعار كعلامة مائية + أرقام بأيقونات ملوّنة */
.card.hero { position: relative; overflow: hidden; background: var(--grad); border-radius: 22px; padding: 20px; box-shadow: 0 18px 40px -22px rgba(42, 47, 140, .9); isolation: isolate; }
.card.hero::before { content: ""; position: absolute; inset-inline-start: -40px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(230, 0, 126, .45), transparent 65%); z-index: -1; }
.card.hero::after { content: ""; position: absolute; inset-inline-end: 22px; top: 14px; width: 96px; height: 96px; background: url("../assets/img/bird.png") center/contain no-repeat; opacity: .16; transform: rotate(-10deg); z-index: -1; }
@media (max-width: 600px) { .card.hero::after { width: 64px; height: 64px; top: 12px; inset-inline-end: 14px; } }
.card.hero h1 { font-size: 27px; }
.tile { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(6px); padding: 12px 14px; transition: transform .2s var(--ease, ease), background .2s; }
.tile:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .17); }
.tile .tic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 6px; color: #fff; }
.tile.tn0 .tic { background: linear-gradient(135deg, #4F7BE8, #25458E); }
.tile.tn1 .tic { background: linear-gradient(135deg, #FFD610, #FA9E0A); color: #3A2A00; }
.tile.tn2 .tic { background: linear-gradient(135deg, #FF4FA8, #E6007E); }
.tile.tn3 .tic { background: linear-gradient(135deg, #3CC48D, #128A5C); }

/* صناديق الرئيسية: شبكة عمودين على الكمبيوتر، وكل صندوق له شريط لون حسب نوعه */
.bucket { --tone: var(--navy); border-top: 3px solid var(--tone); transition: box-shadow .2s; }
.bucket:has(> h3 .dot.magenta) { --tone: var(--magenta); }
.bucket:has(> h3 .dot.gold) { --tone: var(--gold); }
.bucket:has(> h3 .dot.green) { --tone: var(--green); }
.bucket > h3 .dot { width: 10px; height: 10px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent); }
.bucket:hover { box-shadow: var(--shadow-h, var(--shadow)); }
@media (min-width: 1024px) {
  .buckets.homeb { display: block; columns: 2; column-gap: 16px; }
  .buckets.homeb > * { break-inside: avoid; margin-bottom: 16px; display: inline-block; width: 100%; }
}

/* اللوحات والبطاقات: زوايا أنعم ورفعة خفيفة عند المرور */
.main .panel:not(.soft) { border-radius: 18px; }
.kpi, .sc, .wcard { transition: transform .2s var(--ease, ease), box-shadow .2s; }
.wcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-h, var(--shadow)); }

/* التبويبات: الحالي بكبسولة ناعمة فوق الخط */
.tabs { gap: 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border-radius: 10px 10px 0 0; transition: color .15s, background .15s; }
.tabs button:hover { color: var(--ink); background: var(--surface); }
.tabs button[aria-selected="true"] { background: linear-gradient(to top, var(--magenta-tint), transparent); }

/* عنوان الصفحة */
.pagehead h1 { font-size: 27px; }

/* الجوال: شريط علوي بتدرج رمز، والقائمة السفلية بكبسولة للحالي */
@media (max-width: 1023px) {
  .appbar { background: var(--grad); box-shadow: 0 10px 24px -18px rgba(42, 47, 140, .9); }
  .bottomnav { background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .bottomnav a[aria-current="page"] svg { background: var(--magenta-tint); border-radius: 999px; padding: 3px 12px; width: 46px; height: 28px; box-sizing: border-box; filter: none; }
}
