@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(250px, 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; }
