/* مركز الأعمال — تصميم هادئ، خلفية فاتحة، لون أساسي رزين، عربي من اليمين لليسار */
:root {
  /* هوية مجلس الجمعيات الأهلية: الأزرق الرئيسي والتدرج للعناصر، والكحلي للخلفيات والنص */
  --font: "BC Avenir", -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --navy: #090951; --navy-2: #111182; --navy-3: #1818A0; --sky: #42ACFD; --aqua: #7FFFFF; --royal: #1249FF;
  --grad: linear-gradient(135deg, #7FFFFF 0%, #42ACFD 45%, #1249FF 100%);
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #f6f8fd; --border: #e1e5f2; --border-2: #cbd1e8;
  --text: #090951; --muted: #545985; --faint: #64698f;
  --primary: #1249FF; --primary-600: #1818A0; --primary-50: #ebf1ff; --primary-100: #d6e2ff;
  --danger: #b42318; --danger-50: #fdeceb; --warn: #8a5a00; --warn-50: #fff3dc; --ok: #1d7448; --ok-50: #e5f4ec;
  --info: #1249FF; --info-50: #ebf1ff; --violet: #5b3fb3; --violet-50: #f0ebfb; --demo: #7a4d00; --demo-50: #fdf2d9;
  --radius: 10px; --radius-s: 7px; --shadow: 0 1px 2px rgba(9, 9, 81, .06), 0 1px 1px rgba(9, 9, 81, .03);
  --shadow-l: 0 12px 40px rgba(9, 9, 81, .22);
  --side: 252px; --top: 60px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
/* خط الهوية «أفينير العربي»: يُستخدم من الجهاز إن كان مثبتًا عليه (دون نشر ملف الخط) */
@font-face { font-family: "BC Avenir"; src: local("Avenir Arabic Medium"), local("AvenirArabic-Medium"); font-weight: 100 599; font-display: swap; }
@font-face { font-family: "BC Avenir"; src: local("Avenir Arabic Heavy"), local("AvenirArabic-Heavy"); font-weight: 600 899; font-display: swap; }
html.has-custom-font { --font: "BC Custom", "BC Avenir", -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", "Geeza Pro", "Noto Sans Arabic", Tahoma, Arial, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.has-modal { overflow: hidden; }
h1, h2, h3 { line-height: 1.35; margin: 0; font-weight: 700; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.08rem; } h3 { font-size: .98rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 .6em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.skip { position: absolute; top: -40px; right: 8px; background: var(--primary); color: #fff; padding: 6px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: .86rem; } .tiny { font-size: .76rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.center { text-align: center; justify-content: center; }
.ltr, input.ltr { direction: ltr; text-align: right; }
.ltr-inline { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.danger-text { color: var(--danger) !important; }
.grow-1 { flex: 1; }
.hidden, [hidden] { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; } .gap-s { gap: 6px; } .gap-xs { gap: 2px; }
.stack { display: flex; flex-direction: column; gap: 12px; } .stack-s { display: flex; flex-direction: column; gap: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.span2 { grid-column: span 2; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols > * { min-width: 0; }
.pad { padding: 16px; } .pad-s { padding: 8px 12px; } .pad-x { padding: 0 16px; }
.ic { flex: none; vertical-align: middle; }

/* ---------- الأزرار ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: var(--radius-s);
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-600); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--primary-50); }
.btn.sm { min-height: 32px; padding: 3px 10px; font-size: .85rem; }
.btn.block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--radius-s); border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--primary-50); color: var(--primary); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn:disabled { opacity: .35; }
.linklike { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; text-align: inherit; }
.linklike:hover { text-decoration: underline; }
.chip-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-2); background: var(--surface); border-radius: 999px; padding: 2px 10px; font-size: .8rem; cursor: pointer; min-height: 28px; }
.chip-btn:hover { border-color: var(--primary); color: var(--primary); }
.chip-btn.ghost { border-style: dashed; color: var(--muted); }

/* ---------- الحقول ---------- */
.input { width: 100%; min-height: 40px; padding: 7px 11px; border: 1px solid var(--border-2); border-radius: var(--radius-s); background: var(--surface); font-size: 16px; }
@media (min-width: 821px) { .input { font-size: .95rem; } }
.input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-100); }
.input:disabled { background: var(--surface-2); color: var(--muted); }
.input.sm { min-height: 34px; padding: 4px 9px; }
.input.lg { min-height: 48px; font-size: 1.05rem; }
.input.auto { width: auto; }
textarea.input { resize: vertical; line-height: 1.6; }
textarea.grow { resize: none; overflow: hidden; }
select.input { padding-left: 28px; }
/* حقول التاريخ تُعرض من اليسار لليمين داخليًا لتفادي قلب أجزاء التاريخ في بعض المتصفحات */
input[type="date"].input { min-width: 0; direction: ltr; text-align: right; }
input[type="date"].input::-webkit-date-and-time-value { text-align: right; }
input[type="date"][data-empty]:not(:focus)::-webkit-datetime-edit { color: transparent; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, legend { font-size: .82rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.field.private textarea { background: #fbfaf5; border-color: #e5dcc3; }
.fstate { font-weight: 500; font-size: .74rem; color: var(--muted); margin-inline-start: auto; }
.is-saving .fstate { color: var(--info); } .is-error .fstate { color: var(--danger); } .is-saved .fstate { color: var(--ok); }
.is-error > .input, .is-error > textarea { border-color: var(--danger); }
.is-dirty > .input { border-color: #d9b257; }
.conflict { background: var(--warn-50); border: 1px solid #ecd39c; border-radius: var(--radius-s); padding: 8px 10px; font-size: .85rem; display: flex; flex-direction: column; gap: 6px; }
.form-error { color: var(--danger); background: var(--danger-50); border-radius: var(--radius-s); padding: 8px 10px; font-size: .88rem; }
.form-error:empty { display: none; }
.checkline { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 32px; }
.checkline input { width: 18px; height: 18px; accent-color: var(--primary); }
.checks { display: flex; flex-direction: column; gap: 2px; }
.quick-dates { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: var(--radius-s); overflow: hidden; align-self: flex-start; }
.seg label { padding: 6px 14px; cursor: pointer; font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.seg label:has(input:checked) { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.seg input { accent-color: var(--primary); }
details > summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .9rem; padding: 4px 0; }
details.more { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 8px; }
.copybox { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 10px; font-family: ui-monospace, Menlo, monospace; font-size: .82rem; overflow-wrap: anywhere; user-select: all; }

/* ---------- الشارات ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .75rem; color: var(--muted); white-space: nowrap; line-height: 1.6; }
.chip.lg { font-size: .85rem; padding: 3px 10px; color: var(--text); }
.chip .x { border: 0; background: none; cursor: pointer; color: var(--faint); padding: 6px; margin: -6px; display: inline-flex; border-radius: 50%; }
.chip .x:hover { color: var(--danger); background: var(--danger-50); }
.chip.late { background: var(--danger-50); color: var(--danger); border-color: #f4c7c3; }
.chip.soon { background: var(--info-50); color: var(--info); border-color: #c9d9f2; }
.chip.warn { background: var(--warn-50); color: var(--warn); border-color: #f0dba9; }
.chip.ok { background: var(--ok-50); color: var(--ok); border-color: #bfe3cf; }
.chip.violet { background: var(--violet-50); color: var(--violet); border-color: #d9cdf5; }
.chip.inbox { background: #eef1f4; }
.chip.demo { background: var(--demo-50); color: var(--demo); border-color: #f0d9a6; font-weight: 600; }
.chip.private { background: #f7f2e3; color: #6b5a26; }
.chip.stage { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); }
.st { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.st-new { background: #eef1f4; color: #47525e; }
.st-in_progress { background: var(--info-50); color: var(--info); }
.st-waiting_other { background: var(--warn-50); color: var(--warn); }
.st-waiting_approval { background: var(--violet-50); color: var(--violet); }
.st-done { background: var(--ok-50); color: var(--ok); }
.st-deferred { background: #f1f2f4; color: #6a737d; border-color: #e1e4e8; }
.st-cancelled { background: #f6f6f6; color: #8b939c; text-decoration: line-through; }
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.prio i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); }
.prio-high i { background: #d1432f; } .prio-high { color: #a3321f; font-weight: 600; }
.prio-medium i { background: #d99a1e; } .prio-low i { background: #9aa5b1; }
.date { white-space: nowrap; font-size: .86rem; }
.date.late { color: var(--danger); font-weight: 700; }
.date.soon { color: var(--info); font-weight: 600; }

/* ---------- الهيكل ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; background: var(--surface); border-inline-end: 1px solid var(--border); padding: 14px 12px; display: flex; flex-direction: column; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; padding: 2px 6px; color: var(--primary-600); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand.big { justify-content: center; font-size: 1.3rem; margin-bottom: 18px; }
.brand.big img { width: 48px; height: 48px; border-radius: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-s); color: var(--text); font-size: .93rem; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--primary-50); color: var(--primary); font-weight: 700; }
.nav a.sub { padding-inline-start: 26px; font-size: .88rem; color: var(--muted); }
.nav a .ic { color: var(--faint); } .nav a.active .ic { color: var(--primary); }
.nav a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .count { background: var(--danger); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 7px; min-width: 20px; text-align: center; }
.nav-label { font-size: .74rem; color: var(--faint); font-weight: 700; padding: 12px 10px 4px; }
.side-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; }
.side-foot > div { flex: 1; min-width: 0; overflow: hidden; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(244, 246, 248, .92); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); }
.search { flex: 1; max-width: 560px; position: relative; display: flex; align-items: center; }
.search .ic { position: absolute; right: 11px; color: var(--faint); pointer-events: none; }
.search input { width: 100%; min-height: 40px; border: 1px solid var(--border-2); border-radius: 999px; padding: 6px 38px 6px 14px; background: var(--surface); font-size: .93rem; }
.search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.save-pill { font-size: .8rem; color: var(--muted); margin-inline-start: auto; white-space: nowrap; }
.save-pill.saving { color: var(--info); } .save-pill.saved { color: var(--ok); } .save-pill.error { color: var(--danger); font-weight: 700; }
.content { padding: 20px 24px 60px; max-width: 1280px; width: 100%; outline: none; }
.banners:empty { display: none; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 24px; font-size: .9rem; border-bottom: 1px solid var(--border); }
.banner > span { flex: 1; }
.banner.warn { background: var(--warn-50); color: #5e3d00; }
.banner.info { background: var(--info-50); color: #183f78; }
.banner.ok { background: var(--ok-50); color: #134d30; }
.banner.demo { background: var(--demo-50); color: var(--demo); }
.banner.inline { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; padding: 10px 14px; text-decoration: none; }
.bottomnav, .only-mobile, .fab { display: none; }

/* ---------- عناصر الصفحة ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 4px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.card.flush { overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-head.flat { border: 0; padding: 0 0 10px; }
.card-head.sub { background: var(--surface-2); border-top: 1px solid var(--border); }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-sub { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 10px; }
.card h2 + .stack, .card.pad > h2 { margin-bottom: 10px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; color: var(--text); box-shadow: var(--shadow); }
.kpi:hover { text-decoration: none; border-color: var(--primary-100); }
.kpi b { font-size: 1.6rem; line-height: 1.2; }
.kpi span { font-size: .84rem; color: var(--muted); }
.kpi.bad b { color: var(--danger); } .kpi.warn b { color: var(--warn); }
.small-kpis .kpi b { font-size: 1.2rem; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .ic { color: var(--faint); }
.empty h3 { color: var(--text); }
.empty p { max-width: 460px; margin: 0 0 6px; }
.loading { display: flex; justify-content: center; gap: 6px; padding: 40px; }
.loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-100); animation: blink 1s infinite alternate; }
.loading span:nth-child(2) { animation-delay: .2s; } .loading span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { to { background: var(--primary); } }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: .92rem; font-weight: 600; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.filters .input { width: auto; max-width: 220px; }
.filters input[type="search"] { min-width: 180px; }
.list-meta { margin: 0 2px 8px; }
.suggest { display: flex; flex-direction: column; gap: 8px; }
.sugg { display: inline-flex; align-items: center; }
.scope-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.scope-card, .report-card { display: flex; flex-direction: column; gap: 8px; margin: 0; color: var(--text); }
.report-card:hover { text-decoration: none; border-color: var(--primary-100); }
.report-card .ic { color: var(--primary); }

/* ---------- الجداول ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: right; font-size: .78rem; font-weight: 700; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td, .table.compact th { padding: 6px 8px; }
.table-wrap { overflow-x: auto; }
.ttable tbody tr, .ftable tbody tr, .otable tbody tr { cursor: pointer; }
.ttable tbody tr:hover, .ftable tbody tr:hover, .otable tbody tr:hover { background: #fafcfd; }
.ttable .c-check, .ttable .c-star { width: 36px; padding-inline: 6px; }
.ttable .c-title { min-width: 220px; }
.ttable .c-next { min-width: 160px; max-width: 280px; color: var(--muted); font-size: .88rem; }
.ttl { font-weight: 600; color: var(--text); }
.sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; font-size: .8rem; color: var(--muted); }
.flink { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); padding-block: 3px; }
.subcount { display: inline-flex; align-items: center; gap: 3px; }
tr.is-done .ttl, .tcard.is-done .tc-title { color: var(--faint); text-decoration: line-through; }
tr.is-late { background: #fffafa; }
.who { font-size: .86rem; white-space: nowrap; } .who.me { color: var(--muted); }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid var(--border-2); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: transparent; padding: 0; flex: none; }
.tick:hover { border-color: var(--ok); color: var(--ok); }
.tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.tick.ro { cursor: default; }
.star { background: none; border: 0; cursor: pointer; color: var(--border-2); padding: 4px; display: inline-flex; }
.star:hover { color: #d9a400; }
.star.on { color: #d9a400; } .star.on svg { fill: #f3c623; }
.tcards, .fcards { display: none; }
.triage { margin-top: 6px; max-width: 280px; }
.mtable .input { min-width: 70px; }

/* ---------- البطاقات (الجوال) ---------- */
.tcard { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.tcard:last-child { border-bottom: 0; }
.tcard.is-late { background: #fffafa; }
.tc-top { display: flex; align-items: flex-start; gap: 10px; }
.tc-title { flex: 1; font-weight: 600; }
.tc-meta, .tc-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .82rem; }
.tc-meta .lbl { display: inline-flex; align-items: center; gap: 3px; }
.tc-next { font-size: .88rem; }
.tc-sub { color: var(--muted); }
.fcard { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.fcard:hover { text-decoration: none; background: var(--surface-2); }

/* ---------- قوائم أخرى ---------- */
.flist, .rlist, .people, .atts, .subtasks, .sort-list { list-style: none; margin: 0; padding: 0; }
.flist li, .rlist li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.flist li:last-child, .rlist li:last-child { border-bottom: 0; }
.flist li > span:nth-child(2) { flex: 1; }
.people li { position: relative; padding: 8px 0; border-bottom: 1px solid var(--border); padding-inline-end: 30px; }
.people li .x { position: absolute; left: 0; top: 8px; border: 0; background: none; cursor: pointer; color: var(--faint); }
.people li:last-child { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.links-card .input.sm { max-width: 320px; }
.atts li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--border); }
.atts li:last-child { border-bottom: 0; }
.atts li a { font-weight: 600; overflow-wrap: anywhere; }
.subtasks li { display: flex; align-items: center; gap: 8px; padding: 5px 0; flex-wrap: wrap; }
.subtasks li.is-done .linklike { color: var(--faint); text-decoration: line-through; }
.sub-add { margin-top: 6px; }
.sort-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sort-list li.is-done b { color: var(--faint); }
.steps { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; margin: 14px 0; }
.kv dt { color: var(--muted); font-size: .88rem; } .kv dd { margin: 0; white-space: pre-wrap; }
.stage-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.stage-pill { padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .82rem; color: var(--faint); }
.stage-pill.has { color: var(--primary); border-color: var(--primary-100); background: var(--primary-50); }
.stage-pill b { margin-inline-start: 4px; }
.collab-list .collab { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.collab-list .collab:last-child { border-bottom: 0; }
.collab .tlist { border: 1px solid var(--border); border-radius: var(--radius-s); overflow: hidden; }
.muted-card { opacity: .7; }
.menu-list { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); background: none; border-inline: 0; border-top: 0; width: 100%; font: inherit; text-align: right; cursor: pointer; min-height: 52px; }
.menu-item:last-child { border-bottom: 0; }
.menu-item > span { flex: 1; display: flex; flex-direction: column; }
.menu-item small { color: var(--muted); }
.menu-item .ic:first-child { color: var(--primary); }
.menu-item:hover { text-decoration: none; background: var(--surface-2); }
.agenda { padding: 12px 16px; }
.ag-nav { margin-bottom: 12px; }
.ag-day { margin-bottom: 14px; }
.ag-day h3 { font-size: .92rem; display: flex; gap: 8px; align-items: center; padding-bottom: 4px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.ag-day.today h3 { color: var(--info); }
.ag-day.late h3 { color: var(--danger); }
.ag-day ul { list-style: none; margin: 0; padding: 0; }
.ag-day li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 5px 0; }
.ag-kind { display: inline-flex; align-items: center; gap: 3px; font-size: .74rem; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.ag-kind.due { background: var(--info-50); color: var(--info); }
.ag-kind.follow { background: var(--warn-50); color: var(--warn); }
.ag-day li.is-late .ag-kind.due { background: var(--danger-50); color: var(--danger); }

/* ---------- السجل ---------- */
.timeline { list-style: none; margin: 10px 0 0; padding: 0; }
.entry { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.entry:last-child { border-bottom: 0; }
.e-ic { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.entry.k-decision .e-ic { color: var(--violet); } .entry.k-meeting .e-ic { color: var(--info); } .entry.k-sent .e-ic { color: var(--ok); }
.entry.k-submission .e-ic { color: var(--warn); }
.entry.internal { background: #fdfcf6; }
.e-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.e-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .9rem; }
.e-body { font-size: .92rem; }
.e-extra { color: var(--muted); }
.e-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.entry-form { display: flex; flex-direction: column; gap: 8px; }

/* ---------- النوافذ واللوحة الجانبية ---------- */
.modal-wrap, .drawer-wrap { position: fixed; inset: 0; z-index: 60; }
.scrim { position: absolute; inset: 0; background: rgba(14, 26, 36, .38); }
.modal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-l); outline: none; }
.modal.wide { width: min(760px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
.modal-body { padding: 6px 18px 14px; overflow-y: auto; overscroll-behavior: contain; }
.modal-foot { display: flex; justify-content: flex-start; flex-direction: row-reverse; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-body .form-error { margin-top: 10px; }
.drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(600px, 100vw); background: var(--surface); box-shadow: var(--shadow-l); display: flex; flex-direction: column; transform: translateX(-102%); transition: transform .18s ease; outline: none; }
.drawer.open { transform: none; }
.dhead { display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--sat)) 14px 10px; border-bottom: 1px solid var(--border); }
.dhead .crumbs { flex: 1; margin: 0; min-width: 0; overflow: hidden; }
.dhead .crumbs a, .dhead .crumbs button { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbody { padding: 14px 18px calc(30px + var(--sab)); overflow-y: auto; flex: 1; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; }
.title-field .input.title { font-size: 1.2rem; font-weight: 700; border-color: transparent; padding-inline: 6px; background: transparent; }
.title-field .input.title:hover { border-color: var(--border); }
.title-field .input.title:focus { background: var(--surface); border-color: var(--primary); }
.file-head .title-field .input.title { font-size: 1.4rem; }
.dstatus:empty { display: none; }
.dstatus { display: flex; gap: 6px; flex-wrap: wrap; }
.dsection { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.dsection h3 { display: flex; gap: 8px; align-items: center; }
.dmeta { margin-top: 6px; }
.popmenu { position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-l); padding: 4px; display: flex; flex-direction: column; }
.popmenu button { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; background: none; text-align: right; border-radius: 6px; cursor: pointer; font-size: .92rem; min-height: 40px; }
.popmenu button:hover, .popmenu button:focus { background: var(--surface-2); outline: none; }
.popmenu button.danger { color: var(--danger); }
.popmenu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; width: 100%; }
#toasts { position: fixed; bottom: calc(18px + var(--sab)); left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(520px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; background: #1f2b36; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-l); font-size: .9rem; display: flex; gap: 10px; align-items: center; animation: up .18s ease; }
.toast.error { background: #8e1d14; }
.toast .btn { color: #fff; border-color: rgba(255, 255, 255, .4); background: transparent; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }

/* ---------- الدخول ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px calc(24px + var(--sab)); }
.auth .card { width: min(440px, 100%); }
.auth h1 { font-size: 1.3rem; }

/* ---------- التقارير والطباعة ---------- */
.report h1 { font-size: 1.35rem; }
.report h2 { margin: 22px 0 8px; font-size: 1.05rem; }
.report h3 { margin: 14px 0 6px; }
.report .summary { max-width: 520px; margin-top: 12px; }
.report .rtable td, .report .rtable th { font-size: .86rem; }
.rhead { border-bottom: 2px solid var(--primary); padding-bottom: 8px; margin-bottom: 6px; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .sidebar, .topbar, .bottomnav, .banners, .no-print, .filters, #toasts, .skip { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; }
  .report.card { padding: 0; }
  .table th { background: #f1f3f5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .table td, .table th { border: 1px solid #ccc; }
  tr, li { page-break-inside: avoid; }
  a { color: inherit; }
}

/* ---------- الجوال ---------- */
@media (max-width: 820px) {
  .shell { display: block; }
  .sidebar, .only-desktop { display: none !important; }
  .only-mobile { display: inline-flex; }
  .topbar { padding: calc(6px + var(--sat)) 12px 6px; height: auto; min-height: calc(var(--top) + var(--sat)); }
  .topbar .search { display: none; }
  .save-pill { margin-inline-start: auto; }
  .topbar .brand { font-size: .98rem; padding: 0; }
  .topbar .brand img { width: 28px; height: 28px; }
  .topbar .brand:hover { text-decoration: none; }
  .content { padding: 14px 12px calc(96px + var(--sab)); }
  .banner { padding: 10px 14px; }
  h1 { font-size: 1.25rem; }
  .bottomnav { display: flex; position: fixed; bottom: 0; right: 0; left: 0; z-index: 30; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--border); padding: 4px 6px calc(4px + var(--sab)); justify-content: space-around; align-items: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: .75rem; color: var(--muted); min-width: 60px; min-height: 48px; justify-content: center; border-radius: 10px; }
  .bottomnav a.active { color: var(--primary); font-weight: 700; }
  .bottomnav a:hover { text-decoration: none; }
  .fab { width: 54px; height: 54px; border-radius: 50%; background: var(--primary); color: #fff; border: 0; box-shadow: 0 4px 14px rgba(31, 84, 104, .4); display: inline-flex; align-items: center; justify-content: center; margin-top: -18px; cursor: pointer; }
  .ttable, .ftable, .otable { display: none; }
  .tcards, .fcards { display: block; }
  .grid2, .grid3, .cols { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi b { font-size: 1.35rem; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters .input { flex: none; max-width: 200px; }
  .modal { top: auto; bottom: 0; left: 0; transform: none; width: 100vw; max-height: calc(100dvh - 30px); border-radius: 16px 16px 0 0; padding-bottom: var(--sab); }
  .modal.wide { width: 100vw; }
  .drawer { width: 100vw; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 38px; }
  .icon-btn { width: 44px; height: 44px; }
  .chip-btn { min-height: 34px; padding: 4px 12px; }
  .table td, .table th { padding: 8px; }
  .kv { grid-template-columns: 1fr; }
  .page-head { margin-bottom: 12px; }
  .head-actions { width: 100%; }
  .head-actions .btn.primary { flex: 1; }
  #toasts { bottom: calc(84px + var(--sab)); }
  .scope-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- المساعد الذكي ---------- */
.ai-btn .ic { color: var(--violet); }
.drawer.wide { width: min(720px, 100vw); }
.ai-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.ai-title b { display: inline-flex; align-items: center; gap: 6px; color: var(--violet); }
.ai-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; background: var(--surface-2); }
.ai-msg { display: flex; }
.ai-msg.me { justify-content: flex-end; }
.ai-msg.bot { justify-content: flex-start; }
.ai-msg .bubble { max-width: 88%; border-radius: 14px; padding: 10px 13px; font-size: .94rem; line-height: 1.75; overflow-wrap: anywhere; }
.ai-msg.me .bubble { background: var(--primary); color: #fff; border-end-end-radius: 4px; }
.ai-msg.bot .bubble { background: var(--surface); border: 1px solid var(--border); border-end-start-radius: 4px; box-shadow: var(--shadow); }
.ai-msg.err .bubble { border-color: #f4c7c3; background: var(--danger-50); color: var(--danger); }
.ai-msg .bubble p { margin: 0 0 .55em; }
.ai-msg .bubble p:last-child { margin-bottom: 0; }
.ai-msg .bubble ul, .ai-msg .bubble ol { margin: .2em 0 .6em; padding-inline-start: 1.3em; }
.ai-msg .bubble code { background: var(--surface-2); padding: 0 4px; border-radius: 4px; font-size: .88em; }
.ai-msg.me .chip { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); }
.ai-msg-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ai-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.ai-act { cursor: pointer; text-decoration: none; background: var(--violet-50); border-color: #d9cdf5; color: var(--violet); font-family: inherit; }
.ai-act:hover { text-decoration: none; border-color: var(--violet); }
.ai-time { margin-top: 6px; }
.ai-welcome { margin: auto 0; text-align: center; padding: 20px 6px; }
.ai-welcome h3 { display: flex; gap: 6px; justify-content: center; align-items: center; color: var(--violet); margin-bottom: 6px; }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.ai-sugg .chip-btn { white-space: normal; text-align: right; line-height: 1.5; padding: 6px 12px; }
.ai-compose { border-top: 1px solid var(--border); padding: 10px 12px calc(10px + var(--sab)); background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.ai-row { display: flex; align-items: flex-end; gap: 6px; }
.ai-row textarea { flex: 1; max-height: 180px; min-height: 42px; overflow-y: auto; }
.ai-row .btn { min-height: 42px; }
.ai-files { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-files:empty { display: none; }
.ai-file .x { border: 0; background: none; cursor: pointer; color: var(--faint); padding: 0; display: inline-flex; }
.ai-note { margin: 0; }
.ai-wait { display: inline-flex; align-items: center; gap: 8px; }
.ai-wait .dots { display: inline-flex; gap: 3px; }
.ai-wait .dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); animation: blink 1s infinite alternate; }
.ai-wait .dots span:nth-child(2) { animation-delay: .2s; }
.ai-wait .dots span:nth-child(3) { animation-delay: .4s; }
.ai-model { align-items: flex-start; padding: 6px 0; }
.ai-model input { margin-top: 4px; }
@media (max-width: 820px) {
  .ai-btn { width: 44px; padding: 0; }
  .ai-msg .bubble { max-width: 94%; }
}

/* ---------- هوية المجلس: القائمة الجانبية والشعار والدخول ---------- */
.sidebar { background: var(--navy); color: #dfe5ff; border-inline-end: 0; }
.sidebar .brand-side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 6px 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sidebar .brand-side img { width: 118px; height: auto; display: block; }
.sidebar .brand-side .app-name { font-weight: 800; font-size: 1.12rem; color: #fff; display: flex; align-items: center; gap: 8px; }
.sidebar .brand-side .app-name::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--grad); display: inline-block; }
.sidebar .btn.primary { background: var(--royal); border-color: var(--royal); }
.sidebar .btn.primary:hover { background: #2b5cff; }
.sidebar .nav a { color: #c9d2fa; }
.sidebar .nav a:hover { background: rgba(255, 255, 255, .07); }
.sidebar .nav a.active { background: rgba(66, 172, 253, .16); color: #fff; box-shadow: inset -3px 0 0 var(--sky); }
.sidebar .nav a .ic { color: #8c9bdf; }
.sidebar .nav a.active .ic { color: var(--aqua); }
.sidebar .nav a.sub { color: #a9b4e8; }
.sidebar .nav-label { color: #7f89c9; }
.sidebar .side-foot { border-top-color: rgba(255, 255, 255, .12); }
.sidebar .side-foot .muted { color: #9ea8d8; }
.sidebar .side-foot .icon-btn { color: #c9d2fa; }
.sidebar .side-foot .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar .tiny.muted { color: #9ea8d8; }
.topbar .brand.only-mobile img { width: auto; height: 30px; border-radius: 0; }
.auth { background: radial-gradient(1200px 600px at 85% -10%, rgba(18, 73, 255, .35), transparent 60%), var(--navy); }
.auth .brand.big { flex-direction: column; gap: 14px; color: #fff; }
.auth .brand.big img { width: 170px; height: auto; border-radius: 0; }
.auth .brand.big span { font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.auth .brand.big span::before { content: ""; width: 4px; height: 20px; border-radius: 4px; background: var(--grad); display: inline-block; }
.r-head { background: var(--navy); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: #fff; }
.r-head img { height: 40px; width: auto; }
.r-head span { font-weight: 800; }
.fab { background: linear-gradient(135deg, var(--royal), var(--navy-3)); }
.kpi.bad b { color: var(--danger); }
@media (max-width: 820px) {
  .topbar { background: var(--navy); border-bottom: 0; color: #fff; }
  .topbar .brand { color: #fff; }
  .topbar .save-pill { color: #c9d2fa; }
  .topbar .save-pill.saved { color: #9ff0c2; }
  .topbar .save-pill.error { color: #ffb4ab; }
  .topbar .ai-btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
  .topbar .ai-btn .ic { color: var(--aqua); }
  .bottomnav a.active { color: var(--royal); }
}

/* ================= لوحة القيادة (الصفحة الرئيسية) ================= */
/* ألوان الحالة مطابقة لبطاقات اجتماع المركز: مكتمل، قيد التنفيذ، لم يبدأ، متأخر، متعثر */
:root { --h-done: #1BA784; --h-on: #42ACFD; --h-late: #F5B000; --h-stalled: #E45757; --h-idle: #B9BFD3; --h-none: #DCE0EC; --track: #eef1f8; }
.hb { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; line-height: 1.7; }
.hb::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hb-on_track { background: #e6f3ff; color: #1266b0; }
.hb-late { background: #fff4d6; color: #8a5a00; }
.hb-stalled { background: #fdeceb; color: #b42318; }
.hb-not_started { background: #f0f2f7; color: #5b6280; }
.hb-done { background: #e3f6ef; color: #12795a; }
.hb-none { background: #f4f5f9; color: #64698f; }
.pbar-wrap { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle; }
.pbar { display: inline-block; width: 84px; height: 7px; border-radius: 9px; background: var(--track); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(270deg, #7FFFFF 0%, #42ACFD 45%, #1249FF 100%); }
.pbar-v { font-size: .8rem; min-width: 34px; }
.ms-mark { display: inline-flex; color: var(--royal); margin-inline-end: 5px; vertical-align: -1px; }
.hsel.hs-on_track { border-color: #9dd0fb; background: #f2f9ff; }
.hsel.hs-late { border-color: #f3d27a; background: #fffaf0; }
.hsel.hs-stalled { border-color: #f1aaa4; background: #fff6f5; }
.hsel.hs-done { border-color: #9edcc6; background: #f2fbf7; }
.prog-in { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.prog-in .input { width: 74px; min-height: 34px; text-align: center; }
.prog-live { display: inline-flex; align-items: center; }
.clamp1, .clamp2 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp1 { -webkit-line-clamp: 1; } .clamp2 { -webkit-line-clamp: 2; }
.c-health { min-width: 130px; }
.c-health .pbar-wrap { margin-top: 4px; }
.linklike { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; text-align: start; }
.linklike:hover { text-decoration: underline; }

.db { --gap: 16px; }
.db-hero { position: relative; overflow: hidden; color: #fff; border-radius: 18px; padding: 22px 24px 74px;
  background: radial-gradient(900px 380px at 0% 120%, rgba(127, 255, 255, .22), transparent 60%),
              radial-gradient(700px 300px at 100% -40%, rgba(18, 73, 255, .55), transparent 65%),
              linear-gradient(135deg, #090951 0%, #111182 60%, #1818A0 100%); }
.db-hero::after { content: ""; position: absolute; inset-inline-end: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(127, 255, 255, .07); pointer-events: none; }
.db-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.db-kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: .8rem; color: #9fe9ff; font-weight: 700; letter-spacing: .2px; }
.db-hero h1 { font-size: 1.9rem; font-weight: 800; }
.db-date { margin: 2px 0 0; color: #c8d0ff; font-size: .9rem; }
.db-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.db-btn-w { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
.db-btn-w:hover { background: rgba(255, 255, 255, .18); }
.db-btn-w .ic { color: #9fe9ff; }
.db-btn-w.spin .ic { animation: dbspin .8s linear infinite; }
@keyframes dbspin { to { transform: rotate(-360deg); } }
.db-filters { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.db-seg { display: inline-flex; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.db-seg::-webkit-scrollbar { display: none; }
.db-seg button { border: 0; background: transparent; color: #dfe4ff; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: .86rem; font-weight: 600; white-space: nowrap; }
.db-seg button:hover { background: rgba(255, 255, 255, .1); }
.db-seg button.on { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.db-owner { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: 2px 4px 2px 12px; color: #9fe9ff; }
.db-owner select { background: transparent; border: 0; color: #fff; font-size: .86rem; font-weight: 600; padding: 6px 4px; min-height: 34px; cursor: pointer; }
.db-owner select option { color: var(--text); }
.db-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.db-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(127, 255, 255, .16); border: 1px solid rgba(127, 255, 255, .35); color: #fff; border-radius: 999px; padding: 3px 6px 3px 12px; font-size: .8rem; font-weight: 600; }
.db-chip button { background: none; border: 0; color: #fff; cursor: pointer; display: inline-flex; padding: 2px; border-radius: 50%; }
.db-chip button:hover { background: rgba(255, 255, 255, .15); }
.db-clear { background: none; border: 0; color: #9fe9ff; cursor: pointer; font-size: .8rem; text-decoration: underline; }

.db-kpis { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: -54px 14px 16px; }
.db-kpi { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ic label ring" "num num ring" "sub sub sub"; align-items: center; column-gap: 9px; row-gap: 2px; text-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; cursor: pointer; color: var(--text); box-shadow: 0 8px 24px rgba(9, 9, 81, .08); transition: transform .15s ease, box-shadow .15s ease; overflow: hidden; }
.db-kpi:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(9, 9, 81, .13); }
.db-kpi-ic { grid-area: ic; width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #42ACFD, #1249FF); }
.db-kpi.is-bad .db-kpi-ic { background: linear-gradient(135deg, #f08a82, #d63b30); }
.db-kpi.is-warn .db-kpi-ic { background: linear-gradient(135deg, #ffd166, #e09a00); }
.db-kpi-label { grid-area: label; font-size: .8rem; color: var(--muted); font-weight: 700; line-height: 1.3; }
.db-kpi-num { grid-area: num; margin-top: 4px; font-size: 1.85rem; font-weight: 800; line-height: 1.15; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.db-kpi-num small { font-size: .9rem; color: var(--muted); font-weight: 700; margin-inline-start: 2px; }
.db-kpi-sub { grid-area: sub; font-size: .76rem; color: var(--muted); line-height: 1.45; }
.db-kpi-sub em { font-style: normal; font-weight: 700; }
em.bad { color: var(--danger); } em.warn { color: var(--warn); } em.good { color: var(--ok); }
.db-kpi .ring { grid-area: ring; align-self: end; width: 40px; height: 40px; }
.ring-bg { fill: none; stroke: var(--track); stroke-width: 5; }
.ring-fg { fill: none; stroke-width: 5; stroke-linecap: round; }
.db-mix { position: absolute; inset-inline: 14px; bottom: 9px; display: flex; height: 5px; border-radius: 9px; overflow: hidden; gap: 2px; }
.db-mix i { display: block; }
.db-kpi:has(.db-mix) { padding-bottom: 22px; }

.db-insights { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.db-ins { display: flex; align-items: flex-start; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; font-size: .86rem; flex: 1 1 260px; }
.db-ins .ic { flex: none; margin-top: 3px; color: var(--royal); }
.db-ins.bad { background: #fff6f5; border-color: #f6cfcb; } .db-ins.bad .ic { color: var(--danger); }
.db-ins.warn { background: #fffaf0; border-color: #f3dfa9; } .db-ins.warn .ic { color: #b07800; }
.db-ins.info { background: #f2f7ff; border-color: #cfe0ff; }

.db-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.db-card { margin: 0; padding: 16px 18px; display: flex; flex-direction: column; min-width: 0; border-radius: 14px; }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.db-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.db-card-head h2 { display: flex; align-items: center; gap: 7px; font-size: 1rem; }
.db-card-head h2 .ic { color: var(--royal); }
.db-sub { margin: 2px 0 0; font-size: .78rem; color: var(--faint); }
.db-card-body { flex: 1; min-width: 0; }
.db-foot { margin: 10px 0 0; font-size: .78rem; color: var(--faint); }
.db-ok { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; margin: 6px 0; }

/* الحلقة */
.dn-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.donut { width: 190px; height: 190px; flex: none; overflow: visible; }
.dn-track { fill: none; stroke: var(--track); stroke-width: 22; }
.dn-seg { fill: none; stroke-width: 22; cursor: pointer; transition: stroke-width .18s ease, opacity .18s ease; outline: none; }
.dn-seg:hover, .dn-seg:focus-visible, .dn-seg.on { stroke-width: 28; }
.dn-seg.dim { opacity: .28; }
.dn-num { font-size: 34px; font-weight: 800; fill: var(--navy); font-family: var(--font); }
.dn-lbl { font-size: 11.5px; fill: var(--muted); font-family: var(--font); }
.dn-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.dn-legend button { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 1px solid transparent; border-radius: 9px; padding: 5px 8px; cursor: pointer; font-size: .86rem; color: var(--text); }
.dn-legend button:hover { background: var(--surface-2); }
.dn-legend button.on { background: var(--primary-50); border-color: var(--primary-100); }
.dn-legend i { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.dn-legend span { flex: 1; text-align: start; }

/* نسبة الإنجاز */
.pg-list { display: grid; grid-template-columns: 1fr; gap: 2px 22px; }
@media (min-width: 1181px) { .pg-list { grid-template-columns: 1fr 1fr; } }
.db-scroll { max-height: 560px; overflow-y: auto; margin-inline-end: -8px; padding-inline-end: 8px; scrollbar-width: thin; }
.pg-row { display: grid; grid-template-columns: minmax(130px, 34%) 1fr 46px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; color: var(--text); }
.pg-row:hover { background: var(--surface-2); text-decoration: none; }
.pg-name { font-size: .86rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-name small { display: block; font-weight: 400; color: var(--faint); font-size: .74rem; }
.pg-track, .bl-track, .bg-track { position: relative; height: 10px; border-radius: 9px; background: var(--track); overflow: hidden; }
.pg-track i, .bl-track i, .bg-track i { display: block; height: 100%; border-radius: 9px; }
.pg-val { font-size: .86rem; text-align: end; font-variant-numeric: tabular-nums; }

/* خارطة الطريق */
.rm-nav { display: inline-flex; align-items: center; gap: 4px; }
.rm { display: flex; flex-direction: column; overflow-x: auto; }
.rm-row { display: grid; grid-template-columns: 190px minmax(560px, 1fr); align-items: center; min-height: 36px; border-bottom: 1px dashed var(--border); }
.rm-row:last-child { border-bottom: 0; }
.rm-headrow { min-height: 46px; border-bottom: 1px solid var(--border); background: var(--surface); }
.rm-name { display: flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 600; color: var(--text); padding-inline-end: 10px; min-width: 0; }
.rm-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-name i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rm-head, .rm-track { position: relative; height: 100%; min-height: 34px; margin-inline: 12px; }
.rm-head { min-height: 46px; }
.rm-month { position: absolute; top: 0; height: 24px; display: flex; align-items: center; justify-content: center; font-size: .74rem; color: var(--muted); border-inline-start: 1px solid var(--border); white-space: nowrap; overflow: hidden; }
.rm-month small { color: var(--faint); margin-inline-start: 3px; }
.rm-month.now { color: var(--royal); font-weight: 800; background: linear-gradient(180deg, rgba(18, 73, 255, .06), transparent); }
.rm-grid { position: absolute; top: 0; bottom: 0; width: 0; border-inline-start: 1px solid #edf0f7; }
.rm-span { position: absolute; top: 50%; height: 8px; margin-top: -4px; border-radius: 9px; background: linear-gradient(270deg, rgba(127, 255, 255, .55), rgba(66, 172, 253, .55), rgba(18, 73, 255, .45)); }
.rm-today { position: absolute; top: 0; bottom: 0; width: 0; border-inline-start: 2px dashed var(--royal); z-index: 1; opacity: .7; }
.rm-today-lbl { position: absolute; top: 27px; transform: translateX(50%); white-space: nowrap; background: var(--royal); color: #fff; font-size: .75rem; font-weight: 700; padding: 0 6px; border-radius: 6px; z-index: 3; }
.rm-ms { position: absolute; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; padding: 0; border: 2px solid #fff; border-radius: 3px; transform: translateX(50%) rotate(45deg); cursor: pointer; z-index: 2; box-shadow: 0 1px 3px rgba(9, 9, 81, .25); transition: transform .15s ease; }
.rm-ms:hover, .rm-ms:focus-visible { transform: translateX(50%) rotate(45deg) scale(1.35); outline: none; z-index: 3; }
.ms-done { background: var(--h-done); } .ms-open { background: var(--h-on); } .ms-late { background: var(--h-late); border-color: #E45757 !important; }
.rm-edge { position: absolute; top: 50%; transform: translateY(-50%); font-size: .75rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 0 6px; z-index: 2; }
.rm-edge.start { inset-inline-start: 2px; } .rm-edge.end { inset-inline-end: 2px; }
.rm-legend, .mc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .76rem; color: var(--muted); }
.rm-legend span, .mc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rm-legend i { width: 10px; height: 10px; border-radius: 2px; transform: rotate(45deg); display: inline-block; }
.rm-legend i.rm-span-key { transform: none; width: 18px; height: 6px; border-radius: 6px; background: linear-gradient(270deg, rgba(127, 255, 255, .7), rgba(18, 73, 255, .5)); }
.mc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* المعالم حسب الشهر */
.mc-cols { display: flex; align-items: flex-end; gap: 6px; height: 196px; padding-top: 4px; overflow-x: auto; }
.mc-col { flex: 1 0 38px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; background: none; border: 1px solid transparent; border-radius: 10px; padding: 4px 2px; cursor: pointer; color: var(--text); }
.mc-col:hover { background: var(--surface-2); }
.mc-col.on { background: var(--primary-50); border-color: var(--primary-100); }
.mc-col b { font-size: .8rem; min-height: 1.2em; }
.mc-col small { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.mc-col.now small { color: var(--royal); font-weight: 800; }
.mc-stack { width: 70%; max-width: 34px; height: 130px; display: flex; flex-direction: column-reverse; border-radius: 7px 7px 3px 3px; overflow: hidden; background: linear-gradient(180deg, transparent, var(--track)); }
.mc-stack i { display: block; width: 100%; }
.s-done { background: var(--h-done); } .s-open { background: var(--h-on); } .s-late { background: #E45757; } .s-other { background: var(--h-idle); }
.s-soon { background: var(--h-late); } .s-rest { background: #a9d4fb; }
.mc-detail { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.mc-detail h3 { margin-bottom: 6px; }

/* القوائم المشتركة */
.db-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.db-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--border); }
.db-list li:last-child { border-bottom: 0; }
.db-task { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: none; border: 0; padding: 0; cursor: pointer; text-align: start; color: var(--text); min-width: 0; flex: 1; font: inherit; }
.db-task:hover { text-decoration: none; }
.db-task:hover .db-task-t { color: var(--primary); }
.db-task-t { font-size: .88rem; font-weight: 600; }
.db-task-m { font-size: .76rem; color: var(--muted); }

/* عبء العمل */
.wl { display: flex; flex-direction: column; gap: 3px; }
.wl-row { display: grid; grid-template-columns: minmax(110px, 36%) 1fr 30px; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 9px; }
.wl-row.on { background: var(--primary-50); }
.wl-name { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: .86rem; font-weight: 600; color: var(--text); text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-name:hover { color: var(--primary); }
.wl-bar { display: flex; height: 12px; border-radius: 9px; overflow: hidden; background: var(--track); gap: 2px; }
.wl-bar i { display: block; height: 100%; }
.wl-row b { font-size: .86rem; text-align: end; font-variant-numeric: tabular-nums; }

/* المؤشرات */
.bl-group { padding: 6px 0 8px; border-bottom: 1px solid var(--border); }
.bl-group:last-of-type { border-bottom: 0; }
.bl-proj { font-size: .84rem; font-weight: 800; color: var(--text); }
.bl-row { display: grid; grid-template-columns: minmax(120px, 36%) 1fr auto 44px; gap: 10px; align-items: center; padding: 4px 0; font-size: .82rem; }
.bl-lbl { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-track::after { content: ""; position: absolute; inset-inline-end: 0; top: 0; bottom: 0; width: 2px; background: var(--navy); opacity: .5; }
.bl-val { font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl-val small { color: var(--faint); }
.bl-pct { font-weight: 800; text-align: end; font-size: .8rem; }
.bl-na { grid-column: span 3; color: var(--faint); font-size: .78rem; }
i.bl-good { background: var(--h-done); } i.bl-mid { background: var(--h-on); } i.bl-low { background: var(--h-late); } i.bl-bad { background: #E45757; }
span.bl-good { color: #12795a; } span.bl-mid { color: #1266b0; } span.bl-low { color: #8a5a00; } span.bl-bad { color: var(--danger); }
.bl-plan { margin-bottom: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.bl-plan summary { cursor: pointer; font-weight: 700; font-size: .86rem; display: flex; align-items: center; gap: 6px; }

/* المستهدف التشغيلي لكل مشروع */
.tg-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tg-seg button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tg-seg button b { color: var(--text); font-variant-numeric: tabular-nums; }
.tg-seg button:hover { border-color: var(--primary-100); background: var(--primary-50); }
.tg-seg button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tg-seg button.on b { color: #fff; }
.tgf { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.tgf-behind { background: #E45757; } .tgf-watch { background: #F5B000; } .tgf-ok { background: var(--h-done); }
.tgf-unmeasured { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.tg-proj { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 4px; min-width: 0; }
.tg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.tg-title { display: flex; flex-direction: column; min-width: 0; }
.tg-name { font-weight: 800; font-size: .92rem; color: var(--text); }
.tg-name:hover { color: var(--primary); }
.tg-meta { font-size: .74rem; color: var(--faint); }
.tg-avg { flex: none; font-weight: 800; font-size: .84rem; color: var(--navy); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 9px; line-height: 1.8; font-variant-numeric: tabular-nums; }
.tg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lbl chip" "track track" "val exp"; align-items: center; gap: 5px 8px; padding: 8px 0; border-top: 1px dashed var(--border); color: var(--text); }
.tg-head + .tg-row { border-top: 0; }
a.tg-row:hover { text-decoration: none; }
a.tg-row:hover .tg-lbl { color: var(--primary); }
.tg-lbl { grid-area: lbl; font-size: .88rem; font-weight: 800; color: var(--navy); min-width: 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tg-auto { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: 6px; font-size: .75rem; font-weight: 700; color: var(--royal); background: var(--primary-50); border-radius: 999px; padding: 0 7px; vertical-align: middle; }
.tg-row .pace { grid-area: chip; }
.tg-track { grid-area: track; position: relative; height: 10px; border-radius: 9px; background: var(--track); }
.tg-track i { display: block; height: 100%; border-radius: 9px; }
.tg-track u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-inline-start: -1px; background: var(--navy); border-radius: 2px; z-index: 1; text-decoration: none; }
.tg-val { grid-area: val; font-size: .8rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tg-val b { color: var(--text); }
.tg-val small { color: var(--faint); }
.tg-val em { font-style: normal; font-weight: 800; color: var(--text); margin-inline-start: 4px; }
.tg-exp { grid-area: exp; font-size: .75rem; color: var(--faint); white-space: nowrap; }
i.tg-behind { background: #E45757; } i.tg-watch { background: #F5B000; } i.tg-on_track { background: var(--h-done); } i.tg-achieved { background: #0f8a6a; } i.tg-unmeasured { background: transparent; }
.pace { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; line-height: 1.7; }
.pace-behind { background: #fdeceb; color: #b42318; } .pace-watch { background: #fff4d6; color: #8a5a00; }
.pace-unmeasured { background: var(--surface); color: var(--faint); box-shadow: inset 0 0 0 1px var(--border-2); }
.pace-on_track { background: #e3f6ef; color: #12795a; } .pace-achieved { background: #d3f1e5; color: #0b6148; }
.tg-legend u.tg-key { display: inline-block; width: 2px; height: 12px; background: var(--navy); border-radius: 2px; text-decoration: none; }
.tg-more { text-align: center; margin: 12px 0 0; }

/* القسم الاستراتيجي القابل للطي (أسفل اللوحة) */
.db-card.db-fold { padding: 0; }
.db-fold > details > summary { list-style: none; cursor: pointer; padding: 14px 18px; margin: 0; border-radius: 14px; align-items: center; }
.db-fold > details > summary::-webkit-details-marker { display: none; }
.db-fold > details > summary:hover { background: var(--surface-2); }
.db-fold > details > summary:focus-visible { outline: 2px solid var(--royal); outline-offset: -2px; }
.db-fold > details[open] > summary { border-bottom: 1px solid var(--border); border-radius: 14px 14px 0 0; }
.db-fold > details > .db-card-body { padding: 14px 18px 16px; }
.db-fold-r { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.db-fold-btn { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--royal); }
.db-fold-btn .ic { transform: rotate(-90deg); transition: transform .15s ease; }
.db-fold details[open] .db-fold-btn .ic { transform: rotate(90deg); }
.db-fold .f-hide { display: none; } .db-fold details[open] .f-hide { display: inline; } .db-fold details[open] .f-show { display: none; }
.st-kpis { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 12px; }
.st-kpis h3 { display: flex; align-items: center; gap: 6px; font-size: .92rem; margin: 0 0 4px; }
.st-kpis h3 .ic { color: var(--royal); }
@media (max-width: 820px) { .tg-grid { grid-template-columns: 1fr; } .db-fold > details > summary { padding: 12px 14px; } .db-fold > details > .db-card-body { padding: 12px 14px 14px; } }
@media print {
  .tg-seg, .tg-more, .db-fold-btn { display: none !important; }
  .tg-track i, .tg-track u, .pace { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tg-proj { break-inside: avoid; }
}

/* الميزانية */
.bg-sum { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.bg-sum > div { display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; flex: 1; }
.bg-sum span { font-size: .74rem; color: var(--muted); }
.bg-sum b { font-size: 1.15rem; font-weight: 800; }
.bg-sum .bg-ring { flex: none; position: relative; align-items: center; justify-content: center; background: none; border: 0; padding: 0; width: 64px; height: 64px; }
.bg-ring .ring { width: 64px; height: 64px; }
.bg-ring b { position: absolute; font-size: .86rem; }
.bg-list { display: flex; flex-direction: column; gap: 2px; }
.bg-row { display: grid; grid-template-columns: minmax(120px, 42%) 1fr 42px; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 9px; color: var(--text); }
.bg-row:hover { background: var(--surface-2); text-decoration: none; }
.bg-name { font-size: .84rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bg-name small { display: block; font-weight: 400; font-size: .75rem; color: var(--faint); }
.bg-track i { background: linear-gradient(270deg, #42ACFD, #1249FF); }
.bg-row b { font-size: .82rem; text-align: end; }

/* مسار تطوير الأعمال */
.pl { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; }
.pl-step { position: relative; overflow: hidden; flex: 1 1 0; min-width: 58px; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; background: var(--surface-2); color: var(--faint); cursor: pointer; padding: 6px 16px; font: inherit;
  padding-inline: 14px; clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 12px 100%, 0 50%); }
.pl-step:first-child { clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); }
.pl-step:last-child { clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%); }
.pl-step b { font-size: 1.2rem; font-weight: 800; position: relative; z-index: 1; }
.pl-step span { font-size: .75rem; text-align: center; position: relative; z-index: 1; line-height: 1.3; }
.pl-step i { position: absolute; inset-inline: 0; bottom: 0; background: rgba(66, 172, 253, .18); }
.pl-step.has { color: var(--text); background: #eaf3ff; }
.pl-step.has b { color: var(--royal); }
.pl-step.on { background: var(--royal); color: #fff; }
.pl-step.on b { color: #fff; }
.pl-step:disabled { cursor: default; }

/* جدول المشاريع */
.db-search { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-2); border-radius: 999px; padding: 0 12px; background: var(--surface); color: var(--faint); }
.db-search input { border: 0; outline: none; min-height: 34px; background: transparent; font-size: .86rem; width: 220px; }
.db-table-wrap { overflow-x: auto; margin: 0 -18px -16px; }
.db-table { min-width: 900px; }
.db-table td { vertical-align: middle; }
.db-table .c-name { min-width: 210px; }
.db-table .c-name .chip { margin-inline-start: 4px; }
.th-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; font-weight: 700; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.th-sort.on { color: var(--royal); }
.th-sort span { font-size: .75rem; }
.c-prog { min-width: 140px; }
.ms-frac { font-variant-numeric: tabular-nums; font-weight: 700; }

/* المستجدات */
.feed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.feed li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.feed-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-50); color: var(--royal); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.feed li > div { min-width: 0; }
.feed-h { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .86rem; font-weight: 700; }
.feed-b { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }

/* التلميح */
.db-tip { position: fixed; z-index: 120; pointer-events: none; background: var(--navy); color: #fff; font-size: .78rem; line-height: 1.5; padding: 7px 10px; border-radius: 9px; max-width: 280px; box-shadow: 0 8px 24px rgba(9, 9, 81, .3); opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; left: 0; top: 0; }
.db-tip.on { opacity: 1; transform: none; }

/* الحركة عند الفتح (تُلغى عند تفضيل تقليل الحركة) */
.db-anim .bar-fill { animation: dbgrow .8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: right center; }
.db-anim .bar-up { animation: dbup .8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: center bottom; }
.db-anim .dn-seg { animation: dbdonut 1s cubic-bezier(.2, .8, .2, 1) both; }
.db-anim .ring-fg { animation: dbdonut 1s cubic-bezier(.2, .8, .2, 1) both; }
.db-anim .rm-ms { animation: dbpop .5s .25s cubic-bezier(.2, .8, .2, 1.2) both; }
.db-intro .db-card, .db-intro .db-kpi { animation: dbfade .4s ease both; }
@keyframes dbgrow { from { transform: scaleX(0); } }
@keyframes dbup { from { transform: scaleY(0); } }
@keyframes dbdonut { from { stroke-dasharray: 0 400; } }
@keyframes dbpop { from { opacity: 0; transform: translateX(50%) rotate(45deg) scale(.2); } }
@keyframes dbfade { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .db-anim *, .db-intro *, .db-btn-w.spin .ic { animation: none !important; } .db-kpi, .db-tip { transition: none; } }

@media (max-width: 1180px) {
  .db-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .c4, .c5, .c6, .c7, .c8 { grid-column: span 6; }
  .feed { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .c4, .c5, .c6, .c7, .c8, .c12 { grid-column: span 12; }
}
@media (max-width: 820px) {
  .db-hero { border-radius: 14px; padding: 16px 14px 66px; }
  .db-hero h1 { font-size: 1.5rem; }
  .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: -50px 8px 14px; gap: 8px; }
  .db-kpi { padding: 11px; gap: 8px; }
  .db-kpi-ic { width: 26px; height: 26px; border-radius: 8px; }
  .db-kpi-num { font-size: 1.5rem; }
  .db-kpi .ring { width: 28px; height: 28px; }
  .db-card { padding: 14px; }
  .db-table-wrap { margin: 0 -14px -14px; }
  .rm-row { grid-template-columns: 120px minmax(520px, 1fr); }
  .db-search input { width: 150px; }
  .donut { width: 160px; height: 160px; }
  .pg-row { grid-template-columns: minmax(110px, 40%) 1fr 42px; }
}
@media print {
  .db-hero { background: none !important; color: var(--text); padding: 0 0 8px; border-radius: 0; }
  .db-hero::after, .db-filters, .db-hero-actions, .rm-nav, .db-search, .db-tip { display: none !important; }
  .db-kicker, .db-date { color: var(--muted); }
  .db-kpis { margin: 8px 0; grid-template-columns: repeat(3, 1fr); }
  .db-kpi, .db-card { box-shadow: none; border: 1px solid #d7dbe8; break-inside: avoid; }
  .db-grid { display: block; }
  .db-card { margin-bottom: 10px; }
  .db-anim * { animation: none !important; }
  .pg-track i, .bl-track i, .bg-track i, .wl-bar i, .mc-stack i, .rm-ms, .rm-span, .db-mix i, .dn-seg, .pbar i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ================= محفظة القسم: بطاقات مجمّعة حسب أهداف الخطة ================= */
.seg-ctl { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-ctl::-webkit-scrollbar { display: none; }
.seg-ctl button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--muted); padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.seg-ctl button:hover { color: var(--text); }
.seg-ctl button.on { background: var(--surface); color: var(--royal); box-shadow: 0 1px 4px rgba(9, 9, 81, .12); }
.pf-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pf-bar > *, .pf-bar .row, .seg-ctl { min-width: 0; max-width: 100%; }
.pf-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; color: var(--muted); }
.pf-sum b { color: var(--text); }
.pf-sum .bad { color: var(--danger); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.pf-group { margin-bottom: 22px; }
.pf-group > summary { list-style: none; cursor: pointer; }
.pf-group > summary::-webkit-details-marker { display: none; }
.pf-group.muted .pf-head h2 { color: var(--muted); }
.pf-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; padding-inline-start: 12px; border-inline-start: 4px solid transparent; border-image: linear-gradient(180deg, #7FFFFF, #42ACFD, #1249FF) 1; }
.pf-group.muted .pf-head { border-image: none; border-inline-start-color: var(--border-2); }
.pf-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-title h2 { font-size: 1.08rem; display: inline-flex; align-items: center; gap: 6px; }
.pf-title h2 .ic { color: var(--royal); }
.pf-kicker { font-size: .75rem; font-weight: 800; color: var(--royal); background: var(--primary-50); border-radius: 999px; padding: 1px 9px; }
.pf-count { font-size: .78rem; font-weight: 800; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 9px; }
.pf-note { margin: 0; font-size: .8rem; color: var(--faint); }
.pf-kpis { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-kpi { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 5px 10px; font-size: .8rem; color: var(--text); max-width: 100%; }
.pf-kpi:hover { text-decoration: none; border-color: var(--primary-100); background: var(--primary-50); }
.pf-kpi .ic { color: var(--royal); flex: none; }
.pf-kpi-l { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-kpi b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pf-kpi small { color: var(--faint); white-space: nowrap; }
.pbar.sm { width: 54px; height: 5px; }
.pf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pf-card { position: relative; display: flex; flex-direction: column; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 13px 14px 12px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; overflow: hidden; }
.pf-card::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--h-none); }
.pf-card.hl-on_track::before { background: var(--h-on); } .pf-card.hl-late::before { background: var(--h-late); } .pf-card.hl-stalled::before { background: var(--h-stalled); }
.pf-card.hl-done::before { background: var(--h-done); } .pf-card.hl-not_started::before { background: var(--h-idle); }
.pf-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(9, 9, 81, .1); border-color: var(--primary-100); }
.pf-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pf-name { font-size: .98rem; line-height: 1.4; }
.pf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .8rem; color: var(--muted); }
.pf-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pf-prog .pbar { width: 120px; }
.pf-line { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); min-width: 0; }
.pf-line .ic { color: var(--royal); flex: none; }
.pf-line span.clamp1 { flex: 1; min-width: 0; }
.pf-line b { color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pf-line.late .ic { color: #c98a00; }
.pf-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .76rem; color: var(--faint); border-top: 1px dashed var(--border); padding-top: 7px; margin-top: auto; }
.pf-ms { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--muted); }
.pf-ms .ic { color: var(--royal); }
@media (max-width: 820px) { .pf-cards { grid-template-columns: 1fr; } .pf-bar { flex-direction: column; align-items: stretch; } }

/* ================= الأداء: التنفيذ مقابل المخطط، والمؤشرات، والأداء الكلي ================= */
.pbar.ex { position: relative; overflow: visible; }
.pbar.ex i { border-radius: 9px; }
.pbar.ex u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-inline-start: -1px; background: var(--navy); border-radius: 2px; text-decoration: none; }
.dev { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; line-height: 1.7; gap: 4px; }
.dev-ok { background: #e3f6ef; color: #12795a; } .dev-warn { background: #fff4d6; color: #8a5a00; } .dev-late { background: #fdeceb; color: #b42318; }
.score { display: inline-flex; align-items: center; gap: 4px; padding: 0 9px; border-radius: 999px; font-size: .74rem; white-space: nowrap; line-height: 1.8; border: 1px solid transparent; }
.score b { font-variant-numeric: tabular-nums; }
.score.good { background: #e3f6ef; color: #12795a; } .score.mid { background: #e6f3ff; color: #1266b0; }
.score.low { background: #fff4d6; color: #8a5a00; } .score.bad { background: #fdeceb; color: #b42318; } .score.none { background: var(--surface-2); color: var(--faint); }
.pg-track { overflow: visible; }
.pg-track u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-inline-start: -1px; background: var(--navy); border-radius: 2px; z-index: 1; text-decoration: none; }
.st-wrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; }
.st-hero { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(160deg, #f2f7ff, #ffffff); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.st-ring { position: relative; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.st-ring .ring { position: absolute; inset: 0; width: 120px; height: 120px; }
.st-ring .ring-bg, .st-ring .ring-fg { stroke-width: 4; }
.st-ring b { font-size: 1.7rem; font-weight: 800; color: var(--navy); }
.st-k { margin: 0; font-weight: 800; font-size: 1rem; }
.st-sub { margin: 0; font-size: .8rem; color: var(--muted); }
.st-dq { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .76rem; color: var(--muted); }
.st-dq li { display: flex; gap: 6px; align-items: flex-start; }
.st-dq .ic { flex: none; margin-top: 2px; color: var(--royal); }
.st-table { display: flex; flex-direction: column; min-width: 0; }
.st-row { display: grid; grid-template-columns: minmax(170px, 1.3fr) minmax(120px, 1fr) minmax(120px, 1fr) 76px; gap: 14px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--border); border-radius: 8px; }
.st-row:hover:not(.st-head) { background: var(--surface-2); }
.st-head { font-size: .74rem; font-weight: 700; color: var(--muted); padding-top: 0; }
.st-name { font-size: .88rem; font-weight: 700; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-name small { font-weight: 400; color: var(--faint); font-size: .74rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st-cell { display: grid; grid-template-columns: 1fr 42px; gap: 8px; align-items: center; font-size: .82rem; position: relative; }
.st-cell b { text-align: end; font-variant-numeric: tabular-nums; }
.st-bar { position: relative; height: 10px; border-radius: 9px; background: var(--track); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 9px; }
i.st-ex { background: linear-gradient(270deg, #7FFFFF, #42ACFD 50%, #1249FF); }
i.st-kpi { background: linear-gradient(270deg, #9be8cc, #1BA784); }
.st-src { grid-column: 1 / -1; font-size: .75rem; color: var(--faint); margin-top: -4px; }
.st-how { margin-top: 12px; font-size: .82rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.st-how summary { cursor: pointer; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; }
.st-how ul { margin: 8px 0 2px; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 1180px) { .st-wrap { grid-template-columns: 1fr; } .st-hero { flex-direction: row; align-items: center; flex-wrap: wrap; } }
@media (max-width: 820px) {
  .st-row { grid-template-columns: 1fr 64px; gap: 6px 10px; }
  .st-row .st-cell { grid-column: 1 / -1; }
  .st-head span:nth-child(2), .st-head span:nth-child(3) { display: none; }
  .st-row > span:last-child { grid-row: 1; grid-column: 2; justify-self: end; }
}
.pf-gperf { display: inline-flex; flex-wrap: wrap; gap: 5px; margin-inline-start: 4px; }
.pf-prog { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-lbl { font-size: .74rem; color: var(--faint); min-width: 38px; }
.pf-scores { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.perf-card { border-radius: 14px; }
.perf-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.perf-head h2 { display: flex; align-items: center; gap: 7px; } .perf-head h2 .ic { color: var(--royal); }
.perf-head label { display: inline-flex; align-items: center; gap: 8px; }
.perf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.perf-box { display: flex; flex-direction: column; gap: 5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.perf-box.total { background: linear-gradient(160deg, #eef4ff, #ffffff); border-color: var(--primary-100); }
.perf-k { font-size: .76rem; color: var(--muted); font-weight: 700; }
.perf-v { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.perf-s { font-size: .74rem; color: var(--faint); line-height: 1.5; }
.perf-box .pbar.ex { width: 100%; }
.perf-tg { margin-top: 14px; }
.perf-tg h3 { display: flex; align-items: center; gap: 6px; font-size: .92rem; margin: 0 0 4px; }
.perf-tg h3 .ic { color: var(--royal); }
.perf-tg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 22px; }
.perf-tg-list .tg-row { border-top: 0; border-bottom: 1px dashed var(--border); }
.pf-targets { display: flex; flex-direction: column; }
.pf-targets .tg-row { padding: 5px 0; }
.pf-targets .tg-row:first-child { border-top: 0; padding-top: 2px; }
.pf-targets .tg-lbl { font-size: .8rem; }
@media (max-width: 900px) { .perf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ms-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ms-row .prog-in .input { width: 64px; }
.st-lbl { display: none; }
@media (max-width: 820px) {
  .st-cell { grid-template-columns: 62px 1fr 42px; }
  .st-lbl { display: block; font-style: normal; font-size: .75rem; color: var(--muted); }
  .st-src { grid-column: 2 / -1; }
}

/* ================= علامة الشرح ⓘ والشرح المختصر ================= */
.help-i { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; margin-inline-start: 4px; border: 0; border-radius: 50%; background: transparent; color: var(--faint); cursor: help; vertical-align: middle; flex: none; transition: color .12s ease, background .12s ease; }
.help-i:hover, .help-i:focus-visible { color: var(--royal); background: var(--primary-50); outline: none; }
.help-i .ic { width: 15px; height: 15px; }
.db-hero .help-i, .help-i.on-dark { color: #9fe9ff; }
.db-hero .help-i:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.help-tip { position: fixed; z-index: 130; max-width: 300px; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 12px; font-size: .8rem; line-height: 1.6; box-shadow: 0 10px 30px rgba(9, 9, 81, .35); opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .12s ease, transform .12s ease; left: 0; top: 0; }
.help-tip.on { opacity: 1; transform: none; }
.help-tip.pinned { pointer-events: auto; }
.help-tip b { display: block; font-size: .84rem; margin-bottom: 2px; color: #9fe9ff; }
.help-tip p { margin: 0; }
.help-more { display: block; margin-top: 6px; font-size: .75rem; color: #b9c3ff; }
.help-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; border: 0; border-radius: 999px; background: #fff; color: var(--navy); font: inherit; font-size: .76rem; font-weight: 700; padding: 4px 10px; cursor: pointer; }
.kpi-wrap { position: relative; display: flex; }
.kpi-wrap > .db-kpi { flex: 1; }
.kpi-wrap > .help-i { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .help-tip { transition: none; } }
@media print { .help-i, .help-tip { display: none !important; } }

/* ================= دليل المنصة ================= */
.guide { max-width: 1180px; }
.g-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.g-head h1 { font-size: 1.6rem; font-weight: 800; }
.g-head p { margin: 4px 0 0; }
.g-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--royal) !important; font-weight: 800; font-size: .8rem; margin: 0 !important; }
.g-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.g-search { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-2); border-radius: 999px; padding: 0 12px; background: var(--surface); color: var(--faint); min-width: min(360px, 100%); }
.g-search input { border: 0; outline: none; background: transparent; min-height: 40px; width: 100%; font-size: .9rem; }
.g-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.g-toc { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 8px; font-size: .84rem; scrollbar-width: thin; }
.g-toc summary { cursor: pointer; font-weight: 800; padding: 4px 8px 8px; list-style: none; }
.g-toc summary::-webkit-details-marker { display: none; }
.g-toc ul { list-style: none; margin: 0; padding: 0; }
.g-toc li { margin: 1px 0; }
.g-toc a { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; color: var(--text); font-weight: 700; }
.g-toc a:hover { background: var(--surface-2); text-decoration: none; }
.g-toc a .ic { color: var(--royal); flex: none; }
.g-toc ul ul a { font-weight: 400; color: var(--muted); padding-inline-start: 30px; font-size: .8rem; }
.g-toc a.on { background: var(--primary-50); color: var(--royal); }
.g-main { min-width: 0; }
.g-sec { scroll-margin-top: 16px; margin-bottom: 16px; border-radius: 14px; outline: none; }
.g-sec h2 { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; margin-bottom: 10px; }
.g-sec h2 .ic { color: var(--royal); }
.g-h3 { display: flex; align-items: center; gap: 6px; font-size: 1rem; margin: 18px 0 6px; scroll-margin-top: 16px; outline: none; border-radius: 8px; padding: 2px 4px; margin-inline-start: -4px; }
.g-anchor { opacity: 0; color: var(--faint); font-weight: 400; margin-inline-start: 4px; text-decoration: none; }
.g-h3:hover .g-anchor, .g-sec h2:hover .g-anchor, .g-anchor:focus { opacity: 1; }
.g-flash { animation: gflash 2.2s ease; }
@keyframes gflash { 0%, 30% { background: #fff6cc; box-shadow: 0 0 0 4px #fff0a8; } 100% { background: transparent; box-shadow: none; } }
.g-sec p { line-height: 1.85; }
.g-sum { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: 10px; padding: 9px 12px; }
.g-ul { margin: 6px 0 10px; padding-inline-start: 20px; line-height: 1.85; }
.g-ul li { margin: 3px 0; }
.g-formula { background: #0c0c4a; color: #e8ecff; border-radius: 10px; padding: 10px 14px; margin: 8px 0; font-weight: 700; font-size: .9rem; line-height: 1.8; border-inline-start: 4px solid #42ACFD; }
.g-box { border-radius: 10px; padding: 10px 12px; margin: 10px 0; border: 1px solid var(--border); background: var(--surface-2); }
.g-box > b { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: .86rem; }
.g-ex { background: #f2f9ff; border-color: #cfe5fb; } .g-ex > b { color: #1572c4; }
.g-tip { background: #effaf5; border-color: #c4ead9; } .g-tip > b { color: #12795a; }
.g-note { background: #fffaf0; border-color: #f3dfa9; } .g-note > b { color: #8a5a00; }
.g-see { display: inline-flex; align-items: center; gap: 2px; font-size: .84rem; font-weight: 700; margin-inline-start: 4px; }
.g-dl { display: grid; grid-template-columns: 190px 1fr; gap: 6px 16px; margin: 0; }
.g-dl dt { font-weight: 800; } .g-dl dd { margin: 0; color: var(--muted); }
@media (max-width: 900px) {
  .g-layout { grid-template-columns: 1fr; }
  .g-toc { position: static; max-height: none; }
  .g-dl { grid-template-columns: 1fr; } .g-dl dd { margin-bottom: 8px; }
}
@media print { .g-toc, .g-tools { display: none !important; } .g-layout { display: block; } .g-sec { break-inside: auto; } }

/* ================= التفاعل عند مرور المؤشر (التركيز والسياق) =================
   العنصر تحت المؤشر يبرز ويتحرك قليلًا، وتخفت العناصر المماثلة حوله لتسهل المقارنة، ومفتاح الألوان مرتبط بالرسم.
   الحركة بالتحويلات فقط (لا تغيّر التخطيط) وقصيرة، ولا تُطبَّق على اللمس، وتُلغى عند تفضيل «تقليل الحركة». */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --dim: .4; }
.pg-row, .wl-row, .bg-row, .st-row, .bl-row, .tg-row, .tg-proj, .mc-col, .rm-row, .pl-step, .dn-legend button, .db-list li, .feed li,
.mc-legend [data-hl], .rm-legend [data-hl], .mk { transition: opacity .18s ease, background-color .18s ease, transform .22s var(--ease-out), box-shadow .22s ease, filter .18s ease; }
.pg-track, .wl-bar, .bg-track, .st-bar, .bl-track, .tg-track, .mc-stack, .db-kpi-ic, .rm-span { transition: transform .25s var(--ease-out), filter .18s ease; }
.ring-fg { transition: stroke-width .2s ease; }
.dn-seg { transition: stroke-width .2s ease, opacity .18s ease, transform .25s var(--ease-out); }
.mc-stack { transform-origin: center bottom; }
.mc-col b { transition: transform .22s var(--ease-out), color .18s ease; }
.db-card { transition: box-shadow .25s ease, border-color .25s ease; }

@media (hover: hover) {
  .db-card:hover { box-shadow: 0 12px 32px rgba(9, 9, 81, .08); border-color: var(--primary-100); }
  /* الصفوف الشريطية: يتقدم الصف ويثخن شريطه، وتخفت الصفوف الأخرى */
  .pg-list:has(.pg-row:hover) .pg-row:not(:hover),
  .wl:has(.wl-row:hover) .wl-row:not(:hover),
  .bg-list:has(.bg-row:hover) .bg-row:not(:hover),
  .st-table:has(.st-row:not(.st-head):hover) .st-row:not(.st-head):not(:hover),
  .bl-group:has(.bl-row:hover) .bl-row:not(:hover),
  .tg-proj:has(.tg-row:hover) .tg-row:not(:hover),
  .perf-tg-list:has(.tg-row:hover) .tg-row:not(:hover) { opacity: var(--dim); }
  .pg-row:hover, .bg-row:hover, .wl-row:hover, .st-row:not(.st-head):hover { transform: translateX(-4px); }
  .pg-row:hover .pg-track, .wl-row:hover .wl-bar, .bg-row:hover .bg-track, .st-row:hover .st-bar, .bl-row:hover .bl-track, .tg-row:hover .tg-track { transform: scaleY(1.5); }
  .pg-row:hover .bar-fill, .wl-row:hover .bar-fill, .bg-row:hover .bar-fill, .st-row:hover .bar-fill, .bl-row:hover .bar-fill, .tg-row:hover .bar-fill { filter: saturate(1.3) brightness(1.04); }
  .pg-row:hover .pg-val, .bg-row:hover b, .wl-row:hover b, .tg-row:hover .tg-val em { color: var(--royal); }
  /* المشاريع في «المستهدف التشغيلي» */
  .tg-proj:hover { transform: translateY(-3px); background: var(--surface); border-color: var(--primary-100); box-shadow: 0 12px 28px rgba(9, 9, 81, .1); }
  /* أعمدة الأشهر: يرتفع العمود ويتسع، وتخفت الأعمدة الأخرى */
  .mc-cols:has(.mc-col:hover) .mc-col:not(:hover):not(.on) { opacity: var(--dim); }
  .mc-col:hover .mc-stack { transform: translateY(-5px) scaleX(1.15); filter: saturate(1.2); }
  .mc-col:hover b { transform: translateY(-5px); color: var(--royal); }
  /* خارطة الطريق: يبرز صف المشروع ومدته، وتخفت معالم المشاريع الأخرى */
  .rm-row:not(.rm-headrow):hover { background: var(--surface-2); }
  .rm-row:not(.rm-headrow):hover .rm-name { color: var(--royal); }
  .rm-row:not(.rm-headrow):hover .rm-span { transform: scaleY(1.6); filter: saturate(1.5); }
  .rm:has(.rm-row:not(.rm-headrow):hover) .rm-row:not(.rm-headrow):not(:hover) .rm-ms { opacity: .45; }
  /* مسار الفرص */
  .pl-step.has:hover { transform: translateY(-4px); filter: brightness(1.04); }
  .pl:has(.pl-step.has:hover) .pl-step:not(:hover):not(.on) { opacity: .55; }
  /* الحلقة ومفتاحها: يبتعد الجزء عن المركز ويعرض المركز عدده */
  .dn-wrap.peek .dn-seg:not(.hot) { opacity: .28; }
  .dn-seg.hot { stroke-width: 28; transform: translate(var(--dx, 0), var(--dy, 0)); }
  .dn-wrap.peek .dn-legend button:not(.hot) { opacity: .5; }
  .dn-legend button.hot { background: var(--surface-2); transform: translateX(-4px); }
  /* البطاقات العلوية */
  .db-kpi:hover .db-kpi-ic { transform: scale(1.12) rotate(-6deg); }
  .db-kpi:hover .ring-fg { stroke-width: 6.5; }
  /* القوائم */
  .db-list li:hover, .feed li:hover { background: var(--surface-2); box-shadow: inset -3px 0 0 var(--royal); }
  .mc-legend [data-hl]:hover, .rm-legend [data-hl]:hover { background: var(--surface-2); }
  /* صفحات الأقسام والملف والتقارير */
  .pf-card .pbar, .pf-card .tg-track { transition: transform .25s var(--ease-out); }
  .pf-card:hover .pbar, .pf-card:hover .tg-track { transform: scaleY(1.35); }
  .pf-card:hover .pbar i, .pf-card:hover .tg-track i { filter: saturate(1.25); }
  .pf-kpi, .stage-pill, .report-card, .perf-box { transition: transform .22s var(--ease-out), box-shadow .22s ease, border-color .18s ease; }
  .pf-kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(9, 9, 81, .08); }
  .stage-pill.has:hover { transform: translateY(-2px); }
  .report-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(9, 9, 81, .1); }
  .perf-box:hover { border-color: var(--primary-100); }
}
/* مفتاح الألوان المرتبط بالرسم */
.mc-legend [data-hl], .rm-legend [data-hl] { cursor: default; border-radius: 6px; padding: 1px 5px; }
.hl-on .mk:not(.hl-hot) { opacity: .15; }
.hl-on .tg-row.mk:not(.hl-hot), .hl-on .pg-row.mk:not(.hl-hot) { opacity: .3; }
.hl-on [data-hl]:not(.hl-hot) { opacity: .45; }
/* لوحة المفاتيح: التركيز يعادل المرور */
.pg-row:focus-visible, .bg-row:focus-visible, .mc-col:focus-visible, .pl-step:focus-visible, .dn-legend button:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .pg-row, .bg-row, .wl-row, .st-row, .tg-proj, .pl-step, .dn-legend button, .pf-kpi, .stage-pill, .report-card, .dn-seg,
  .pg-track, .wl-bar, .bg-track, .st-bar, .bl-track, .tg-track, .mc-stack, .mc-col b, .db-kpi-ic, .pbar, .rm-span { transform: none !important; transition: opacity .15s ease, background-color .15s ease !important; }
}

/* ================= المستهدف التشغيلي (أعلى صفحة المشروع) ================= */
.tgt-card { border-radius: 16px; border: 1px solid var(--primary-100); background: linear-gradient(165deg, #f2f7ff 0%, #ffffff 55%); }
.tgt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 6px; }
.tgt-head h2 { display: flex; align-items: center; gap: 7px; font-size: 1.08rem; margin: 0; }
.tgt-head h2 .ic { color: var(--royal); }
.tgt { padding: 12px 0 4px; }
.tgt + .tgt { border-top: 1px dashed var(--border-2); margin-top: 8px; }
.tgt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tgt-statement { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tgt-statement b { font-size: 1.2rem; font-weight: 800; line-height: 1.45; color: var(--navy); }
.tgt-src { align-self: flex-start; font-size: .75rem; font-weight: 800; color: var(--royal); background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: 999px; padding: 0 9px; line-height: 1.8; }
.tgt-src.alt { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.tgt-top .pace { font-size: .8rem; padding: 1px 10px; flex: none; }
.tgt-bar { position: relative; height: 14px; border-radius: 9px; background: var(--track); margin: 12px 0 10px; }
.tgt-bar i { display: block; height: 100%; border-radius: 9px; min-width: 3px; }
.tgt-bar u { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-inline-start: -1.5px; background: var(--navy); border-radius: 2px; z-index: 1; text-decoration: none; }
.tgt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.tgt-stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.tgt-stats dt { font-size: .76rem; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 2px; }
.tgt-stats dd { margin: 2px 0 0; font-size: 1.3rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.tgt-src-line { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.tgt-src-line .ic { flex: none; margin-top: 3px; color: var(--royal); }
.tgt-update { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tgt-update label { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 700; color: var(--muted); }
.tgt-update .input { width: 120px; }
.tgt-card.is-empty { background: var(--surface); border-style: dashed; }
/* ربط المهمة بالمستهدف (نافذة المهمة والإضافة السريعة) */
.tg-link { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; align-items: end; padding: 10px 12px; border-radius: 12px; background: var(--primary-50); border: 1px solid var(--primary-100); }
.tg-link label { display: flex; align-items: center; gap: 5px; }
.tg-link label .ic { color: var(--royal); }
.qa-tg { margin-top: 2px; }
/* جدول المستهدفات في صفحة الملف */
.mtable .c-plan { width: 72px; text-align: center; }
.mtable tr.is-plan td { background: #f5f9ff; }
.mtable .m-auto { display: block; margin-top: 3px; color: var(--royal); font-weight: 700; }
/* على الشاشات المتوسطة يتمرر الجدول داخل بطاقته بدل أن تتسع الصفحة كلها */
.metrics-card .metrics { overflow-x: auto; }
@media (max-width: 820px) {
  .tgt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tgt-statement b { font-size: 1.08rem; }
  .tg-link { grid-template-columns: minmax(0, 1fr); }
  .mtable, .mtable tbody, .mtable tr, .mtable td { display: block; width: 100%; }
  .mtable thead { display: none; }
  .mtable tr { border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; position: relative; }
  .mtable td { border: 0; padding: 4px 0; }
  .mtable td[data-label]:not(.c-plan)::before { content: attr(data-label); display: block; font-size: .76rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
  .mtable .c-plan { width: auto; text-align: start; }
  .mtable .c-rm { position: absolute; top: 4px; inset-inline-end: 4px; width: auto; padding: 0; }
  .mtable .input { min-width: 0; }
}
.tgt-mark { display: inline-flex; color: var(--royal); margin-inline-end: 4px; vertical-align: -1px; }
/* حقول رأس صفحة الملف: النوع والحالة والمسؤول بعناوين ظاهرة */
.file-picks { align-items: flex-end; gap: 8px 12px; }
.hpick { display: inline-flex; flex-direction: column; gap: 2px; }
.hpick > span { font-size: .75rem; font-weight: 700; color: var(--muted); }
.hpick-w { display: inline-flex; align-items: flex-end; gap: 2px; }
.hpick-w .help-i { margin-bottom: 8px; }

/* أهداف اللمس: 24×24 على الأقل (WCAG 2.2 — 2.5.8)، وأكبر على الجوال للعناصر المتكررة */
.crumbs a { display: inline-flex; align-items: center; min-height: 26px; }
.db-ins .linklike, .card-head a.small, .g-see { display: inline-flex; align-items: center; min-height: 26px; }
.g-anchor { display: inline-block; padding-inline: 6px; }
@media (max-width: 820px) {
  .tick { width: 28px; height: 28px; }
  .star { padding: 6px; }
  .help-i { width: 28px; height: 28px; }
}
/* الإعدادات: قائمة جانبية مجمّعة على الكمبيوتر، وصف تبويبات قابل للتمرير على الجوال */
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
.sn-label { margin: 0 6px 2px; font-size: .75rem; font-weight: 800; color: var(--faint); }
.sn-group { display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: var(--text); font-size: .9rem; font-weight: 600; min-height: 38px; }
.settings-nav a .ic { color: var(--muted); flex: none; }
.settings-nav a:hover { background: var(--surface-2); text-decoration: none; }
.settings-nav a.on { background: var(--primary-50); color: var(--primary); }
.settings-nav a.on .ic { color: var(--primary); }
.settings-body { min-width: 0; }
@media (max-width: 820px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 6px; gap: 4px; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .sn-group { flex-direction: row; gap: 4px; }
  .sn-label { display: none; }
  .settings-nav a { white-space: nowrap; padding: 6px 10px; }
}
.nw { white-space: nowrap; }
@media (min-width: 821px) { .filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
.chip.lg a { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; }
.tg-name, .rm-name { min-height: 26px; display: inline-flex; align-items: center; }
.pf-kpi small, .pf-name small, .bl-val small { font-size: .75rem; }
/* بطاقات الأقسام ضيقة: الأرقام والمتوقع في سطرين بدل قصّهما */
.pf-targets .tg-row { grid-template-areas: "lbl chip" "track track" "val val" "exp exp"; }
.pf-targets .tg-val { white-space: normal; }

/* ================= الخطة التشغيلية ================= */
.plan-kicker { color: var(--royal); margin: 0 0 2px; display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; }
.plan-empty { text-align: center; padding: 28px 18px; }
.plan-empty h2 { display: flex; align-items: center; justify-content: center; gap: 8px; }
.plan-sum { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px 20px; padding: 16px 18px; margin-bottom: 16px; border-radius: 16px; background: linear-gradient(165deg, #f2f7ff 0%, #ffffff 60%); border: 1px solid var(--primary-100); }
.ps-ring { position: relative; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.ps-ring .ring { position: absolute; inset: 0; width: 96px; height: 96px; }
.ps-ring .ring-bg, .ps-ring .ring-fg { stroke-width: 4; }
.ps-ring b { font-size: 1.45rem; font-weight: 800; color: var(--navy); }
.ps-k { margin: 0; font-size: 1.05rem; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.ps-txt .muted { margin: 2px 0 0; }
.ps-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ps-stats li { display: flex; flex-direction: column; align-items: center; min-width: 92px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.ps-stats b { font-size: 1.35rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.ps-stats span { font-size: .78rem; color: var(--muted); font-weight: 700; text-align: center; }
.ps-stats small { font-size: .75rem; color: var(--faint); }
.ps-stats li.warn { border-color: #f0dba9; background: var(--warn-50); }
.plan-goal { padding: 0; margin-bottom: 16px; border-radius: 16px; overflow: hidden; }
.pg-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.pg-num { width: 34px; height: 34px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #42ACFD, #1249FF); }
.pg-num.muted-num { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.pg-t { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pg-t h2 { margin: 0; font-size: 1.06rem; line-height: 1.45; }
.pg-scores { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pg-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.pg-body.one { grid-template-columns: minmax(0, 1fr); padding: 8px 18px 12px; }
.pg-col { padding: 12px 18px 14px; min-width: 0; }
.pg-col + .pg-col { border-inline-start: 1px solid var(--border); }
.pg-col h3 { display: flex; align-items: center; gap: 6px; font-size: .9rem; margin: 0 0 8px; color: var(--navy); }
.pg-col h3 .ic { color: var(--royal); }
.kr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.kr-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kr-lbl { font-weight: 800; font-size: .9rem; line-height: 1.5; color: var(--navy); }
.kr-hint { font-size: .76rem; color: var(--faint); }
.kr-bar { position: relative; height: 10px; border-radius: 9px; background: var(--track); overflow: hidden; }
.kr-bar i { display: block; height: 100%; border-radius: 9px; }
i.kr-good { background: var(--h-done); } i.kr-mid { background: var(--h-on); } i.kr-low { background: var(--h-late); } i.kr-bad { background: #E45757; } i.kr-na { background: transparent; }
.kr-val { font-size: .82rem; color: var(--muted); }
.kr-val b { color: var(--text); font-variant-numeric: tabular-nums; }
.kr-val em { font-style: normal; font-weight: 800; color: var(--text); margin-inline-start: 4px; }
.pr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; color: var(--text); border-bottom: 1px dashed var(--border); }
.pr:hover { background: var(--surface-2); text-decoration: none; }
.pr-n { display: flex; flex-direction: column; min-width: 0; }
.pr-n b { font-size: .9rem; }
.pr-n small { font-size: .76rem; color: var(--faint); }
.pr-t { display: flex; flex-direction: column; min-width: 0; font-size: .84rem; }
.pr-st { font-weight: 700; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-v { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.pr-c { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.st-more { margin-top: 14px; }
@media (max-width: 820px) {
  .plan-sum { grid-template-columns: auto minmax(0, 1fr); }
  .ps-stats { grid-column: 1 / -1; }
  .ps-stats li { flex: 1 1 90px; }
  .pg-body { grid-template-columns: minmax(0, 1fr); }
  .pg-col + .pg-col { border-inline-start: 0; border-top: 1px solid var(--border); }
  .pr { grid-template-columns: minmax(0, 1fr) auto; }
  .pr-t { grid-column: 1 / -1; grid-row: 2; }
}
@media print {
  .plan-goal { break-inside: avoid; }
  .pg-num, .kr-bar i, .ring-fg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* المستهدف التشغيلي في الرئيسية: صف مختصر لكل مستهدف داخل بطاقة قابلة للطي */
.tg-fold .tg-seg { margin-bottom: 10px; }
.tg-sum { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tg-list { display: flex; flex-direction: column; }
.tg-line { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 1.7fr) minmax(90px, 1.1fr) minmax(130px, auto) 92px; align-items: center; gap: 12px; padding: 8px; border-bottom: 1px dashed var(--border); border-radius: 8px; color: var(--text); }
.tg-line:last-child { border-bottom: 0; }
.tg-line:hover { background: var(--surface-2); text-decoration: none; }
.tl-name { display: flex; flex-direction: column; min-width: 0; }
.tl-name b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-name small { font-size: .75rem; color: var(--faint); }
.tl-st { font-size: .86rem; font-weight: 700; color: var(--navy); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-st .tg-auto { margin-inline-start: 6px; }
.tl-bar { position: relative; height: 8px; border-radius: 9px; background: var(--track); }
.tl-bar i { display: block; height: 100%; border-radius: 9px; }
.tl-bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-inline-start: -1px; background: var(--navy); border-radius: 2px; z-index: 1; text-decoration: none; }
.tl-val { display: flex; flex-direction: column; font-size: .84rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-val b { color: var(--text); }
.tl-val em { font-style: normal; font-weight: 800; margin-inline-start: 4px; }
.tl-val small { font-size: .75rem; color: var(--faint); }
.tg-line .pace { justify-self: end; }
.tl-bar, .tg-line { transition: transform .22s var(--ease-out, ease), opacity .18s ease, background-color .18s ease; }
@media (hover: hover) {
  .tg-list:has(.tg-line:hover) .tg-line:not(:hover) { opacity: var(--dim, .4); }
  .tg-line:hover { transform: translateX(-4px); }
  .tg-line:hover .tl-bar { transform: scaleY(1.5); }
}
.hl-on .tg-line.mk:not(.hl-hot) { opacity: .3; }
@media (max-width: 1180px) { .tg-sum { display: none; } }
@media (max-width: 820px) {
  .tg-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name chip" "st st" "bar val"; gap: 4px 10px; padding: 10px 4px; }
  .tl-name { grid-area: name; } .tg-line .pace { grid-area: chip; } .tl-st { grid-area: st; white-space: normal; } .tl-bar { grid-area: bar; } .tl-val { grid-area: val; }
}
@media (prefers-reduced-motion: reduce) { .tg-line, .tl-bar { transform: none !important; } }
@media (max-width: 820px) {
  .tl-name { flex-direction: row; align-items: baseline; gap: 6px; flex-wrap: wrap; }
  .tl-val { flex-direction: row; align-items: baseline; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
}
/* التصدير والمشاركة */
.exp-ready { display: flex; align-items: center; gap: 12px; }
.exp-ready > .ic { color: var(--ok); flex: none; }
.exp-ready b { word-break: break-word; }

/* ================= لوحة القيادات (#/leaders) =================
   عرض تنفيذي للرئيس التنفيذي: يبني على أنماط لوحة القيادة (db-*)، ويضيف هويات المنتجات والمصفوفة والجدول الموحد. */
.ld, .ld-dr { --ld-ok: #1BA784; --ld-on: #42ACFD; --ld-late: #F5B000; --ld-bad: #E45757; --ld-ns: #B9BFD3; }
.ld-hero { padding-bottom: 84px; }
.ld-hero-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.ld-updates { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: 3px; }
.ld-upd-l { color: #9fe9ff; font-size: .78rem; font-weight: 700; padding: 0 10px; }
.ld-upd { color: #dfe4ff; padding: 5px 13px; border-radius: 999px; font-size: .84rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ld-upd:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.ld-upd.on { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.ld-cmp { margin: 0; display: inline-flex; align-items: center; gap: 6px; color: #c8d0ff; font-size: .82rem; }
.ld-headline { position: relative; z-index: 1; margin: 12px 0 0; max-width: 980px; font-size: 1.02rem; line-height: 1.75; color: #fff; font-weight: 600; }
.ld-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: -62px; }
.ld-kpis .ld-ring { grid-area: ring; align-self: end; }
.ld-ring-fg { transition: stroke-dasharray .9s cubic-bezier(.2, .7, .2, 1); }
.ld-dl { display: inline-flex; align-items: center; gap: 1px; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 0 6px; vertical-align: middle; }
.ld-dl.up { color: var(--ok); background: var(--ok-50); } .ld-dl.down { color: var(--danger); background: var(--danger-50); } .ld-dl.same { color: var(--muted); background: var(--surface-2); }

/* الحالة والأشرطة والهوية */
.ld-st { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; white-space: nowrap; padding: 2px 9px 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.ld-st i { width: 8px; height: 8px; border-radius: 50%; background: var(--ld-ns); flex: none; }
.ld-st.ld-done { background: #e8f7f0; border-color: #bfe8d6; color: #13704f; } .ld-st.ld-done i { background: var(--ld-ok); }
.ld-st.ld-on { background: #eaf5ff; border-color: #c4e3fd; color: #0d5fa3; } .ld-st.ld-on i { background: var(--ld-on); }
.ld-st.ld-late { background: #fff7e3; border-color: #f6dfa0; color: #8a5a00; } .ld-st.ld-late i { background: var(--ld-late); }
.ld-st.ld-stalled { background: #fdeeed; border-color: #f6c9c5; color: #a82c22; } .ld-st.ld-stalled i { background: var(--ld-bad); }
.ld-bar { position: relative; display: block; height: 7px; border-radius: 99px; background: var(--track, #E8ECF7); overflow: hidden; min-width: 60px; flex: 1; }
.ld-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; background: linear-gradient(90deg, #42ACFD, #1249FF); }
.ld-bar.ex i { background: linear-gradient(90deg, #1818A0, #111182); }
.ld-bar.ach i { background: linear-gradient(90deg, #7FFFFF, #42ACFD 35%, #1249FF); }
.ld-anim .ld-bar i { transform-origin: right center; transform: scaleX(0); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
html[dir="rtl"] .ld-anim .ld-bar i, .ld-anim .ld-bar i { transform-origin: right center; }
.ld-anim.ld-in .ld-bar i { transform: scaleX(1); }
.ld-id { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ld-id-n { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-logo { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; flex: none; }
.ld-logo.s { width: auto; min-width: 38px; max-width: 80px; height: 26px; padding: 2px 4px; } .ld-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ld-logo.s img { max-width: 72px; height: 100%; width: auto; }
.ld-mono { --pc: #1818A0; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; font-weight: 800; border-radius: 9px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pc) 78%, #fff), var(--pc)); }
.ld-mono.s { min-width: 38px; height: 26px; padding: 0 6px; font-size: .72rem; }
.ld-tag { display: inline-block; font-size: .7rem; font-weight: 700; color: #8a5a00; background: #fff7e3; border: 1px solid #f6dfa0; border-radius: 999px; padding: 0 7px; margin-inline-start: 4px; vertical-align: middle; }
.ld-k { display: block; font-size: .74rem; color: var(--muted); font-weight: 700; }
.ld-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: start; }
.ld-link:hover .ld-id-n { text-decoration: underline; }

/* المصفوفة */
.ld-mx { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--font); }
.ld-q { stroke: none; } .ld-q.good { fill: #effaf5; } .ld-q.warn { fill: #fff8e8; } .ld-q.info { fill: #eef5ff; } .ld-q.bad { fill: #fdf1f0; }
.ld-q-l { font-size: 11.5px; font-weight: 800; fill: #6b7098; opacity: .9; }
.ld-gl { stroke: #e3e8f4; stroke-width: 1; } .ld-tk { font-size: 10.5px; fill: #8a8fb3; }
.ld-ax { font-size: 12px; font-weight: 800; fill: var(--navy); }
.ld-dot { cursor: pointer; outline: none; }
.ld-dot-h { fill: transparent; }
.ld-dot-r { opacity: 0; transition: opacity .15s ease; }
.ld-dot:hover .ld-dot-r, .ld-dot:focus-visible .ld-dot-r { opacity: 1; }
.ld-dot-l { font-size: 11px; font-weight: 700; fill: var(--navy); paint-order: stroke; stroke: #fff; stroke-width: 3.5px; stroke-linejoin: round; }
.ld-lbl { cursor: pointer; } .ld-lbl:hover { fill: var(--royal); }
.ld-dot-n { font-size: 10px; font-weight: 800; pointer-events: none; }
.ld-mxw { position: relative; }
.ld-tip { position: absolute; inset-inline-start: auto; z-index: 5; pointer-events: none; width: max-content; max-width: 250px; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(9, 9, 81, .16); padding: 10px 12px; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; visibility: hidden; transition: opacity .12s ease; text-align: start; }
.ld-tip.on { opacity: 1; visibility: visible; } .ld-tip.below { transform: translate(-50%, 12px); }
.ld-tip b { display: block; color: var(--navy); font-size: .86rem; line-height: 1.35; margin-bottom: 6px; }
.ld-tip-g { display: flex; gap: 16px; margin-top: 8px; } .ld-tip-g div { display: grid; gap: 1px; }
.ld-tip-g small { color: var(--muted); font-size: .7rem; } .ld-tip-g em { font-style: normal; font-weight: 800; font-size: 1.05rem; color: var(--navy); }
.ld-tip p { margin: 6px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.ld-mx-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 2px 0 6px; font-size: .78rem; }
.ld-mx-key > span { color: var(--muted); font-weight: 700; }
.ld-kb { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; cursor: pointer; color: var(--text); font: inherit; font-weight: 600; }
.ld-kb i { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: .68rem; font-weight: 800; }
.ld-kb:hover span, .ld-kb:focus-visible span { text-decoration: underline; }
.ld-mx-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .74rem; color: var(--faint); margin-top: 2px; }
.ld-mx-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 5px; vertical-align: middle; }
.ld-mx-leg i.o { background: linear-gradient(135deg, #F4774B, #42ACFD); } .ld-mx-leg i.r { border: 2px solid #F5B000; width: 8px; height: 8px; }
.ld-nomx { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--border); }
.ld-nomx-l { font-size: .78rem; color: var(--muted); font-weight: 700; }
.ld-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 4px 2px 10px; cursor: pointer; font: inherit; font-size: .8rem; }
.ld-pill em { font-style: normal; font-weight: 800; color: var(--navy-2); }
.ld-pill .ld-id-n { font-weight: 600; font-size: .8rem; }
.ld-pill:hover { border-color: var(--primary-100); background: var(--primary-50); }

/* المحفظة */
.ld-lg-n { margin-inline-start: auto; font-weight: 800; }
.ld-groups { display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ld-gbar-h { display: flex; justify-content: space-between; font-size: .84rem; margin-bottom: 4px; } .ld-gbar-h span { font-weight: 800; color: var(--navy-2); }
.ld-stack { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; background: var(--track, #E8ECF7); }
.ld-stack.big { height: 14px; } .ld-stack i { display: block; }

/* ما يحتاج قرار القيادة */
.ld-asks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ld-ask { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: linear-gradient(180deg, #fff, #fbfcff); }
.ld-ask-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ld-ask-n { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--navy); color: #fff; font-weight: 800; font-size: .8rem; flex: none; }
.ld-ask-b { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ld-ask-b p { margin: 2px 0 0; font-size: .88rem; line-height: 1.6; }
.ld-ask-sup { background: #f2f6ff; border-radius: 10px; padding: 8px 10px; } .ld-ask-sup p { font-weight: 700; color: var(--navy-2); }

/* المنتجات بهوياتها */
.ld-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ld-prod { --pc: #1818A0; --pa: #42ACFD; position: relative; display: flex; flex-direction: column; gap: 8px; text-align: start; font: inherit; color: var(--text); cursor: pointer;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; overflow: hidden; box-shadow: 0 4px 14px rgba(9, 9, 81, .05); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.ld-prod::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--pa), var(--pc)); }
.ld-prod:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(9, 9, 81, .12); border-color: color-mix(in srgb, var(--pc) 35%, var(--border)); }
.ld-prod.branded { background: linear-gradient(180deg, color-mix(in srgb, var(--pa) 9%, #fff), #fff 46%); }
.ld-prod-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.ld-prod-logo { display: inline-flex; align-items: center; height: 44px; max-width: 120px; }
.ld-prod-logo img { max-height: 44px; max-width: 120px; object-fit: contain; display: block; }
.ld-prod-logo.big { height: 58px; max-width: 160px; background: #fff; border-radius: 12px; padding: 6px 10px; box-shadow: 0 2px 10px rgba(9, 9, 81, .08); } .ld-prod-logo.big img { max-height: 46px; max-width: 140px; }
.ld-prod-mono { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--pa), var(--pc)); font-size: .95rem; }
.ld-prod-mono.big { min-width: 58px; height: 58px; font-size: 1.05rem; }
.ld-prod-name { font-weight: 800; font-size: 1.02rem; line-height: 1.35; }
.ld-prod-own { font-size: .78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; margin-top: -4px; }
.ld-prod-m { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 8px; }
.ld-prod-m .ld-k { grid-column: 1; } .ld-prod-m b { grid-column: 2; grid-row: 1; font-size: .95rem; white-space: nowrap; } .ld-prod-m b small { color: var(--muted); font-weight: 600; }
.ld-prod-m .ld-bar { grid-column: 1 / -1; }
.ld-prod-f { font-size: .74rem; color: var(--faint); display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; }
.ld-prod-f.stale { color: #b45309; font-weight: 700; } .ld-prod-f em { font-style: normal; color: #8a5a00; font-weight: 700; }

/* الجدول الموحد */
.ld-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ld-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ld-seg button { border: 0; background: transparent; color: var(--muted); padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.ld-seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 6px rgba(9, 9, 81, .12); }
.ld-tw { overflow-x: auto; margin: 0 -4px; }
.ld-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; min-width: 920px; }
.ld-tbl th { position: sticky; top: 0; background: var(--navy); color: #fff; font-weight: 700; font-size: .78rem; text-align: start; padding: 9px 10px; white-space: nowrap; }
.ld-tbl th:first-child { border-start-start-radius: 10px; } .ld-tbl th:last-child { border-start-end-radius: 10px; }
.ld-sort { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; } .ld-sort.on { color: var(--aqua); }
.ld-tbl td { padding: 8px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ld-tbl tbody tr { cursor: pointer; transition: background .12s ease; }
.ld-tbl tbody tr:nth-child(even) { background: #fafbff; }
.ld-tbl tbody tr:hover, .ld-tbl tbody tr:focus-visible { background: var(--primary-50); outline: none; }
.ld-tbl .num { text-align: center; white-space: nowrap; } .ld-tbl .num small { color: var(--muted); font-weight: 600; }
.ld-cell { display: flex; align-items: center; gap: 8px; min-width: 112px; } .ld-cell b { min-width: 36px; font-size: .82rem; }
.ld-cell .ld-bar { min-width: 44px; }
.ld-ind { color: var(--muted); font-size: .8rem; max-width: 200px; line-height: 1.45; }
.ld-tbl td:first-child { min-width: 190px; } .ld-tbl .ld-id { align-items: flex-start; } .ld-tbl .ld-id-n { white-space: normal; line-height: 1.4; padding-top: 2px; }
.ld-tbl td.ld-own { font-size: .8rem; color: var(--muted); min-width: 92px; line-height: 1.4; }
.ld-tbl td.muted, .ld-tbl td.ld-stale { white-space: nowrap; font-size: .8rem; }
.ld-stale { color: #b45309 !important; font-weight: 800; }
.ld-xrow { cursor: default !important; opacity: .92; }

/* الأهداف */
.ld-goals { display: grid; gap: 10px; }
.ld-goal { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.ld-goal-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ld-goal-t { display: inline-flex; align-items: center; gap: 8px; background: var(--primary-50); border-radius: 10px; padding: 3px 10px; text-align: start; }
.ld-goal-t small { font-size: .72rem; color: var(--muted); max-width: 210px; line-height: 1.3; } .ld-goal-t em { font-style: normal; font-weight: 800; font-size: 1.15rem; color: var(--royal); }
.ld-goal-i { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ld-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .78rem; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.ld-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--ld-ns); } .ld-chip:hover { border-color: var(--primary-100); background: var(--primary-50); }
.ld-goal-f { display: flex; align-items: center; gap: 8px; margin-top: 8px; } .ld-goal-f .ld-k { white-space: nowrap; } .ld-goal-f b { font-size: .82rem; }

/* المعالم */
.ld-msum { display: grid; gap: 8px; }
.ld-msum-n { display: flex; align-items: baseline; gap: 8px; } .ld-msum-n b { font-size: 2rem; font-weight: 800; color: var(--navy); } .ld-msum-n span { color: var(--muted); font-size: .86rem; }
.ld-mleg { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; }
.ld-mleg i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 5px; vertical-align: middle; }
.ld-h3 { display: flex; align-items: center; gap: 6px; font-size: .88rem; margin: 16px 0 8px; color: var(--navy); }
.ld-mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ld-mlist li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; }
.ld-mlist b { display: block; font-size: .84rem; line-height: 1.45; } .ld-mlist small { color: var(--muted); font-size: .74rem; }

/* خارج الخطة وتطوير الأعمال */
.ld-xlist { display: grid; gap: 8px; }
.ld-x { border: 1px solid var(--border); border-radius: 12px; }
.ld-x summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.ld-x summary::-webkit-details-marker { display: none; }
.ld-x summary .ld-id { flex: 1; } .ld-x-m { text-align: center; font-weight: 800; font-size: .9rem; } .ld-x-m .ld-k { font-size: .68rem; }
.ld-x[open] summary .ic:last-child { transform: rotate(90deg); }
.ld-x-b { padding: 0 14px 12px; font-size: .84rem; color: var(--muted); } .ld-x-b ul { margin: 6px 0 0; padding-inline-start: 18px; color: var(--text); }
.ld-bd { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ld-bd li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; }
.ld-bd b { display: block; font-size: .88rem; } .ld-bd small { color: var(--muted); font-size: .74rem; } .ld-bd p { margin: 0; font-size: .8rem; color: var(--muted); }
.ld-bd-s { font-size: .74rem; font-weight: 800; color: var(--navy-2); background: var(--primary-50); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
/* القوائم الطويلة بعرض الصفحة في عمودين */
.ld-bd.two, .ld-xlist.two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

/* ملاحظات المطابقة */
.ld-quality summary { list-style: none; cursor: pointer; margin: 0; } .ld-quality summary::-webkit-details-marker { display: none; }
.ld-quality details[open] summary > .ic { transform: rotate(90deg); }
.ld-qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.ld-qg { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; } .ld-qg h3 { font-size: .86rem; margin: 0 0 6px; display: flex; justify-content: space-between; }
.ld-qg h3 span { background: #fff; border-radius: 999px; padding: 0 8px; font-size: .74rem; } .ld-qg ul { margin: 0; padding-inline-start: 16px; font-size: .8rem; line-height: 1.65; }
.ld-src { display: flex; align-items: center; gap: 6px; justify-content: center; color: var(--faint); font-size: .78rem; margin: 18px 0 4px; }

/* لوح التفاصيل */
.ld-dr { --pc: #1818A0; --pa: #42ACFD; display: flex; flex-direction: column; min-height: 100%; }
.ld-dr-head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 20px 16px; color: #fff;
  background: radial-gradient(500px 200px at 100% -20%, rgba(127, 255, 255, .25), transparent 60%), linear-gradient(135deg, #090951, #1818A0); }
.ld-dr.branded .ld-dr-head { background: radial-gradient(500px 220px at 100% -30%, color-mix(in srgb, var(--pa) 55%, transparent), transparent 60%), linear-gradient(135deg, #090951, color-mix(in srgb, var(--pc) 55%, #111182)); }
.ld-dr-head .icon-btn { color: #fff; }
.ld-dr-t { display: flex; align-items: center; gap: 14px; } .ld-dr-t h2 { margin: 0; font-size: 1.35rem; }
.ld-dr-k { margin: 0; font-size: .74rem; color: #9fe9ff; font-weight: 700; } .ld-dr-g { margin: 2px 0 0; font-size: .82rem; color: #d7ddff; }
.ld-dr-body { padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 14px; }
.ld-dr-body h3 { display: flex; align-items: center; gap: 6px; font-size: .92rem; margin: 6px 0 2px; color: var(--navy); }
.ld-dr-st { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .8rem; }
.ld-dr-desc { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.ld-dr-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ld-dr-kpi > div { border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: grid; gap: 6px; background: linear-gradient(180deg, #fff, #f8faff); }
.ld-dr-kpi b { font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1.2; } .ld-dr-kpi b small { font-size: .9rem; color: var(--muted); } .ld-dr-kpi b em { font-style: normal; font-size: .95rem; color: var(--royal); }
.ld-dr-kpi small { color: var(--faint); font-size: .74rem; }
.ld-dr-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.ld-dr-meta div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; } .ld-dr-meta dt { font-size: .72rem; color: var(--muted); font-weight: 700; } .ld-dr-meta dd { margin: 2px 0 0; font-size: .84rem; font-weight: 700; }
.ld-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.ld-tl::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 7px; width: 2px; background: var(--border); }
.ld-tl li { position: relative; display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.ld-tl li > i { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--ld-ns); position: relative; z-index: 1; }
.ld-tl li.ld-done > i { border-color: var(--ld-ok); background: var(--ld-ok); } .ld-tl li.ld-on > i { border-color: var(--ld-on); }
.ld-tl li.ld-late > i { border-color: var(--ld-late); } .ld-tl li.ld-stalled > i { border-color: var(--ld-bad); }
.ld-tl b { display: block; font-size: .86rem; font-weight: 700; line-height: 1.45; } .ld-tl small { color: var(--muted); font-size: .74rem; }
.ld-dr-3 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ld-dr-3 > div { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; } .ld-dr-3 ul { margin: 4px 0 0; padding-inline-start: 18px; font-size: .86rem; line-height: 1.7; }
.ld-dr-sup { background: #f2f6ff; border-color: #d6e2ff !important; }

@media (max-width: 1180px) { .ld-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .ld-asks { grid-template-columns: 1fr; }
  .ld-bd li { grid-template-columns: 1fr; }
  .ld-bd.two, .ld-xlist.two { grid-template-columns: minmax(0, 1fr); }
  .ld-goals.wide, .ld-msw.wide, .ld-msw.wide .ld-mlist { grid-template-columns: minmax(0, 1fr); }
  .ldp-out { grid-template-columns: minmax(0, 1fr); }
  .ld-dr-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* على الجوال تصير الترويسة بلا خلفية كحلية (أسلوب Apple)، فتأخذ عناصرها ألوان النص الداكنة */
@media (max-width: 820px) {
  .ld-updates { background: var(--fill-2, #eef0f7); border: 0; }
  .ld-upd-l { color: var(--royal); }
  .ld-upd { color: var(--text); }
  .ld-upd:hover { background: rgba(9, 9, 81, .06); }
  .ld-upd.on { background: var(--surface); color: var(--navy); box-shadow: 0 3px 8px rgba(9, 9, 81, .12); }
  .ld-cmp { color: var(--muted); }
  .ld-headline { color: var(--text); font-weight: 600; }
}
@media (max-width: 640px) {
  .ld-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: 0; }
  .ld-ask-b, .ld-dr-kpi { grid-template-columns: 1fr; }
  .ld-headline { font-size: .92rem; }
  .ld-hero-row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .ld-anim .ld-bar i { transform: none; transition: none; } .ld-prod, .ld-ring-fg { transition: none; } }

/* لوحة القيادات: أبرز المنجزات وأرقام الأثر */
/* شبكة بصفوف متساوية: كل بطاقة رأس بسطر واحد، ثم ثلاث خانات ثابتة للأرقام، ثم ثلاثة منجزات بسطرين لكل منها */
.ld-ach { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 1180px) { .ld-ach { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ld-acard { --pc: #1818A0; --pa: #42ACFD; position: relative; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 16px 16px 12px; min-width: 0;
  border: 1px solid var(--border); border-radius: 16px; background: #fff; overflow: hidden; }
.ld-acard::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--pa), var(--pc)); }
.ld-acard.branded { background: linear-gradient(180deg, color-mix(in srgb, var(--pa) 8%, #fff), #fff 42%); }
.ld-acard header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ld-acard header { flex-wrap: nowrap; min-height: 34px; }
.ld-acard header .ld-link, .ld-acard header > .ld-id { flex: 1; min-width: 0; }
.ld-acard header .ld-id { max-width: 100%; }
.ld-acard header .ld-id-n { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-acard header .ld-st, .ld-acard header .ld-tag { flex: none; }
.ld-acard .ld-figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ld-acard .ld-fig { min-height: 76px; justify-content: center; }
.ld-acard .ld-fig span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ld-acard .ld-more { margin-top: auto; padding-top: 2px; }
.ld-acard-f { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 2px; }
.ld-acard-f .ld-more { margin-top: 0; padding-top: 0; }
/* علامة «خارج الاستراتيجية»: إطار متقطع بكحلي المجلس على كل عمل خارج الأهداف الاستراتيجية */
.ld-out { display: inline-flex; align-items: center; flex: none; font-size: .7rem; font-weight: 800; line-height: 1.6; color: #111182; background: #F1F3FF;
  border: 1.5px dashed #1818A0; border-radius: 999px; padding: 0 8px; white-space: nowrap; vertical-align: middle; }
.ld-out.sm { font-size: .66rem; padding: 0 7px; border-width: 1.3px; }
td > .ld-out, .ld-pill > .ld-out, .ld-prod-f > .ld-out, .ld-tip > .ld-out, .ld-gbar-h .ld-out, .ld-ach-h .ld-out { margin-inline-start: 6px; }
.ld-acard.out { border: 1.5px dashed #9AA1DC; }
.ld-pill.out { border-style: dashed; border-color: #9AA1DC; }
.ld-kpi-out { display: block; margin-top: 4px; }
.ld-dr-bs { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ld-dot-out { fill: none; stroke: #111182; stroke-width: 1.7; stroke-dasharray: 3.2 2.4; }
.ld-mx-leg i.x { border: 1.6px dashed #111182; width: 8px; height: 8px; }
/* مجموعتا المنجزات: المنتجات ثم البرامج والمشاريع */
.ld-ach-g + .ld-ach-g { margin-top: 24px; }
.ld-ach-h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.02rem; font-weight: 800; color: var(--navy); }
.ld-ach-n { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--primary-50); color: var(--navy-2); font-size: .78rem; font-weight: 800; }
.ldp-hl-nm { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
/* خانة المؤشر التشغيلي في البطاقة: عنوانها، والمتحقق من المستهدف، وشريط نسبته أسفلها */
.ld-fig.ind { position: relative; overflow: hidden; gap: 1px; border-color: color-mix(in srgb, var(--pc, #1818A0) 32%, #fff); }
.ld-fig.ind::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: color-mix(in srgb, var(--pc, #1818A0) 12%, #fff); }
.ld-fig-bar { position: absolute; inset-inline-start: 0; bottom: 0; z-index: 1; height: 4px; background: var(--pc, #1818A0); }
.ld-fig-k { font-size: .62rem; font-weight: 800; color: var(--muted); letter-spacing: 0; }
.ld-fig.ind.none > b { font-size: .95rem; color: var(--muted); }
/* ملاحظة المؤشر تحت خانته */
.ld-ind-note { display: flex; align-items: flex-start; gap: 5px; margin: -2px 0 0; padding: 5px 9px; border-radius: 9px; font-size: .74rem; line-height: 1.6;
  color: #5a4a00; background: #fff8e6; border: 1px solid #f3e2b3; }
.ld-ind-note svg { flex: none; margin-top: 2px; color: #a07a00; }
.ld-ind-note.in { margin: 6px 0 0; }
.ld-ind-note.prod { margin: 0; font-weight: 600; }
.ld-ind-n { display: flex; align-items: flex-start; gap: 4px; margin-top: 3px; font-size: .72rem; line-height: 1.5; color: #7a5d00; cursor: help; }
.ld-ind-n svg { flex: none; margin-top: 2px; }
.ldp-out-i { margin: 0; display: flex; align-items: baseline; gap: 8px; font-size: .84rem; color: var(--navy-2); font-weight: 700; }
/* ما يحتاج متابعة: بطاقة لكل مبادرة متأخرة أو متعثرة */
.ld-lcard::before { background: #F5B000; }
.ld-lcard.stalled::before { background: #E45757; }
/* سبب المتابعة ظاهر أعلى البطاقة: كهرماني للمتأخر وما يحتاج متابعة، وأحمر للمتعثر */
.ld-why { display: grid; gap: 3px; padding: 9px 12px; border-radius: 12px; background: #fff7e3; border: 1px solid #f6dfa0; }
.ld-why span { font-size: .72rem; font-weight: 800; color: #8a5a00; }
.ld-why p { margin: 0; font-size: .86rem; line-height: 1.65; font-weight: 700; color: #4a3200; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ld-why.stalled { background: #fdecec; border-color: #f5c2c2; }
.ld-why.stalled span { color: #b42318; } .ld-why.stalled p { color: #7a1a12; }
.ld-lrows { margin: 0; display: grid; gap: 8px; }
.ld-lrows div { display: grid; gap: 2px; }
.ld-lrows dt { font-size: .72rem; font-weight: 800; color: var(--muted); }
.ld-lrows dd { margin: 0; font-size: .85rem; line-height: 1.6; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ld-lrows dd small { color: var(--muted); font-size: .74rem; }
.ld-lrows .sup dd { color: var(--navy-2); font-weight: 700; }
/* لوحة القيادات لغير المالك (مثل الرئيس التنفيذي): اطلاع دون أدوات التعديل والترتيب والأقسام */
.sh-access { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 4px 0 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.sh-access .input { width: auto; min-width: 160px; }
.kind-pick { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kind-pick legend { margin-bottom: 6px; padding: 0; }
.kind-opt { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; }
.kind-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.kind-opt input { margin-top: 4px; accent-color: var(--primary); }
.kind-opt b { display: block; font-size: .9rem; } .kind-opt small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.kind-grants[hidden] { display: none; }
.ld-secs-h { display: grid; grid-template-columns: minmax(0, 1fr) 54px 74px; gap: 8px; padding: 0 10px; font-size: .76rem; font-weight: 800; color: var(--muted); }
.ld-sec2 { display: grid; grid-template-columns: minmax(0, 1fr) 54px 74px; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.ld-sec2 input { justify-self: center; width: 18px; height: 18px; accent-color: var(--primary); }
.ld-sec-t b { display: block; font-size: .88rem; } .ld-sec-t small { display: block; color: var(--muted); font-size: .76rem; }
.ld-sec-na { justify-self: center; font-size: .72rem; color: var(--faint); }
.mem-all h2 { display: flex; align-items: center; gap: 6px; margin: 0; }
@media (max-width: 600px) { .kind-pick { grid-template-columns: minmax(0, 1fr); } }
body.ld-ro .ld-ebtn, body.ld-ro .ld-hide, body.ld-ro .ld-dr-edit, body.ld-ro [data-manage], body.ld-ro [data-sections] { display: none !important; }
/* طلبات التغيير: دورة الطلب مراحلَ أعلى الصفحة، وسجل يبيّن الحالي والمقترح، وعرض تنفيذي لكل طلب */
.cr-top { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(170px, 1fr) minmax(0, 5fr); gap: 12px; margin: -62px 14px 14px; }
.cr-total, .cr-step { font: inherit; color: var(--text); text-align: start; cursor: pointer; }
.cr-total { display: grid; align-content: start; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 24px rgba(9, 9, 81, .08); }
.cr-total.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-100), 0 8px 24px rgba(9, 9, 81, .08); }
.cr-total b, .cr-step b { font-size: 1.75rem; font-weight: 800; line-height: 1.2; color: var(--navy); font-variant-numeric: tabular-nums; }
.cr-total small, .cr-step small { font-size: .74rem; line-height: 1.5; color: var(--muted); }
.cr-step-l { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; color: var(--muted); }
.cr-step-l svg { color: var(--royal); }
.cr-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 24px rgba(9, 9, 81, .08); }
.cr-step { position: relative; display: grid; align-content: start; gap: 2px; padding: 12px 16px 12px 20px; background: #fff; border: 0; }
.cr-step + .cr-step { border-inline-start: 1px solid var(--border); }
.cr-step:first-child { border-start-start-radius: 14px; border-end-start-radius: 14px; } .cr-step:last-child { border-start-end-radius: 14px; border-end-end-radius: 14px; }
.cr-step:not(:last-child)::after { content: ""; position: absolute; top: 50%; left: -7px; z-index: 1; width: 12px; height: 12px; background: inherit;
  border-top: 1px solid var(--border); border-left: 1px solid var(--border); transform: translateY(-50%) rotate(-45deg); }
.cr-step-n { position: absolute; top: 10px; left: 12px; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-50); color: var(--navy-2); font-size: .72rem; font-weight: 800; }
.cr-step:hover { background: var(--surface-2); }
.cr-step.on { background: var(--primary-50); box-shadow: inset 0 -3px 0 var(--primary); }
.cr-step.on .cr-step-n { background: var(--primary); color: #fff; }
.cr-step.zero b { color: var(--faint); font-weight: 700; }
.cr-note { display: flex; align-items: center; gap: 8px; margin: 0 14px 14px; padding: 10px 14px; border-radius: 12px; background: var(--warn-50); border: 1px solid #f3dca8; color: var(--warn); font-size: .86rem; font-weight: 700; }
.cr-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .84rem; font-weight: 700; color: var(--muted); }
@media (max-width: 1180px) { .cr-top { grid-template-columns: minmax(0, 1fr); } }
.cr-st { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 800; white-space: nowrap; padding: 2px 10px; border-radius: 999px;
  color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); }
.cr-st i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cr-type { display: inline-block; margin: 1px 0 1px 4px; padding: 1px 9px; border-radius: 999px; background: #EEF2FF; color: #1818A0; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.cr-imp { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .76rem; font-weight: 800; }
.cr-imp-0 { background: #e7f7f0; color: #157a5c; } .cr-imp-1 { background: #fff7e3; color: #8a5a00; } .cr-imp-2 { background: #fdecec; color: #b42318; }
.cr-tbl td { vertical-align: top; } .cr-tbl td small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.cr-tbl tbody tr { cursor: pointer; } .cr-tbl td:first-child { min-width: 0; }
.cr-code { font-weight: 800; color: var(--navy-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cr-req { min-width: 170px; max-width: 240px; } .cr-req b { color: var(--navy); } .cr-types { display: block; margin-top: 4px; }
.cr-why { max-width: 280px; line-height: 1.6; }
.cr-chg { min-width: 230px; max-width: 340px; }
.cr-stc { white-space: nowrap; } .cr-stc small { margin-top: 5px !important; }
.cr-rd { display: inline-flex !important; align-items: center; gap: 4px; color: var(--warn) !important; font-weight: 700; } .cr-rd.ok { color: var(--ok) !important; }
/* الحالي والمقترح */
.cr-ft { display: grid; gap: 5px; }
.cr-ft > div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.cr-ft span { font-size: .72rem; font-weight: 800; color: var(--faint); }
.cr-ft b { font-size: .88rem; line-height: 1.55; overflow-wrap: anywhere; }
.cr-ft-now b { font-weight: 500; color: var(--muted); }
.cr-ft-new span { color: var(--royal); } .cr-ft-new b { font-weight: 800; color: var(--navy-2); }
.cr-ft.big { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.cr-ft.big > div { display: block; padding: 10px 14px; border-radius: 12px; }
.cr-ft.big .cr-ft-now { background: var(--surface-2); border: 1px solid var(--border); }
.cr-ft.big .cr-ft-new { background: var(--primary-50); border: 1px solid var(--primary-100); }
.cr-ft.big span { display: block; margin-bottom: 3px; } .cr-ft.big b { font-size: 1.04rem; }
.cr-typesel { width: auto; min-height: 36px; padding: 4px 10px; font-size: .84rem; }
.cr-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 2px 0 10px; }
.cr-chk { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; cursor: pointer; }
.cr-chk input { width: 17px; height: 17px; accent-color: var(--primary); }
.cr-imps { display: flex; gap: 8px; margin: 2px 0 12px; }
.cr-impo { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border); cursor: pointer; font-weight: 700; font-size: .86rem; }
.cr-impo:has(input:checked) { border-color: currentColor; }
.cr-extras { display: grid; gap: 8px; margin-bottom: 8px; }
.cr-extra { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.ld-fs h3 .btn { margin-inline-start: 10px; vertical-align: middle; }
.drawer.wide.cr-x { width: min(860px, 100vw); }
.cr-v-ttl { margin: 3px 0 0; color: #e6ebff; font-size: .95rem; font-weight: 700; line-height: 1.6; }
.cr-v .ld-dr-g .cr-st { margin-inline-end: 6px; background: #fff; }
.cr-v .ld-dr-acts .btn { background: #fff; color: var(--navy); border-color: #fff; }
/* مسار الطلب في دورة الحالات */
.cr-path { list-style: none; margin: 0; padding: 12px 14px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.cr-path li { --c: var(--royal); display: flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; color: var(--faint); min-width: 0; }
.cr-path li i { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border-2); background: #fff; font-style: normal; font-size: .74rem; font-weight: 800; }
.cr-path li.done { color: var(--navy-2); } .cr-path li.done i { background: var(--c); border-color: var(--c); color: #fff; }
.cr-path li.now { color: var(--navy); font-weight: 800; } .cr-path li.now i { border-color: var(--c); color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 16%, transparent); }
.cr-miss { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--warn-50); border: 1px solid #f3dca8; color: var(--warn); }
.cr-miss > div { flex: 1; } .cr-miss b { font-size: .9rem; } .cr-miss p { margin: 2px 0 0; font-size: .84rem; color: #6b4a00; line-height: 1.7; }
/* خلاصة الطلب: أول ما يقرؤه صاحب القرار */
.cr-sum { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--primary-100); border-radius: 16px; background: linear-gradient(180deg, #fff, #f6f9ff); box-shadow: 0 6px 18px rgba(9, 9, 81, .06); }
.cr-sum-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cr-sum-h h3, .cr-vs h3 { margin: 0 !important; display: flex; align-items: center; gap: 7px; font-size: .95rem; color: var(--navy); }
.cr-sum-h h3 svg, .cr-vs h3 svg { color: var(--royal); }
.cr-sum-why span, .cr-ind span { display: block; font-size: .74rem; font-weight: 800; color: var(--faint); }
.cr-sum-why p { margin: 2px 0 0; font-size: .95rem; line-height: 1.75; color: var(--navy); }
.cr-sum-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.cr-sum-meta div { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.cr-sum-meta dt { font-size: .72rem; font-weight: 700; color: var(--muted); } .cr-sum-meta dd { margin: 4px 0 0; font-size: .86rem; font-weight: 700; }
/* أقسام العرض */
.cr-vs { display: grid; gap: 10px; padding: 12px 14px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.cr-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.cr-kv .w { grid-column: 1 / -1; }
.cr-kv dt { font-size: .74rem; font-weight: 700; color: var(--muted); } .cr-kv dd { margin: 2px 0 0; font-size: .9rem; line-height: 1.75; }
.cr-ind { margin: 0; font-size: .92rem; line-height: 1.7; }
.cr-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cr-figs > div { display: grid; align-content: start; gap: 3px; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); }
.cr-figs span { font-size: .72rem; font-weight: 700; color: var(--muted); }
.cr-figs b { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; color: var(--navy); line-height: 1.5; }
.cr-bar { display: block; height: 6px; border-radius: 4px; background: #e6ebf7; overflow: hidden; }
.cr-bar > i { display: block; height: 100%; border-radius: 4px; background: var(--royal); }
.cr-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cr-xr { display: block; margin-top: 3px; font-size: .82rem; color: var(--muted); }
.cr-just { margin: 0; padding-inline-start: 22px; display: grid; gap: 5px; font-size: .9rem; line-height: 1.75; }
.cr-just li::marker { color: var(--royal); font-weight: 800; }
/* عدّاد الجاهزية في النموذج */
.cr-meter { display: grid; gap: 6px; padding: 10px 14px; border-radius: 12px; background: var(--warn-50); border: 1px solid #f3dca8; }
.cr-meter[hidden], .cr-other[hidden] { display: none !important; }
.cr-meter.ok { background: var(--ok-50); border-color: #bfe5cf; }
.cr-meter-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .86rem; }
.cr-meter-t b { color: var(--warn); } .cr-meter.ok .cr-meter-t b { color: var(--ok); }
.cr-meter-t span { font-weight: 800; color: var(--navy-2); font-variant-numeric: tabular-nums; }
.cr-meter p { margin: 0; font-size: .8rem; color: #6b4a00; line-height: 1.7; }
.cr-meter .cr-bar > i { background: #D99000; } .cr-meter.ok .cr-bar > i { background: var(--ok); }
.cr-fs-key { border-color: var(--primary-100) !important; background: linear-gradient(180deg, #fff, #f7f9ff) !important; }
.ld-fs h3 small { font-weight: 600; font-size: .76rem; margin-inline-start: 6px; }
.cr-now textarea { background: var(--surface-2); }
.cr-new textarea { background: var(--primary-50); border-color: var(--primary-100); } .cr-new > label { color: var(--royal); }
/* تسجيل القرار */
.cr-dec { display: grid; gap: 12px; }
.cr-dec-o { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cr-dec-o legend { margin-bottom: 6px; padding: 0; }
.cr-dec-c { position: relative; display: grid; place-items: center; padding: 11px 6px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 800; color: var(--muted); text-align: center; }
.cr-dec-c input { position: absolute; opacity: 0; pointer-events: none; }
.cr-dec-c:has(input:checked) { border-color: var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); }
.cr-dec-c:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.cr-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cr-hist li { border-inline-start: 3px solid var(--primary-100); padding: 2px 10px; font-size: .84rem; }
.cr-hist b { color: var(--navy-2); } .cr-hist p { margin: 2px 0 0; color: var(--muted); }
@media (max-width: 820px) {
  .cr-top { margin-top: -44px; }
  .cr-flow { grid-template-columns: repeat(5, minmax(128px, 1fr)); overflow-x: auto; }
  .cr-step:not(:last-child)::after { display: none; }
  .cr-extra, .cr-ft.big, .cr-kv, .cr-sum-meta { grid-template-columns: minmax(0, 1fr); }
  .cr-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cr-path { grid-template-columns: repeat(5, minmax(92px, 1fr)); overflow-x: auto; }
  .cr-dec-o { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* عرض الطلب على الجوال: الأزرار فوق العنوان، والتعديل من الأعلى، والحذف بأيقونة، فيتسع زر الإجراء التالي */
  .cr-dr .ld-dr-head { flex-wrap: wrap; }
  .cr-dr .ld-dr-head .ld-dr-t { flex: 1 1 100%; order: 2; }
  .cr-dr .ld-dr-acts { order: 1; flex: 1 1 100%; justify-content: flex-end; }
  .cr-v .ld-ed-foot [data-edit] { display: none; }
  .cr-v .ld-ed-foot .ld-danger span { display: none; }
  /* السجل بطاقاتٍ على الجوال: الرقم والحالة، ثم الطلب، ثم الحالي والمقترح، ثم المبرر والأثر */
  .cr-tbl { min-width: 0; }
  .cr-tbl thead { display: none; }
  .cr-tbl, .cr-tbl tbody { display: block; }
  .cr-tbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 12px 8px; }
  .cr-tbl td { display: block; padding: 0; border: 0; max-width: none; min-width: 0; }
  .cr-tbl td.cr-stc { grid-column: 2; grid-row: 1; text-align: end; white-space: normal; }
  .cr-tbl td.cr-req, .cr-tbl td.cr-chg, .cr-tbl td.cr-why, .cr-tbl td.cr-impc { grid-column: 1 / -1; }
  .cr-tbl tbody tr { border-bottom: 1px solid var(--border); }
  .cr-tbl td.cr-why { font-size: .84rem; color: var(--muted); }
  .cr-tbl td.cr-why::before { content: "المبرر: "; font-weight: 800; color: var(--faint); }
  .cr-tbl td.cr-impc::before { content: "مستوى الأثر: "; font-size: .78rem; font-weight: 800; color: var(--faint); }
}
/* ملاحظات الرئيس التنفيذي: زر ثابت أسفل الشاشة (يسارها في اللوحة، ويمينها في وضع العرض حيث زر الخروج يسارًا)، وصندوق كتابة فوقه */
.ldn-fab { position: fixed; bottom: calc(22px + var(--sab, 0px)); inset-inline-end: 22px; z-index: 56; display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #1818A0, #1249FF); box-shadow: 0 10px 28px rgba(18, 73, 255, .35); }
.ldn-fab:hover { filter: brightness(1.08); }
.ldn-fab b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #fff; color: #1818A0; font-size: .8rem; }
body.ld-presenting .ldn-fab { inset-inline-end: auto; inset-inline-start: 22px; bottom: 16px; }
.ldn-panel { position: fixed; bottom: calc(80px + var(--sab, 0px)); inset-inline-end: 22px; z-index: 70; width: min(420px, calc(100vw - 24px)); max-height: min(78vh, 640px); overflow: auto;
  display: grid; gap: 10px; padding: 14px 16px 16px; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px rgba(9, 9, 81, .25); }
body.ld-presenting .ldn-panel { inset-inline-end: auto; inset-inline-start: 22px; bottom: 74px; }
.ldn-panel header { display: flex; align-items: center; gap: 8px; } .ldn-panel header b { flex: 1; display: inline-flex; align-items: center; gap: 6px; color: var(--navy); }
.ldn-n { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--primary-50); color: var(--navy-2); font-size: .78rem; font-weight: 800; display: inline-grid; place-items: center; }
.ldn-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.ldn-kinds button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .82rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.ldn-kinds button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.ldn-panel textarea { min-height: 84px; resize: vertical; font-size: .95rem; }
.ldn-ctx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.ldn-ctx label { display: grid; gap: 3px; font-size: .74rem; font-weight: 700; color: var(--muted); }
.ldn-ctx .input { min-height: 36px; padding: 6px 9px; font-size: .84rem; }
.ldn-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ldn-hint { font-size: .74rem; color: var(--faint); }
.ldn-err { margin: 0; font-size: .8rem; color: var(--danger); }
.ldn-recent { border-top: 1px solid var(--border); padding-top: 8px; } .ldn-recent:empty { display: none; }
.ldn-recent-h { margin: 0 0 6px; font-size: .74rem; font-weight: 800; color: var(--muted); }
.ldn-recent ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ldn-recent li { font-size: .84rem; line-height: 1.6; } .ldn-recent li small { display: block; color: var(--faint); font-size: .72rem; }
.ldn-k { display: inline-block; margin-inline-end: 6px; padding: 0 8px; border-radius: 999px; background: #EEF2FF; color: #1818A0; font-size: .72rem; font-weight: 800; vertical-align: 1px; }
.ldn-seg { margin-bottom: 12px; } .ldn-seg b { font-weight: 800; color: var(--navy-2); }
.ldn-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ldn-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.ldn-row.done { background: var(--surface-2); } .ldn-row.done .ldn-body p { color: var(--muted); }
.ldn-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--primary-50); color: var(--navy-2); font-weight: 800; font-size: .82rem; }
.ldn-body p { margin: 0; font-size: .92rem; line-height: 1.7; color: var(--text); } .ldn-body small { color: var(--muted); font-size: .76rem; }
.ldn-st { min-height: 34px; padding: 4px 8px; font-size: .82rem; width: auto; }
.ldn-stb { font-size: .76rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #fff7e3; color: #8a5a00; }
.ldn-stb.doing { background: #e8f2ff; color: #1249FF; } .ldn-stb.done { background: #e7f7f0; color: #157a5c; }
.ldp-notes .ldn-row { grid-template-columns: auto minmax(0, 1fr) auto; }
@media (max-width: 820px) { .ldn-row { grid-template-columns: auto minmax(0, 1fr); } .ldn-ctx { grid-template-columns: minmax(0, 1fr); } .ldn-fab span { display: none; } }
@media print { .ldn-fab, .ldn-panel { display: none !important; } }
/* ترتيب المشاريع بالأولوية */
.ld-ordg + .ld-ordg { margin-top: 18px; }
.ld-ordg h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .92rem; color: var(--navy); }
.ld-ords { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ld-ord { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: grab; }
.ld-ord:hover { border-color: var(--primary-100); }
.ld-ord.dragging { opacity: .55; border-style: dashed; cursor: grabbing; }
.ld-ord-h { display: inline-flex; color: var(--faint); }
.ld-ord-n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 999px; background: var(--primary-50); color: var(--navy-2); font-size: .8rem; font-weight: 800; }
.ld-ord .ld-id { min-width: 0; } .ld-ord .ld-id-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* إظهار الأقسام وإخفاؤها */
.ld-head-tools { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ld-hide { width: 34px; height: 34px; color: var(--faint); }
.ld-hide:hover { color: var(--navy); background: var(--primary-50); }
.ld-hidden-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 16px 4px 0; font-size: .8rem; color: var(--muted); }
.ld-secs { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; gap: 6px; }
.ld-sec { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.ld-sec input { flex: none; margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); }
.ld-sec b { display: block; font-size: .9rem; } .ld-sec small { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.ld-sec:has(input:not(:checked)) { border-style: dashed; background: var(--surface-2); }
.ld-sec:has(input:not(:checked)) b { color: var(--muted); }
/* الأهداف بعرض الصفحة في ثلاثة أعمدة، والمعالم: الملخص بجانب المتأخر */
.ld-goals.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 1180px) { .ld-goals.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ld-msw.wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.ld-msw.wide .ld-h3 { margin-top: 0; }
.ld-msw.wide .ld-mlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* المصفوفة وحدها بعرض الصفحة لا تتمدد أكثر من حجمها المقروء */
.db-card.c12 .ld-mxw { max-width: 820px; margin-inline: auto; }
.ld-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.ld-fig { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; border-radius: 12px; cursor: default;
  background: color-mix(in srgb, var(--pc, #1818A0) 6%, #fff); border: 1px solid color-mix(in srgb, var(--pc, #1818A0) 15%, #fff); }
.ld-fig b { align-self: flex-start; font-size: 1.4rem; font-weight: 800; line-height: 1.1; color: var(--pc, #1818A0); font-variant-numeric: tabular-nums; }
.ld-fig b small { font-size: .74rem; font-weight: 700; color: var(--muted); }
.ld-fig b { max-width: 100%; white-space: nowrap; }
/* وضع العرض أمام القيادات: لا أزرار تعديل */
body.ld-presenting .ld-dr-edit, body.ld-presenting .ld-ebtn { display: none !important; }
/* شريحة «أبرز ما في هذا التحديث» */
.ldp-hl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.ldp-hl-c { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 18px; border: 1px solid var(--border); background: linear-gradient(180deg, #fff, #f8faff); }
.ldp-hl-c h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; color: var(--navy); }
.ldp-hl-c.ok { border-color: #cdeee2; background: linear-gradient(180deg, #f2fbf7, #fff); } .ldp-hl-c.ok h3 .ic { color: #1BA784; }
.ldp-hl-c.warn { border-color: #f6dfa0; background: linear-gradient(180deg, #fffaf0, #fff); } .ldp-hl-c.warn h3 .ic { color: #B45309; }
.ldp-hl-c > p { margin: auto 0 0; font-size: .76rem; color: var(--muted); }
.ldp-hl-c ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ldp-hl-c li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ldp-hl-c li .ld-link { min-width: 0; } .ldp-hl-c li > b { flex: none; font-size: 1.25rem; font-weight: 800; color: #1BA784; }
.ldp-hl-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ldp-hl-figs div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--primary-50); }
.ldp-hl-figs b { align-self: flex-start; font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1.1; white-space: nowrap; }
.ldp-hl-figs span { font-size: .84rem; font-weight: 700; color: var(--text); } .ldp-hl-figs small { font-size: .74rem; color: var(--muted); }
.ldp-hl-n { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ldp-hl-n div { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 14px; background: #fff7e3; }
.ldp-hl-n b { font-size: 2rem; font-weight: 800; color: #8a5a00; line-height: 1.1; } .ldp-hl-n span { font-size: .84rem; font-weight: 700; color: #8a5a00; }
.ldp-hl-late li { padding: 6px 0; }
.ldp-end { align-items: flex-start; } .ldp-end h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); }
@media (max-width: 1100px) { .ldp-hl { grid-template-columns: minmax(0, 1fr); } }
/* الشعار الأبيض على لوح منتجه الداكن (مثل شطر) */
.ld-logo[style], .ld-prod-logo[style] { padding: 3px 6px; }
.ld-fig.long b { font-size: 1.04rem; } .ld-fig.xlong b { font-size: .92rem; }
.ld-form input[dir="ltr"] { text-align: right; }
.ld-fig span { font-size: .76rem; font-weight: 600; line-height: 1.4; color: var(--text); opacity: .82; }
.ld-figs.s { margin: 6px 0 8px; } .ld-figs.s .ld-fig b { font-size: 1.15rem; }
.ld-wins { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ld-wins li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6px; font-size: .85rem; line-height: 1.6; color: var(--text); }
.ld-wins li .ic { color: var(--ld-ok); margin-top: 4px; }
.ld-wins li span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ld-more { align-self: flex-start; margin: 0; background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; font-weight: 700; color: var(--royal); cursor: pointer; }
button.ld-more:hover { text-decoration: underline; }

/* لوحة القيادات: أزرار التعديل */
.db-card-head .ld-ebtn, .ld-tools .ld-ebtn { flex: none; gap: 5px; }
.ld-dr { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.ld-dr-acts { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.ld-dr-edit { gap: 5px; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }
.ld-dr-edit:hover { background: rgba(255, 255, 255, .26); }

/* لوحة القيادات: نماذج التعديل */
.ld-form { gap: 14px; }
.ld-fs { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px 14px; background: #fff; }
.ld-fs h3 { margin: 0 0 10px !important; font-size: .92rem; color: var(--navy); }
.ld-fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.ld-fgrid .span2 { grid-column: 1 / -1; }
.ld-hint { margin: -2px 0 10px; font-size: .78rem; line-height: 1.6; color: var(--muted); }
.ld-req { color: var(--ld-bad, #E45757); }
.ld-erow { display: grid; gap: 8px; align-items: center; margin-bottom: 8px; }
.ld-ms-row { grid-template-columns: minmax(0, 1fr) 170px 128px auto; }
.ld-fig-row { grid-template-columns: 150px minmax(0, 1fr) auto; }
.ld-row-tools { display: inline-flex; gap: 2px; flex: none; }
.ld-row-tools .icon-btn { width: 32px; height: 32px; }
.ld-up .ic { transform: rotate(90deg); } .ld-down .ic { transform: rotate(-90deg); }
.ld-ed-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ld-check { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--navy); cursor: pointer; }
.ld-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.ld-ed-foot { position: sticky; bottom: 0; z-index: 2; margin-top: auto; display: flex; align-items: center; gap: 8px;
  padding: 12px 20px calc(12px + var(--sab, 0px)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--border); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ld-sp { flex: 1; }
.ld-danger { color: var(--ld-bad, #E45757) !important; }
.ld-li { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px 12px; margin-bottom: 10px; background: #fff; }
.ld-li-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ld-li-n { font-size: .86rem; color: var(--navy); }
.ld-flabel { font-size: .82rem; font-weight: 600; color: var(--muted); }
.ld-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; max-height: 240px; overflow: auto; padding: 8px 10px; border: 1px solid var(--border-2); border-radius: 10px; }
.ld-checks label { display: flex; align-items: center; gap: 6px; font-size: .84rem; cursor: pointer; }
.ld-vers { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ld-vers li { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.ld-vers li.cur { border-color: var(--primary-100); background: var(--primary-50); }
.ld-vers small { display: block; margin-top: 2px; font-size: .76rem; color: var(--muted); }
.ld-vers p { margin: 4px 0 0; font-size: .84rem; line-height: 1.6; }

/* لوحة القيادات: وضع العرض (شرائح بملء الشاشة فوق الصفحة، وتحت اللوحة الجانبية والنوافذ) */
body.ld-presenting { overflow: hidden; }
.ldp { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; outline: none;
  background: radial-gradient(1200px 600px at 100% 0%, #e9f0ff, transparent 60%), var(--bg); }
.ldp-stage { flex: 1; min-height: 0; display: flex; padding: 20px 26px 6px; }
.ldp-slide { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 22px; box-shadow: 0 18px 50px rgba(9, 9, 81, .1); }
.ldp-h { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; color: #fff;
  background: radial-gradient(700px 260px at 100% -40%, rgba(127, 255, 255, .22), transparent 60%), linear-gradient(135deg, #090951, #1818A0); }
.ldp-k { margin: 0; font-size: .8rem; font-weight: 700; color: #9fe9ff; }
.ldp-h h2 { margin: 2px 0 0; font-size: clamp(1.35rem, 2.1vw, 2.05rem); font-weight: 800; }
.ldp-sub { margin: 3px 0 0; font-size: .92rem; color: #d7ddff; }
.ldp-logo { height: 44px; width: auto; flex: none; }
.ldp-b { flex: 1; min-height: 0; overflow: auto; padding: 22px 28px 26px; }
.ldp-slide.cover { color: #fff;
  background: radial-gradient(900px 420px at 100% -10%, rgba(127, 255, 255, .18), transparent 60%), radial-gradient(700px 420px at 0% 110%, rgba(66, 172, 253, .26), transparent 60%), linear-gradient(135deg, #090951, #111182 55%, #1818A0); }
.ldp-slide.cover .ldp-b { display: flex; align-items: center; justify-content: center; }
.ldp-cv { width: min(1120px, 100%); display: flex; flex-direction: column; gap: 12px; }
.ldp-cv-logo { align-self: flex-start; height: 62px; width: auto; margin-bottom: 18px; }
.ldp-cv-k { margin: 0; font-weight: 800; color: #9fe9ff; }
.ldp-cv h1 { margin: 0; font-size: clamp(2.3rem, 4.4vw, 4.1rem); font-weight: 800; line-height: 1.15; }
.ldp-cv-d { margin: 0; font-size: clamp(1.1rem, 1.6vw, 1.5rem); color: #d7ddff; }
.ldp-cv-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.ldp-cv-stats div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.ldp-cv-stats b { align-self: flex-start; font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800; line-height: 1.1; }
.ldp-cv-stats span { font-size: .9rem; font-weight: 600; color: #c8d0ff; }
.ldp-cv-line { margin: 18px 0 0; max-width: 1000px; font-size: clamp(1rem, 1.3vw, 1.22rem); line-height: 1.85; color: #eef1ff; }
.ldp-nav { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 20px 14px; }
.ldp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--navy); font: inherit; font-weight: 700; box-shadow: 0 2px 8px rgba(9, 9, 81, .06); }
.ldp-btn:hover:not(:disabled) { border-color: var(--primary-100); background: var(--primary-50); }
.ldp-btn:disabled { opacity: .35; cursor: default; }
.ldp-btn.prev .ic { transform: rotate(180deg); }
.ldp-x { position: absolute; inset-inline-end: 26px; }
.ldp-dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; max-width: 56vw; }
.ldp-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #c9d2ea; cursor: pointer; transition: width .2s ease, background .2s ease; }
.ldp-dots button.on { width: 26px; border-radius: 99px; background: var(--primary); }
.ldp-n { min-width: 56px; text-align: center; font-size: .9rem; font-weight: 800; color: var(--muted); }
.ldp-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.ldp-pane { border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.ldp-h3 { margin: 0 0 12px; font-size: 1rem; color: var(--navy); }
.ldp-late { list-style: none; margin: 0; padding: 0; display: grid; }
.ldp-late li { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ldp-mx { max-width: min(100%, calc((100vh - 330px) * 1.57)); margin: 0 auto; }
.ldp-ach { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ldp-ach.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ldp-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ldp-out-c { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 16px; border: 1.5px dashed #9AA1DC; border-radius: 16px; background: #fff; }
.ldp-out-c header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ldp-out-c header .ld-link { flex: 1; min-width: 0; } .ldp-out-c .ld-id-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ldp-out-m { display: inline-flex; gap: 16px; flex: none; } .ldp-out-m span { display: grid; text-align: center; }
.ldp-out-m small { font-size: .7rem; color: var(--muted); } .ldp-out-m b { font-size: 1.1rem; font-weight: 800; color: var(--navy); }
.ldp-out-d { margin: 0; font-size: .82rem; line-height: 1.7; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ldp .ld-wins li span { -webkit-line-clamp: 2; }
.ldp .ld-asks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1500px) { .ldp-b { zoom: 1.12; } }
@media (min-width: 1800px) { .ldp-b { zoom: 1.26; } }
@keyframes ldp-in-next { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes ldp-in-prev { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes ldp-in { from { opacity: 0; } to { opacity: 1; } }
.ldp-slide.in-next { animation: ldp-in-next .32s cubic-bezier(.2, .7, .2, 1); }
.ldp-slide.in-prev { animation: ldp-in-prev .32s cubic-bezier(.2, .7, .2, 1); }
.ldp-slide.in { animation: ldp-in .3s ease; }
@media (prefers-reduced-motion: reduce) { .ldp-slide { animation: none !important; } }
@media (max-width: 820px) {
  .ld-ach, .ldp-ach.c2 { grid-template-columns: minmax(0, 1fr); }
  .ld-fgrid, .ld-checks { grid-template-columns: minmax(0, 1fr); }
  .ld-ms-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; } .ld-ms-row [data-m="a"] { grid-column: 1 / -1; }
  .ld-fig-row { grid-template-columns: 110px minmax(0, 1fr) auto; }
  .ldp-stage { padding: 8px 8px 4px; }
  .ldp-h { padding: 12px 16px; } .ldp-logo { height: 32px; }
  .ldp-b { padding: 14px 16px 18px; }
  .ldp-2, .ldp .ld-asks { grid-template-columns: minmax(0, 1fr); }
  .ldp-cv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ldp-dots { display: none; }
  .ldp-x span { display: none; }
}

/* ================= أسلوب Apple (إرشادات Human Interface) =================
   في آخر هذا الملف عمدًا ليعلو ما قبله، ويعيد تنسيق المنصة دون تغيير وظائفها:
   - على الجوال: شريط تبويبات عائم زجاجي وزر إضافة منفصل، وشريط علوي شفاف بأزرار دائرية يظهر فيه عنوان الصفحة عند التمرير،
     وعناوين كبيرة، وقوائم مجمّعة ببطاقات مستديرة، ونوافذ تنزلق من الأسفل.
   - على الكمبيوتر: تبقى القائمة الجانبية الكحلية، وتأخذ البطاقات والأزرار والحقول الزوايا والألوان نفسها.
   هوية المجلس: الأزرق الرئيسي لون التفاعل، والكحلي للنص، والتدرج للحلقات، والشعار الأبيض على الكحلي فقط. */

:root {
  --bg: #F2F3F8; --surface-2: #F6F7FB;
  --border: rgba(9, 9, 81, .1); --border-2: rgba(9, 9, 81, .17);
  --radius: 14px; --radius-s: 10px;
  --shadow: 0 1px 2px rgba(9, 9, 81, .05);
  --fill: rgba(9, 9, 81, .055); --fill-2: rgba(9, 9, 81, .09);
  --glass: rgba(255, 255, 255, .62); --glass-brd: rgba(255, 255, 255, .78); --glass-hi: rgba(255, 255, 255, .9);
  --glass-sh: 0 8px 28px rgba(9, 9, 81, .14), 0 1px 3px rgba(9, 9, 81, .06);
  --tab-h: 64px; --tab-gap: max(12px, calc(var(--sab) - 8px));
  --ios-red: #E5484D; --ios-orange: #F08A0A; --ios-green: #22A55B; --ios-teal: #0FA3C4; --ios-purple: #7B5CE0; --ios-gray: #8E93B5;
  --ease-ios: cubic-bezier(.32, .72, 0, 1);
}
@media (min-width: 821px) { .m-only { display: none !important; } }

/* ---------- العناصر العامة (الكمبيوتر والجوال) ---------- */
.card, .kpi, .db-kpi, .pf-card, .tg-proj, .plan-goal, .plan-sum, .settings-nav, .g-toc { border-color: rgba(9, 9, 81, .07); }
.card { box-shadow: 0 1px 2px rgba(9, 9, 81, .04); }
.btn { border-radius: 10px; }
.input { border-radius: 10px; }
.modal { border-radius: 22px; }
.popmenu { border-radius: 14px; padding: 6px; border-color: rgba(9, 9, 81, .08); box-shadow: 0 16px 40px rgba(9, 9, 81, .18); }
.popmenu button { border-radius: 9px; }
.toast { border-radius: 14px; background: rgba(9, 9, 81, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.chip-btn { border-color: transparent; background: var(--fill); }
.chip-btn:hover { background: var(--primary-50); }

/* ================= الجوال ================= */
@media (max-width: 820px) {
  body { font-size: 16px; background: var(--bg); }
  .only-mobile.m-flex { display: inline-flex !important; }

  /* ---------- الشريط العلوي: شفاف بأزرار زجاجية، وحافة ضبابية وعنوان صغير عند التمرير ---------- */
  .topbar { background: transparent; border: 0; color: var(--text); gap: 8px; padding: calc(8px + var(--sat)) 16px 8px; min-height: calc(60px + var(--sat));
    -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topbar::before { content: ""; position: absolute; inset: 0 0 -20px; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .25s;
    background: linear-gradient(var(--bg) 62%, color-mix(in srgb, var(--bg) 55%, transparent) 82%, transparent);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
  .topbar.scrolled::before { opacity: 1; }
  .topbar .brand { display: none !important; }
  .tb-title { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 17px; font-weight: 800; color: var(--text); opacity: 0; transition: opacity .2s; pointer-events: none; }
  .topbar.titled .tb-title { opacity: 1; }
  .glass-btn, .topbar .ai-btn { width: 44px; height: 44px; min-height: 44px; flex: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    border: .5px solid var(--glass-brd); background: var(--glass); color: var(--text); box-shadow: var(--glass-sh), inset 0 1px 0 var(--glass-hi);
    -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); transition: transform .18s; text-decoration: none; }
  .glass-btn:hover { text-decoration: none; }
  .glass-btn:active, .topbar .ai-btn:active { transform: scale(.92); }
  .topbar .ai-btn .ic { color: var(--violet); }
  .tb-back[hidden] { display: none !important; }
  .save-pill { margin-inline-start: auto; font-size: .78rem; font-weight: 700; }
  .save-pill:not(:empty) { padding: 5px 11px; border-radius: 999px; background: var(--glass); box-shadow: var(--glass-sh);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .topbar .save-pill { color: var(--muted); } .topbar .save-pill.saved { color: var(--ok); } .topbar .save-pill.error { color: var(--danger); }

  /* ---------- شريط التبويبات العائم وزر الإضافة ---------- */
  .bottomnav { left: auto; right: auto; inset-inline-start: 16px; inset-inline-end: calc(var(--tab-h) + 26px); bottom: var(--tab-gap); height: var(--tab-h);
    padding: 4px; gap: 2px; justify-content: stretch; align-items: stretch; border: .5px solid var(--glass-brd); border-radius: 32px;
    background: var(--glass); box-shadow: var(--glass-sh), inset 0 1px 0 var(--glass-hi);
    -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%); }
  .bottomnav a { position: relative; flex: 1; min-width: 0; min-height: 0; height: 100%; border-radius: 28px; gap: 1px; font-size: .72rem; font-weight: 700; color: var(--text);
    transition: background .2s, color .2s, transform .18s; }
  .bottomnav a.active { color: var(--royal); background: var(--fill-2); }
  .bottomnav a:active { transform: scale(.94); }
  .bottomnav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottomnav .count { position: absolute; top: 5px; inset-inline-end: calc(50% - 24px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--ios-red); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
  .fab { position: fixed; z-index: 31; bottom: var(--tab-gap); inset-inline-end: 16px; width: var(--tab-h); height: var(--tab-h); margin: 0;
    border: .5px solid rgba(255, 255, 255, .35); border-radius: 50%; color: #fff;
    background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%), var(--royal); box-shadow: 0 10px 26px rgba(18, 73, 255, .35); transition: transform .18s; }
  .fab:active { transform: scale(.92); }
  .content { padding: 2px 16px calc(var(--tab-h) + 44px + var(--sab)); overflow-x: clip; }
  #toasts { bottom: calc(var(--tab-h) + 26px + var(--tab-gap)); }

  /* ---------- العناوين الكبيرة ---------- */
  h1, .page-head h1 { font-size: 1.95rem; line-height: 1.3; font-weight: 800; }
  .page-head { margin-bottom: 14px; padding-inline: 4px; }
  .page-head p.small { font-size: .95rem; }
  .content > .crumbs:first-child { display: none; }

  /* ---------- البطاقات والقوائم المجمّعة ---------- */
  .card, .kpi, .db-card, .pf-card, .tg-proj, .plan-goal, .plan-sum, .perf-card, .tgt-card { border: 0; box-shadow: none; border-radius: 22px; }
  .card { margin-bottom: 18px; }
  .card-head { border-bottom: .5px solid var(--border); padding: 13px 16px; }
  .card-head h2, .db-card-head h2 { font-size: 1.08rem; }
  .tcard, .fcard, .flist li, .rlist li, .menu-item, .entry, .db-list li, .feed li, .collab-list .collab { border-bottom-width: .5px; }
  .tcard, .fcard { padding: 13px 16px; }
  .tc-title { font-size: 1rem; }

  /* ---------- الأزرار والحقول ---------- */
  .btn { border-radius: 999px; min-height: 44px; padding: 8px 18px; border-color: transparent; background: rgba(18, 73, 255, .09); color: var(--royal); }
  .btn:hover { background: rgba(18, 73, 255, .14); }
  .btn.primary { background: var(--royal); color: #fff; }
  .btn.primary:hover { background: #2b5cff; }
  .btn.danger { background: var(--danger); color: #fff; }
  .btn.ghost { background: transparent; }
  .btn.sm { min-height: 38px; padding: 4px 14px; }
  .icon-btn { border-radius: 50%; }
  .input { border-radius: 12px; min-height: 46px; border-color: transparent; background: var(--fill); }
  .input:focus { background: var(--surface); border-color: var(--primary); }
  .input.sm { min-height: 38px; }
  .title-field .input.title, .title-field .input.title:hover { background: transparent; border-color: transparent; }
  .chip-btn { min-height: 36px; background: var(--fill-2); }
  .field > label, legend { font-size: .86rem; }

  /* التبويبات: كبسولات قابلة للتمرير */
  .tabs { border-bottom: 0; gap: 8px; margin: 0 -16px 14px; padding: 2px 16px; }
  .tabs a { border: 0; border-radius: 999px; background: var(--surface); color: var(--text); padding: 8px 15px; font-weight: 700; min-height: 38px; display: inline-flex; align-items: center; gap: 6px; }
  .tabs a.on { background: var(--navy); color: #fff; }
  .seg-ctl { background: var(--fill-2); border: 0; }
  .seg-ctl button { color: var(--text); padding: 7px 14px; font-size: .9rem; }
  .seg-ctl button.on { background: var(--surface); color: var(--navy); font-weight: 800; }
  .filters .input { background: var(--surface); }

  /* الأشرطة: بطاقات مستديرة داخل الصفحة */
  .banner { margin: 4px 16px 10px; border: 0; border-radius: 18px; padding: 11px 14px; font-size: .92rem; }
  .banner .btn { min-height: 36px; background: rgba(255, 255, 255, .7); }
  .banner .btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; } /* كان زر «تحديث الآن» أبيض على أبيض */

  /* ---------- النوافذ: تنزلق من الأسفل ---------- */
  .scrim { background: rgba(4, 4, 40, .3); }
  .modal { left: 8px; right: 8px; bottom: calc(8px + var(--sab)); width: auto; max-height: calc(100dvh - var(--sat) - 24px); border-radius: 30px; padding-bottom: 0;
    animation: sheet-up .42s var(--ease-ios); }
  .modal.wide { width: auto; }
  .modal-head { padding: 16px 20px 6px; }
  .modal-head h2 { font-size: 1.12rem; }
  .modal-body { padding: 6px 20px 14px; }
  .modal-foot { border-top: 0; padding: 8px 16px 16px; }
  .modal-foot .btn { flex: 1; }
  .drawer, .drawer.wide { top: calc(var(--sat) + 10px); bottom: 0; left: 0; right: 0; width: 100vw; border-radius: 28px 28px 0 0;
    transform: translateY(104%); transition: transform .42s var(--ease-ios); }
  .drawer.open { transform: none; }
  .dhead { padding: 12px 14px 10px; border-bottom-width: .5px; }
  @keyframes sheet-up { from { transform: translateY(105%); } }

  .menu-list { margin-bottom: 22px; }
  .menu-item { min-height: 56px; }
  .menu-item > span:not(.mi) { font-size: 1.02rem; }
}

/* ---------- قائمة «المزيد»: هوية المجلس وقوائم بأيقونات ملونة ---------- */
.more-brand { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 18px; border-radius: 22px; background: var(--navy); color: #fff; }
.more-brand img { height: 44px; width: auto; }
.more-brand div { display: flex; flex-direction: column; min-width: 0; margin-inline-start: auto; text-align: end; }
.more-brand b { font-size: 1.02rem; font-weight: 800; }
.more-brand span { font-size: .82rem; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item { gap: 12px; padding: 10px 16px; position: relative; border-bottom: 0; }
.menu-item + .menu-item::before { content: ""; position: absolute; top: 0; inset-inline-start: 58px; inset-inline-end: 0; height: .5px; background: var(--border); }
.menu-item > .mi { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--c, var(--royal)); color: #fff; }
.menu-item > .mi .ic { color: #fff !important; }
.menu-item > .ic:last-child { color: var(--faint); width: 15px; height: 15px; }
.menu-item.danger { color: var(--danger); justify-content: center; font-weight: 700; }
.menu-item.danger > span { flex: none; }
.menu-item:active { background: var(--fill); }

@media (prefers-reduced-motion: reduce) {
  .modal { animation: none; }
  .drawer, .glass-btn, .bottomnav a, .fab { transition: none; }
}
@media print { .glass-btn, .tb-title, .fab { display: none !important; } }

/* ================= الرئيسية (لوحة القيادة) على الجوال ================= */
@media (max-width: 820px) {
  /* الترويسة: عنوان كبير على الخلفية الفاتحة بدل البطاقة الكحلية، وأزرار دائرية، وتحكم مقسّم للأقسام */
  .db-hero { background: none; color: var(--text); padding: 0 4px; border-radius: 0; overflow: visible; }
  .db-hero::after { display: none; }
  .db-hero-top { flex-direction: column; align-items: stretch; gap: 12px; }
  .db-kicker { color: var(--royal); font-size: .82rem; }
  .db-hero h1 { font-size: 2.05rem; color: var(--text); }
  .db-date { color: var(--muted); font-size: .95rem; }
  .db-hero-actions { gap: 10px; }
  .db-hero .db-btn-w { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 50%; border: 0; background: var(--surface); color: var(--royal); }
  .db-hero .db-btn-w > span { display: none; }
  .db-hero .db-btn-w .ic { color: var(--royal); }
  .db-filters { margin-top: 14px; gap: 8px; }
  .db-seg { width: 100%; background: var(--fill-2); border: 0; }
  .db-seg button { flex: 1 0 auto; color: var(--text); padding: 8px 14px; font-size: .9rem; }
  .db-seg button.on { background: var(--surface); color: var(--navy); font-weight: 800; box-shadow: 0 3px 8px rgba(9, 9, 81, .12); }
  .db-owner { background: var(--surface); border: 0; color: var(--royal); }
  .db-owner select { color: var(--text); }
  .db-hero .help-i { color: var(--faint); }
  .db-chip { background: var(--primary-50); border-color: var(--primary-100); color: var(--royal); }
  .db-chip button { color: var(--royal); }
  .db-clear { color: var(--royal); }

  /* بطاقات الملخص */
  .db-kpis { margin: 18px 0 28px; gap: 12px; }
  .db-kpi { border: 0; box-shadow: none; border-radius: 22px; padding: 14px; }
  .db-kpi-num { font-size: 1.9rem; }
  .db-kpi-label { font-size: .84rem; color: var(--text); }
  .db-kpi .ring { width: 34px; height: 34px; }
  .kpi-wrap > .help-i { top: 6px; inset-inline-end: 6px; }

  /* «يحتاج انتباهك»: قائمة مجمّعة بأيقونات ملونة */
  .db-sec-h { margin: 0 4px 10px; font-size: 1.4rem; font-weight: 800; }
  .db-insights { flex-direction: column; gap: 0; margin: 0 0 28px; border-radius: 22px; background: var(--surface); overflow: hidden; }
  .db-ins { position: relative; flex: none; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-radius: 0; background: none !important; font-size: .95rem; line-height: 1.6; }
  .db-ins + .db-ins::before { content: ""; position: absolute; top: 0; inset-inline-start: 58px; inset-inline-end: 0; height: .5px; background: var(--border); }
  .db-ins > .ic { flex: none; width: 30px; height: 30px; padding: 6px; margin: 0; border-radius: 9px; background: var(--ios-teal); color: #fff !important; }
  .db-ins.bad > .ic { background: var(--ios-red); } .db-ins.warn > .ic { background: var(--ios-orange); } .db-ins.info > .ic { background: var(--royal); }

  /* البطاقات */
  .db-grid { gap: 20px; }
  .db-card { padding: 16px; }
  .db-card-head h2 { font-size: 1.12rem; }
  .db-fold > details > summary { padding: 14px 16px; }
  .db-fold > details[open] > summary { border-bottom-width: .5px; border-radius: 22px 22px 0 0; }
  .db-fold > details > .db-card-body { padding: 12px 16px 14px; }

  /* المستهدف التشغيلي: صفوف قائمة بخط فاصل رفيع */
  .tg-fold .tg-seg { display: flex; margin: 0 -16px 10px; padding: 0 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tg-fold .tg-seg::-webkit-scrollbar { display: none; }
  .tg-seg button { border: 0; background: var(--fill); color: var(--text); padding: 6px 12px; min-height: 34px; font-size: .84rem; }
  .tg-seg button.on { background: var(--navy); color: #fff; }
  .tg-line { padding: 13px 0; border-bottom: .5px solid var(--border); border-radius: 0; gap: 6px 10px; }
  .tl-name b { font-size: 1rem; }
  .tl-st { font-size: .9rem; font-weight: 600; color: var(--muted); }
  .tl-bar { height: 6px; margin-top: 4px; }
  .tl-val { font-size: .84rem; }
  .tg-line .pace { font-size: .78rem; padding: 1px 9px; }

  /* الهوية أسفل الرئيسية */
  .db-brand { margin-top: 26px; }
}

/* ================= صفحة المشروع ================= */
.tgt-body { display: block; }
.tgt-ring { position: relative; width: 124px; height: 124px; flex: none; }
.tgt-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.tgt-ring .tr-bg { fill: none; stroke: var(--track); stroke-width: 13; }
.tgt-ring .tr-fg { fill: none; stroke-width: 13; stroke-linecap: round; }
.tgt-ring .tr-ex { fill: var(--surface); stroke: var(--navy); stroke-width: 2.5; }
.tgt-ring > span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tgt-ring b { font-size: 2.1rem; line-height: 1.05; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.tgt-ring small { font-size: .82rem; color: var(--muted); }

@media (max-width: 820px) {
  /* الرأس: اسم المشروع عنوانًا كبيرًا، والنوع والحالة والمسؤول صفوفًا في قائمة مجمّعة */
  .file-head { gap: 12px; }
  .file-head .title-field .input.title { font-size: 1.95rem; font-weight: 800; padding-inline: 0; min-height: 52px; }
  .file-picks { flex-direction: column; align-items: stretch; gap: 0; margin-top: 4px; border-radius: 20px; background: var(--surface); overflow: hidden; }
  .file-picks > * { position: relative; min-height: 54px; padding: 4px 16px; display: flex; align-items: center; }
  .file-picks > * + *::before { content: ""; position: absolute; top: 0; inset-inline-start: 16px; inset-inline-end: 0; height: .5px; background: var(--border); }
  .file-picks .hpick { flex: 1; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .file-picks .hpick-w > .hpick { padding: 0; }
  .file-picks .hpick-w { gap: 4px; }
  .file-picks .hpick-w .help-i { margin: 0; }
  .file-picks .hpick > span { font-size: 1rem; font-weight: 500; color: var(--text); }
  .file-picks .hpick select.input { width: auto; max-width: 62%; min-height: 40px; border-radius: 999px; padding-block: 4px; font-weight: 700; }
  .file-picks .hpick select.input:not(.hsel) { background-color: var(--fill); color: var(--royal); }
  .file-picks .hsel { border-radius: 999px; }
  .file-picks > .chip { min-height: 44px; justify-content: center; }
  .head-actions { gap: 10px; }
  .head-actions .btn:not(.primary), .head-actions .icon-btn { width: 46px; min-height: 46px; height: 46px; padding: 0; border-radius: 50%; flex: none; justify-content: center; background: var(--surface); color: var(--royal); }
  .head-actions .btn.primary { min-height: 46px; }

  /* المستهدف التشغيلي: حلقة بالمتحقق ونقطة المتوقع، وبجانبها الأرقام */
  .tgt-card { background: var(--surface); }
  .tgt-head h2 { font-size: 1.12rem; }
  .tgt-statement b { font-size: 1.3rem; }
  .tgt-bar { display: none; }
  .tgt-body { display: flex; align-items: center; gap: 18px; margin: 14px 0 6px; }
  .tgt-stats { flex: 1; grid-template-columns: 1fr; gap: 8px; }
  .tgt-stats > div { background: none; border: 0; padding: 0; }
  .tgt-stats > div:nth-child(2) { display: none; }
  .tgt-stats dt { font-weight: 600; }
  .tgt-stats dd { font-size: 1.35rem; margin-top: 0; text-align: right; }
  .tgt-src-line { font-size: .86rem; line-height: 1.6; }
  .tgt-update { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 14px; }
  .tgt-update label { display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-weight: 600; }
  .tgt-update .input { width: 100%; }
  .tgt-update .btn.sm { min-height: 46px; align-self: end; }
  .tgt-update .btn.ghost { grid-column: 1 / -1; background: var(--primary-50); }

  /* الأداء: صناديق بلا حدود على خلفية خفيفة */
  .perf-grid { gap: 8px; }
  .perf-box { border: 0; background: var(--bg); border-radius: 16px; }
  .perf-box.total { background: var(--primary-50); }
  .perf-head h2 { font-size: 1.12rem; }

  /* تفاصيل أخيرة في الرئيسية */
  .db-fold > details > summary { color: var(--text); }
  .tl-name b { white-space: normal; }
}

/* ================= تفاصيل الجوال الأخيرة ================= */
@media (max-width: 820px) {
  /* صفوف التصفية تمتد لعرض الشاشة وتُمرَّر أفقيًا */
  .filters { margin-inline: -16px; padding-inline: 16px; }
  /* أثناء الكتابة في حقل داخل الصفحة يختفي شريط التبويبات وزر الإضافة حتى لا يغطيا الحقل فوق لوحة المفاتيح */
  .bottomnav, .fab { transition: opacity .2s, transform .25s var(--ease-ios); }
  body:has(.content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="date"]), textarea):focus) :is(.bottomnav, .fab) { opacity: 0; transform: translateY(24px); pointer-events: none; }
}
/* الشاشات الضيقة جدًا (أقل من 375 نقطة): شريط أصغر قليلًا حتى تتسع أسماء التبويبات */
@media (max-width: 374px) {
  :root { --tab-h: 58px; }
  .bottomnav { inset-inline-start: 10px; inset-inline-end: calc(var(--tab-h) + 18px); }
  .fab { inset-inline-end: 10px; }
  .bottomnav a { font-size: .64rem; }
  .bottomnav a .ic { width: 22px; height: 22px; }
}

/* ================= تحديث الأسبوع: تمييز ما تغيّر في آخر تحديث من بطاقات المتابعة =================
   لون واحد مميز (سماوي من هوية المجلس) لا يتداخل مع ألوان الحالات. يتلوّن آخر تحديث فقط، ويعود للون المعتاد عند التحديث التالي. */
:root { --wk: #08708A; --wk-line: #2EC4E0; --wk-bg: rgba(15, 163, 196, .1); --wk-hl: rgba(127, 255, 255, .75); }
.wk-dot { display: inline-block; width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--wk-line); box-shadow: 0 0 0 3px rgba(46, 196, 224, .22); }
.wk-dot.lg { width: 11px; height: 11px; margin-inline-end: 2px; }
.wk-hl { background: linear-gradient(transparent 52%, var(--wk-hl) 52%); border-radius: 2px; padding-inline: 2px; }
.wk-d { display: inline-flex; align-items: center; gap: 2px; margin-inline-start: 6px; padding: 0 7px; border-radius: 999px; background: var(--wk-bg); color: var(--wk);
  font-size: .74rem; font-weight: 800; line-height: 1.75; white-space: nowrap; vertical-align: middle; font-variant-numeric: tabular-nums; }
.wk-row, tr.wk-row > td { background-color: var(--wk-bg) !important; }
.wk-row { box-shadow: inset -3px 0 0 var(--wk-line); }
tr.wk-row { box-shadow: none; }
tr.wk-row > td:first-child { box-shadow: inset -3px 0 0 var(--wk-line); }
.tg-line.wk, .pg-row.wk { background: var(--wk-bg); }
.db-kpi.wk { box-shadow: inset 0 0 0 2px rgba(46, 196, 224, .55); }
/* شريحة آخر تحديث في رأس اللوحة، وزر «ما تغيّر فقط» */
.wk-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 38px; padding: 4px 6px 4px 12px; border-radius: 999px;
  border: 1px solid rgba(127, 255, 255, .45); background: rgba(127, 255, 255, .14); color: #fff; font: inherit; font-size: .84rem; cursor: pointer; }
.wk-chip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-chip b { padding: 2px 10px; border-radius: 999px; background: #fff; color: var(--navy); font-size: .8rem; white-space: nowrap; }
.wk-chip.on b { background: var(--wk-line); color: #04223A; }
/* بطاقة «ما تغيّر في آخر تحديث أسبوعي» */
.wk-card { border-color: rgba(46, 196, 224, .45); }
.wk-head { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.wk-sum { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; padding: 6px 12px; border-radius: 12px; background: var(--wk-bg); font-size: .84rem; }
.wk-sum b { font-variant-numeric: tabular-nums; }
.wk-list { display: flex; flex-direction: column; }
.wk-line { display: grid; grid-template-columns: minmax(150px, 22%) minmax(0, 1fr); gap: 8px 16px; align-items: start; padding: 10px 6px; border-bottom: 1px solid var(--border); color: var(--text); }
.wk-line:last-child { border-bottom: 0; }
.wk-line:hover { background: var(--surface-2); text-decoration: none; }
.wk-name { display: flex; align-items: center; gap: 8px; font-size: .95rem; min-width: 0; }
.wk-bits { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.wk-bits > span { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); font-size: .82rem; color: var(--text); }
.wk-bits .ic { color: var(--wk); }
.wk-bits .wk-d { margin-inline-start: 2px; }
/* صفحة المشروع */
.wk-banner { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; background: var(--wk-bg); border: 1px solid rgba(46, 196, 224, .4); }
.wk-banner > .wk-dot { margin-top: 8px; }
.wk-banner > div > b { display: block; font-size: .95rem; }
.wk-banner > div > span { display: block; margin-top: 2px; font-size: .88rem; line-height: 1.7; }
.wk-banner > div > small { display: block; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.tgt-stats > div.wk { border-color: var(--wk-line); background: var(--wk-bg); }
.perf-box.wk { border-color: var(--wk-line); box-shadow: inset 0 0 0 1px var(--wk-line); }
.perf-box .perf-v .wk-d { font-size: .72rem; }
.field.wk-field > .input { border-color: var(--wk-line); box-shadow: 0 0 0 3px rgba(46, 196, 224, .18); }
.wk-tag { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 999px; background: var(--wk-bg); color: var(--wk); font-size: .72rem; font-weight: 800; }
@media (max-width: 820px) {
  .db-hero .wk-chip { background: var(--surface); border: 0; color: var(--text); }
  .db-hero .wk-chip b { background: var(--wk-bg); color: var(--wk); }
  .db-hero .wk-chip.on b { background: var(--wk-line); color: #04223A; }
  .wk-card { border: 0; }
  .wk-line { grid-template-columns: minmax(0, 1fr); padding: 12px 0; border-bottom-width: .5px; }
  .wk-banner { border-radius: 18px; }
  .tgt-stats > div.wk { background: none; }
}
@media print { .wk-chip { display: none !important; } .wk-row, tr.wk-row > td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.tgt-ring b.wk-hl { background: none; padding: 0; color: var(--wk); }

/* ================= صندوق الاستفسارات: أسئلة المتابعة مع الفريق، جاهزة للواتساب ================= */
:root { --inq: #0E8FAE; --inq-ink: #0B6F88; --inq-bg: rgba(14, 143, 174, .1); }
.count.soft { background: var(--royal); color: #fff; }
.sidebar .count.soft { background: var(--aqua); color: var(--navy); font-weight: 800; }
/* أيقونة الصندوق في الشريط العلوي (مثل السلة) */
.tb-box { position: relative; }
@media (min-width: 821px) {
  .tb-box { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border-2); background: var(--surface); color: var(--navy); text-decoration: none; }
  .tb-box:hover { background: var(--primary-50); color: var(--royal); text-decoration: none; }
}
.tb-box .count { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px var(--bg); font-variant-numeric: tabular-nums; }
.tb-box .count[hidden] { display: none; }
/* السؤال يطير إلى الصندوق عند إضافته */
.inq-fly { position: fixed; z-index: 400; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--royal); color: #fff; box-shadow: 0 8px 22px rgba(18, 73, 255, .35); pointer-events: none;
  transition: transform .62s cubic-bezier(.45, 0, .2, 1), opacity .62s ease-in; }
.bump { animation: inq-bump .5s var(--ease-out); }
@keyframes inq-bump { 0% { transform: scale(1); } 35% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* بطاقة الاستفسارات في صفحة المشروع */
.inq-card { border-color: rgba(14, 143, 174, .3); }
.inq-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.inq-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.inq-head h2 > .ic { color: var(--inq); }
.inq-box-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.inq-box-link .count { min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: .74rem; line-height: 1.6; text-align: center; }
.inq-box-link .count[hidden] { display: none; }
.inq-add { display: flex; flex-direction: column; gap: 8px; }
.inq-add textarea { min-height: 46px; resize: none; }
.inq-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.inq-to { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: .85rem; color: var(--muted); }
.inq-to select { width: auto; max-width: 260px; }
.inq-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; }
.inq-list { list-style: none; margin: 12px 0 0; padding: 0; }
.inq-list:empty { display: none; }
.inq-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--border); border-radius: 8px; }
.inq-row.is-new { animation: inq-new 1.8s var(--ease-out); }
@keyframes inq-new { from { background: rgba(14, 143, 174, .18); } to { background: transparent; } }
.inq-q { flex: 1; min-width: 0; }
.inq-q p { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.inq-q small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .78rem; }
.inq-st { display: inline-flex; align-items: center; padding: 0 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.85; }
.inq-st.box { background: var(--inq-bg); color: var(--inq-ink); }
.inq-st.sent { background: var(--warn-50); color: var(--warn); }
.inq-row-a { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; flex: none; }
.inq-done { padding: 10px 4px 0; border-top: 1px solid var(--border); }
.inq-done a { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; }

/* صفحة الصندوق */
.inq-mode { margin: 0 0 14px; }
.inq-send-b { padding: 4px 16px 16px; }
.inq-items { list-style: none; margin: 0; padding: 0; }
.inq-items > li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.inq-pick { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.inq-pick input { width: 18px; height: 18px; margin: 4px 0 0; flex: none; accent-color: var(--royal); }
.inq-pick > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.inq-file { align-self: flex-start; font-size: .78rem; font-weight: 800; color: var(--inq-ink); }
.inq-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.inq-pick:has(input:not(:checked)) .inq-text { color: var(--faint); text-decoration: line-through; }
.inq-item-a { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.inq-prev-l { display: flex; align-items: center; gap: 6px; margin: 16px 0 8px; font-size: .78rem; font-weight: 700; color: var(--muted); }
/* معاينة بشكل فقاعة الواتساب */
.wa-bubble { max-width: 560px; padding: 10px 14px 12px; border-radius: 16px; border-start-start-radius: 4px; background: #DCF8C6; color: #111B21;
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; font-size: .93rem; box-shadow: 0 1px 1.5px rgba(11, 20, 26, .13); }
.wa-bubble b { font-weight: 800; }
.inq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.inq-note { margin: 8px 0 0; }
.inq-rows { list-style: none; margin: 0; padding: 0; }
.inq-rows > li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); }
.card > .inq-rows:first-child > li:first-child { border-top: 0; }
.inq-rows .inq-row-a { margin-top: 2px; }
.inq-a { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0; padding: 8px 12px; border-radius: 12px; background: var(--ok-50); white-space: pre-wrap; overflow-wrap: anywhere; }
.inq-a .ic { flex: none; margin-top: 4px; color: var(--ok); }
/* أنواع البنود: استفسار، طلب، مهمة، توجيه */
.inq-k { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.85; white-space: nowrap; }
.inq-k.k-inquiry { background: var(--inq-bg); color: var(--inq-ink); }
.inq-k.k-request { background: rgba(240, 138, 10, .13); color: #8A5300; }
.inq-k.k-task { background: var(--primary-50); color: var(--royal); }
.inq-k.k-directive { background: rgba(123, 92, 224, .12); color: #5A3DC2; }
.inq-kinds { align-self: flex-start; max-width: 100%; }
.inq-kinds button:disabled { opacity: .45; cursor: not-allowed; }
.inq-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.inq-due { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.inq-due label { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.inq-due .input { width: auto; }
.inq-due-q { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.inq-due-w[hidden] { display: none; }
.inq-a.k-task { background: var(--primary-50); align-items: center; flex-wrap: wrap; }
.inq-a.k-task .ic { color: var(--royal); margin-top: 0; }
.inq-a.k-directive { background: rgba(123, 92, 224, .08); }
.inq-a.k-directive .ic { color: #5A3DC2; }
@media (max-width: 820px) {
  .tb-box .count { top: -3px; inset-inline-end: -3px; box-shadow: none; }
  /* أزرار التعديل والحذف في أعلى البند، فيأخذ النص العرض كله */
  .inq-items > li { position: relative; }
  .inq-items .inq-item-a { position: absolute; top: 6px; inset-inline-end: 0; }
  .inq-items .inq-meta { padding-inline-end: 72px; }
  .inq-rows > li { position: relative; }
  .inq-rows > li > .icon-btn { position: absolute; top: 8px; inset-inline-end: 10px; }
  .inq-rows > li:has(> .icon-btn) .inq-meta { padding-inline-end: 36px; }
  .inq-kinds { display: flex; width: 100%; }
  .inq-kinds button { flex: 1; justify-content: center; padding: 6px 4px; }
  .inq-due-w { width: 100%; }
  .inq-card { border: 0; }
  .inq-add-row { flex-direction: column; align-items: stretch; }
  .inq-to { width: 100%; }
  .inq-to select { flex: 1; min-width: 0; width: 100%; max-width: none; }
  .inq-btns { flex-direction: column; margin-inline-start: 0; }
  .inq-btns .btn { justify-content: center; min-height: 44px; }
  /* العنوان الصغير في الشريط العلوي يأخذ المساحة بين الأزرار فلا يتداخل معها */
  .tb-title { position: static; left: auto; bottom: auto; transform: none; flex: 1; min-width: 0; max-width: none; text-align: center; }
  .topbar .save-pill { margin-inline-start: 0; }
  .inq-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .inq-row-a { justify-content: flex-start; }
  .inq-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .inq-actions .btn { justify-content: center; min-height: 44px; }
  .inq-actions [data-copy-msg] { grid-column: 1 / -1; }
  .inq-actions:has([data-share]) [data-sent] { grid-column: 1 / -1; }
  .inq-rows > li { flex-direction: column; align-items: stretch; }
  .inq-sent .card-head { flex-wrap: wrap; }
}
@media print { .tb-box, .inq-card { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .bump, .inq-row.is-new { animation: none; } }

/* ================= إعداد خطة السنة القادمة (مسودة للورش) ================= */
.pl-kicker { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: .8rem; font-weight: 800; color: var(--royal); }
.pl-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 12px; font-size: .88rem; color: var(--muted); }
.pl-sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.pl-sum-w { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; background: var(--warn-50); color: var(--warn); font-weight: 700; }
.pl-sum-w.high { background: var(--danger-50); color: var(--danger); }
.pl-sum-w b { color: inherit; }
.pl-sum-w:hover { text-decoration: none; }
.pl-pillar { margin: 0 0 24px; }
.pl-pillar-h, .pl-goal-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.pl-pillar-h h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.2rem; }
.pl-goal { margin: 0 0 14px; padding-inline-start: 12px; border-inline-start: 3px solid var(--primary-100); }
.pl-goal-h h3 { flex: 1; min-width: 0; margin: 0; font-size: 1rem; }
.pl-tag { flex: none; padding: 1px 9px; border-radius: 999px; background: var(--navy); color: #fff; font-size: .7rem; font-weight: 800; }
.pl-tag.soft { background: var(--primary-50); color: var(--royal); }
.pl-add-pillar { margin-bottom: 16px; }
.card.pl-kpi, .card.pl-proj { padding: 12px 14px; margin-bottom: 10px; }
.pl-card-h { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 8px; }
.pl-name { flex: 1; min-width: 0; min-height: 0; padding: 4px 6px; border-color: transparent; background: transparent; font-size: 1rem; font-weight: 800; line-height: 1.6; resize: none; }
.pl-name:hover { border-color: var(--border); }
.pl-name:focus { border-color: var(--primary); background: var(--surface); }
.pl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; margin-bottom: 8px; }
.pl-f { display: flex; flex-direction: column; gap: 3px; min-width: 0; margin-bottom: 8px; }
.pl-grid .pl-f { margin-bottom: 0; }
.pl-f > span { font-size: .75rem; font-weight: 700; color: var(--muted); }
.pl-f .input { width: 100%; }
.pl-inline { flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.pl-inline .input { width: auto; }
.pl-q { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; margin-bottom: 8px; }
.pl-q-l { align-self: center; font-size: .75rem; font-weight: 700; color: var(--muted); }
.pl-q label { display: flex; flex-direction: column; gap: 2px; width: 78px; }
.pl-q label span { font-size: .7rem; color: var(--muted); text-align: center; }
.pl-q input { text-align: center; }
.pl-qsum { align-self: center; color: var(--muted); }
.pl-qsum.bad { color: var(--danger); font-weight: 700; }
.pl-def { margin-bottom: 8px; }
.pl-def summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--royal); }
.pl-def textarea { margin-top: 6px; font-size: .88rem; line-height: 1.7; }
.pl-links { padding-top: 8px; border-top: 1px solid var(--border); }
.pl-links-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.pl-links ul { list-style: none; margin: 0 0 8px; padding: 0; }
.pl-links li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.pl-pname { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.pl-pname a { font-weight: 700; color: var(--text); }
.pl-contrib { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); }
.pl-contrib input { width: 90px; text-align: center; }
.pl-star { flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); font-size: 1rem; cursor: pointer; }
.pl-star.on { color: #B97A00; background: #FFF4D6; }
.pl-link-sel { width: auto; max-width: 280px; }
.pl-cov { padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.pl-cov.ok { background: var(--ok-50); color: var(--ok); }
.pl-cov.warn { background: var(--warn-50); color: var(--warn); }
.pl-cov.bad { background: var(--danger-50); color: var(--danger); }
.pl-cov.none { background: var(--surface-2); color: var(--muted); }
.pl-t, .pl-s { display: inline-flex; padding: 0 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; line-height: 1.85; white-space: nowrap; }
.pl-t.t-run { background: var(--surface-2); color: var(--navy-3); box-shadow: inset 0 0 0 1px var(--border); }
.pl-t.t-grow { background: var(--primary-50); color: var(--royal); }
.pl-t.t-new { background: rgba(123, 92, 224, .12); color: #5A3DC2; }
.pl-t.t-none { background: var(--warn-50); color: var(--warn); }
.pl-s.s-approved { background: var(--ok-50); color: var(--ok); }
.pl-s.s-deferred { background: var(--surface-2); color: var(--muted); }
.pl-s.s-excluded { background: var(--danger-50); color: var(--danger); }
.pl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.pl-pk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pl-kchip { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); font-size: .78rem; }
.pl-kchip.on { background: #FFF4D6; box-shadow: inset 0 0 0 1px #E8B23A; }
.pl-kchip:hover { text-decoration: none; }
.pl-proj.is-off { opacity: .6; }
.pl-filter { margin-bottom: 8px; }
.pl-note { margin: 0 0 12px; }
.pl-flash { animation: pl-flash 1.6s var(--ease-out); }
@keyframes pl-flash { from { box-shadow: 0 0 0 3px var(--royal); } to { box-shadow: 0 0 0 0 rgba(18, 73, 255, 0); } }
/* الأولويات */
.pl-crit-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.pl-crit-row { display: flex; align-items: center; gap: 8px; }
.pl-crit-row > .input { flex: 1; min-width: 0; }
.pl-w { display: inline-flex; align-items: center; gap: 4px; }
.pl-w input { width: 64px; text-align: center; }
.pl-bad-t { color: var(--danger); font-weight: 700; }
.pl-bar { height: 10px; margin: 8px 0 4px; border-radius: 999px; background: var(--track); overflow: hidden; }
.pl-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.pl-bar.warn i { background: #F5B000; }
.pl-bar.bad i { background: var(--danger); }
.pl-rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rk; }
.pl-rank-row { padding: 12px 16px; border-top: 1px solid var(--border); counter-increment: rk; }
.pl-rank-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.pl-rank-h::before { content: counter(rk); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .75rem; font-weight: 800; }
.pl-rank-h b { flex: 1; min-width: 0; }
.pl-rank-h .input { width: auto; }
.pl-score { padding: 2px 10px; border-radius: 999px; background: var(--primary-50); color: var(--royal); font-size: .8rem; font-weight: 800; }
.pl-score.hi { background: var(--ok-50); color: var(--ok); }
.pl-score.none { background: var(--surface-2); color: var(--muted); font-weight: 700; }
.pl-scores { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px 10px; }
.pl-scores label { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-width: 0; }
.pl-scores label span { font-size: .7rem; line-height: 1.4; color: var(--muted); }
.pl-matrix-g { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.pl-qbox { min-height: 96px; padding: 10px 12px; border-radius: 12px; }
.pl-qbox b { display: block; }
.pl-qbox small { display: block; margin-bottom: 4px; font-size: .74rem; color: var(--muted); }
.pl-qbox ul { margin: 0; padding-inline-start: 16px; font-size: .86rem; }
.q-quick { background: var(--ok-50); }
.q-big { background: var(--primary-50); }
.q-small { background: var(--surface-2); }
.q-drop { background: var(--danger-50); }
/* التنبيهات */
.pl-alerts ul { list-style: none; margin: 0; padding: 0; }
.pl-alerts li { padding: 10px 16px; border-top: 1px solid var(--border); border-inline-start: 3px solid transparent; }
.pl-alerts li:first-child { border-top: 0; }
.pl-alerts li.lv-high { border-inline-start-color: var(--danger); }
.pl-alerts li.lv-mid { border-inline-start-color: #F5B000; }
.pl-al-h { display: flex; align-items: center; gap: 8px; }
.pl-al-h b { flex: 1; min-width: 0; font-size: .92rem; }
.pl-al-x { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pl-al { padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.7; }
.pl-al.lv-high { background: var(--danger-50); color: var(--danger); }
.pl-al.lv-mid { background: var(--warn-50); color: var(--warn); }
.pl-al.lv-info { background: var(--surface-2); color: var(--muted); }
@media (max-width: 820px) {
  .pl-grid { grid-template-columns: 1fr 1fr; }
  .pl-q-l { width: 100%; }
  .pl-q label { width: calc(25% - 8px); }
  .pl-links li { flex-wrap: wrap; }
  .pl-pname { flex: 1 0 100%; }
  .pl-contrib { flex: 1; }
  .pl-link-sel { width: 100%; max-width: none; }
  .pl-scores { grid-template-columns: 1fr 1fr; }
  .pl-goal { padding-inline-start: 8px; }
  .card.pl-kpi, .card.pl-proj { border: 0; }
  .pl-head .head-actions { width: 100%; }
  .pl-head .head-actions .btn[data-pl] { width: auto; padding: 0 16px; border-radius: 999px; }
}
@media print { .pl-page .head-actions, .pl-link-sel, .pl-star, [data-pl="unlink"], .pl-filter { display: none !important; } }


/* ================= رئيسية الموظف (الرئيسية و«نظرة عامة») و«أدائي» في لوحتي ================= */
.hm-summary { margin: 10px 0 0; max-width: 62ch; color: #e6ebff; font-size: 1rem; font-weight: 600; line-height: 1.7; }
.db-kpis.hm-kpis, .db-kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.db-kpis.hm-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
a.db-kpi { text-decoration: none; }
.hm-note { display: flex; align-items: center; gap: 8px; }
.hm-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--primary-50); color: var(--royal); font-size: .76rem; font-weight: 800; }
.hm-projs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
/* قوائم المهام في البطاقات النصفية: بطاقات بدل الجدول حتى لا تتجاوز عرض البطاقة */
.hm-narrow .ttable { display: none; }
.hm-narrow .tcards { display: block; }
.hm-narrow .tcard { padding: 10px 2px; }
.hm-narrow .tcard:last-child { border-bottom: 0; }
.hm-proj { --hm-c: var(--h-none); display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 13px 14px 12px; border: 1px solid var(--border); border-top: 4px solid var(--hm-c);
  border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 4px 14px rgba(9, 9, 81, .05); transition: transform .15s ease, box-shadow .15s ease; }
.hm-proj:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(9, 9, 81, .11); }
.hm-proj.h-on_track { --hm-c: var(--h-on); } .hm-proj.h-late { --hm-c: var(--h-late); } .hm-proj.h-stalled { --hm-c: var(--h-stalled); }
.hm-proj.h-done { --hm-c: var(--h-done); } .hm-proj.h-not_started { --hm-c: var(--h-idle); }
.hm-proj-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hm-sec { font-size: .74rem; color: var(--faint); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-proj h3 { font-size: 1.02rem; font-weight: 800; color: var(--navy); }
.hm-owner { display: flex; align-items: center; gap: 5px; margin: -3px 0 0; font-size: .8rem; color: var(--muted); }
.hm-bars { display: grid; gap: 7px; margin: 2px 0; }
.hm-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "b b"; row-gap: 4px; align-items: center; font-size: .78rem; color: var(--muted); }
.hm-bar > span:first-child { grid-area: l; font-weight: 700; }
.hm-bar b { grid-area: v; color: var(--text); font-size: .86rem; font-variant-numeric: tabular-nums; }
.hm-bar .pbar { grid-area: b; width: 100%; height: 8px; }
.pbar.kp i { background: linear-gradient(270deg, #b6f5ff 0%, #42ACFD 100%); }
.hm-next { margin: 0; font-size: .82rem; }
.hm-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: .78rem; color: var(--muted); }
.hm-meta em { font-style: normal; font-weight: 700; }
.hm-ms { display: flex; align-items: center; gap: 4px; margin: 0; padding-top: 7px; border-top: 1px dashed var(--border); font-size: .8rem; }
.hm-ms .clamp1 { flex: 1; min-width: 0; }
.hm-ms.late, .hm-ms.late .ms-mark { color: var(--danger); }
.hm-ff { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.hm-ff li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: .86rem; }
.hm-ff li .ic { color: var(--royal); }
.hm-agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hm-agenda > li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: start; }
.hm-day { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 10px; background: var(--primary-50); line-height: 1.3; }
.hm-day b { color: var(--royal); font-size: .86rem; } .hm-day span { color: var(--muted); font-size: .72rem; }
.hm-agenda ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hm-agenda ul li { padding: 4px 0; border-bottom: 1px solid var(--border); }
.hm-agenda ul li:last-child { border-bottom: 0; }
.hm-feed { grid-template-columns: 1fr; }
.hm-foot { margin: 16px 0 4px; text-align: center; font-size: .86rem; }
.hm-foot .linklike { display: inline-flex; align-items: center; gap: 6px; }
.hm-scope { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.warn-text { color: var(--warn); font-weight: 700; }
.my-perf { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.my-weeks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; height: 170px; align-items: stretch; }
.my-wk { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.my-wk b { font-size: .8rem; min-height: 1.2em; color: var(--navy); }
.my-col { flex: 1; width: 100%; max-width: 34px; display: flex; align-items: flex-end; border-radius: 8px; background: var(--track); overflow: hidden; }
.my-col i { display: block; width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(0deg, #1249FF, #42ACFD); }
.my-wk.now .my-col i { background: linear-gradient(0deg, #090951, #1818A0); }
.my-lbl { font-size: .68rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.my-wk.now .my-lbl { color: var(--royal); font-weight: 800; }
.my-stats { display: grid; gap: 10px; align-content: start; }
.my-stat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.my-stat .ring { width: 46px; height: 46px; flex: none; }
.my-stat b { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.my-stat span { display: block; font-size: .82rem; font-weight: 700; }
.my-stat small { display: block; font-size: .74rem; color: var(--muted); }
.my-stat em { font-style: normal; font-weight: 700; }
@media (max-width: 1180px) {
  .db-kpis.hm-kpis, .db-kpis.k5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .db-kpis.hm-kpis, .db-kpis.k5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-kpis.hm-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-summary { font-size: .92rem; color: var(--navy); background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: 12px; padding: 9px 12px; }
  .hm-projs { grid-template-columns: 1fr; }
  .hm-agenda > li { grid-template-columns: 76px minmax(0, 1fr); }
  .my-perf { grid-template-columns: 1fr; }
  .my-weeks { height: 140px; gap: 5px; }
}
@media print { .hm-foot { display: none; } }
@media (max-width: 820px) {
  .db-kpis.hm-kpis > :last-child:nth-child(odd), .db-kpis.k5 > :last-child:nth-child(odd) { grid-column: span 2; }
}

/* ================= المراسلات (#/chat) ================= */
.ch { display: grid; grid-template-columns: 330px minmax(0, 1fr); height: calc(100vh - var(--top) - 48px); min-height: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 8px 28px rgba(9, 9, 81, .06); }
.ch-side { display: flex; flex-direction: column; min-height: 0; background: var(--surface-2); border-inline-end: 1px solid var(--border); }
.ch-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 10px; }
.ch-side-head h1 { font-size: 1.25rem; font-weight: 800; }
.ch-search { display: flex; align-items: center; gap: 6px; margin: 0 12px 6px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--faint); }
.ch-search input { flex: 1; border: 0; background: transparent; padding: 8px 0; min-width: 0; outline: none; }
.ch-lists { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.ch-sec { margin: 10px 16px 4px; font-size: .74rem; font-weight: 800; color: var(--faint); }
.ch-none { padding: 4px 16px; }
.ch-list { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.ch-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--text); border: 1px solid transparent; }
.ch-item:hover { background: var(--surface); text-decoration: none; }
.ch-item.on { background: var(--surface); border-color: var(--primary-100); box-shadow: 0 4px 14px rgba(9, 9, 81, .07); }
.ch-it { display: flex; flex-direction: column; min-width: 0; }
.ch-it b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-last { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-item.has-new .ch-last { color: var(--text); font-weight: 700; }
.ch-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ch-r time { font-size: .7rem; color: var(--faint); white-space: nowrap; }
.ch-item.has-new time { color: var(--royal); font-weight: 700; }
.ch-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--royal); color: #fff; font-size: .72rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ch-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: .9rem;
  background: linear-gradient(135deg, #111182, #1818A0); }
.ch-av.general { background: linear-gradient(135deg, #1249FF, #42ACFD); }
.ch-av.section { background: linear-gradient(135deg, #090951, #1249FF); }
.ch-av.group { background: linear-gradient(135deg, #42ACFD, #1818A0); }
.ch-av.sm { width: 30px; height: 30px; font-size: .74rem; }
.ch-main { display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: radial-gradient(700px 300px at 100% 0%, rgba(66, 172, 253, .07), transparent 60%), var(--bg); }
.ch-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.ch-ht { flex: 1; min-width: 0; }
.ch-ht h2 { font-size: 1.02rem; font-weight: 800; }
.ch-ht p { margin: 0; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-back { display: none; }
.ch-msgs { flex: 1; overflow-y: auto; padding: 14px 18px 18px; display: flex; flex-direction: column; }
.ch-more { align-self: center; margin-bottom: 8px; }
.ch-day { align-self: center; margin: 14px 0 6px; }
.ch-day span { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .74rem; color: var(--muted); font-weight: 700; }
.ch-m { display: flex; align-items: flex-end; gap: 7px; max-width: min(78%, 640px); margin-top: 9px; align-self: flex-start; }
.ch-m.cont { margin-top: 2px; }
.ch-m.mine { align-self: flex-end; flex-direction: row-reverse; }
.ch-m.cont .ch-av.sm { visibility: hidden; }
.ch-bubble { position: relative; min-width: 0; padding: 7px 12px 5px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(9, 9, 81, .05); overflow-wrap: anywhere; }
.ch-m.other .ch-bubble { border-start-start-radius: 6px; }
.ch-m.mine .ch-bubble { border-start-end-radius: 6px; background: linear-gradient(135deg, #1249FF, #1818A0); border-color: transparent; color: #fff; }
.ch-m.cont.other .ch-bubble { border-start-start-radius: 16px; }
.ch-m.cont.mine .ch-bubble { border-start-end-radius: 16px; }
.ch-name { display: block; font-size: .76rem; font-weight: 800; color: var(--royal); margin-bottom: 1px; }
.ch-body { font-size: .95rem; line-height: 1.65; }
.ch-m.mine .ch-body a { color: #d6e6ff; }
.ch-meta { display: block; margin-top: 2px; font-size: .68rem; color: var(--faint); text-align: end; }
.ch-m.mine .ch-meta { color: rgba(255, 255, 255, .72); }
.ch-quote { display: block; width: 100%; margin: 2px 0 6px; padding: 4px 9px; border: 0; border-inline-start: 3px solid var(--royal); border-radius: 8px; background: rgba(18, 73, 255, .07); color: inherit; text-align: start; cursor: pointer; font: inherit; font-size: .8rem; }
.ch-quote b { display: block; font-size: .74rem; color: var(--royal); }
.ch-quote span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--muted); }
.ch-m.mine .ch-quote { background: rgba(255, 255, 255, .14); border-inline-start-color: #7FFFFF; }
.ch-m.mine .ch-quote b { color: #7FFFFF; } .ch-m.mine .ch-quote span { color: rgba(255, 255, 255, .85); }
.ch-ref { display: inline-flex; align-items: center; gap: 6px; margin: 5px 0 1px; padding: 4px 11px; border-radius: 999px; background: var(--primary-50); color: var(--royal); font-size: .82rem; font-weight: 700; max-width: 100%; }
.ch-ref span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-m.mine .ch-ref { background: rgba(255, 255, 255, .17); color: #fff; }
.ch-del { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: .85rem; }
.ch-m.mine .ch-del { color: rgba(255, 255, 255, .75); }
.ch-acts { display: flex; gap: 2px; opacity: 0; transition: opacity .12s ease; align-self: center; }
.ch-m:hover .ch-acts, .ch-m:focus-within .ch-acts { opacity: 1; }
.ch-acts button { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--faint); cursor: pointer; }
.ch-acts button:hover { background: var(--surface); color: var(--royal); }
@media (hover: none) { .ch-acts { opacity: .55; } }
.ch-m.flash .ch-bubble { animation: chflash 1.4s ease; }
@keyframes chflash { 0%, 60% { box-shadow: 0 0 0 3px rgba(66, 172, 253, .6); } 100% { box-shadow: none; } }
.ch-start, .ch-empty, .ch-wait { margin: auto; text-align: center; color: var(--muted); padding: 24px; }
.ch-start .ic, .ch-wait .ic { color: var(--sky); }
.ch-compose { padding: 9px 12px 11px; border-top: 1px solid var(--border); background: var(--surface); }
.ch-ctx { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-ctx:not(:empty) { margin-bottom: 7px; }
.ch-pill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 5px 3px 11px; border-radius: 999px; background: var(--primary-50); border: 1px solid var(--primary-100); color: var(--royal); font-size: .8rem; font-weight: 600; }
.ch-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 460px; }
.ch-pill button { border: 0; background: none; color: var(--royal); cursor: pointer; display: inline-flex; padding: 3px; border-radius: 50%; }
.ch-row { display: flex; align-items: flex-end; gap: 8px; }
.ch-input { flex: 1; resize: none; min-height: 44px; max-height: 160px; border-radius: 22px; padding: 10px 16px; line-height: 1.5; }
.ch-compose textarea.ch-input { resize: none; }
.ch-send { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; flex: none; }
.ch-attach { width: 42px; height: 42px; flex: none; }
.ch-closed { margin: 0; padding: 14px; text-align: center; color: var(--muted); border-top: 1px solid var(--border); background: var(--surface); }
.ch-pick { display: flex; flex-direction: column; gap: 2px; max-height: 360px; overflow-y: auto; margin-top: 10px; }
.ch-pick-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: start; cursor: pointer; font: inherit; }
.ch-pick-i:hover { background: var(--surface-2); text-decoration: none; }
.ch-pick-i .ic { color: var(--royal); flex: none; }
.ch-pick-i small { display: block; color: var(--muted); font-size: .76rem; }
.ch-checks { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; padding: 4px 2px; }
.ch-mem { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ch-mem li { display: flex; align-items: center; gap: 9px; }
.ch-mem b { flex: 1; font-size: .9rem; }
@media (max-width: 820px) {
  .ch { display: block; height: auto; min-height: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .ch.has-open .ch-side { display: none; }
  .ch:not(.has-open) .ch-main { display: none; }
  .ch-side { background: none; border: 0; }
  .ch-side-head { padding: 4px 4px 10px; }
  .ch-side-head h1 { font-size: 2.05rem; }
  .ch-search { margin: 0 0 6px; }
  .ch-list { padding: 0; }
  .ch-sec { margin-inline: 4px; }
  .ch-item { background: var(--surface); margin-bottom: 4px; }
  .ch-lists { overflow: visible; }
  /* المحادثة المفتوحة على الجوال: شاشة كاملة فوق الشريطين، والكتابة في أسفلها */
  .ch.has-open .ch-main { position: fixed; inset: 0; z-index: 45; padding-top: var(--sat); }
  .ch-back { display: inline-flex; }
  .ch-head { padding: 8px 10px; }
  .ch-head .btn > span { display: none; }
  .ch-msgs { padding: 10px 10px 14px; }
  .ch-m { max-width: 86%; }
  .ch-compose { padding: 8px 8px calc(8px + var(--sab)); }
  .ch-input { font-size: 16px; }
  body.ch-open .bottomnav, body.ch-open .fab { display: none !important; }
}
@media print { .ch-compose, .ch-acts, .ch-side { display: none !important; } .ch { display: block; height: auto; border: 0; } }


/* ================= رابط تجربة الحسابات ================= */
.hub { max-width: 460px; }
.hub-list { display: flex; flex-direction: column; gap: 8px; }
.hub-u { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-align: start; cursor: pointer; font: inherit; }
.hub-u:hover { border-color: var(--primary-100); background: var(--primary-50); }
.hub-u span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.hub-u small { color: var(--muted); font-size: .78rem; }
.hub-u .ic { color: var(--royal); transform: scaleX(-1); }
.hub-card { margin-bottom: 14px; border: 1px dashed var(--primary-100); background: linear-gradient(135deg, #f7f9ff, #ffffff); }
.hub-banner b { font-weight: 800; }


/* ================= لوحة المراسلات الجانبية وجرس الإشعارات (الشريط العلوي) ================= */
button.tb-box { padding: 0; cursor: pointer; font: inherit; }
.tb-ic .count { background: var(--danger); color: #fff; }
.chp-wrap { position: fixed; inset: 0; z-index: 55; }
.chp-scrim { position: absolute; inset: 0; background: rgba(9, 9, 81, .16); animation: chpFade .15s ease; }
.chp { position: absolute; top: 0; bottom: 0; left: 0; width: min(430px, 100vw); background: var(--surface); box-shadow: var(--shadow-l); display: flex; flex-direction: column; animation: chpIn .2s ease; }
@keyframes chpIn { from { transform: translateX(-28px); opacity: 0; } }
@keyframes chpFade { from { opacity: 0; } }
.chp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ch.ch-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; height: auto; border: 0; border-radius: 0; box-shadow: none; overflow: hidden; }
.ch-panel .ch-side { flex: 1; min-height: 0; border: 0; background: var(--surface); }
.ch-panel .ch-side-head h1 { font-size: 1.15rem; }
.ch-panel .ch-main { flex: 1; min-height: 0; }
.ch-panel .ch-back { display: inline-flex; }
.ch-panel .ch-head { padding: 9px 10px; gap: 6px; }
.ch-panel .ch-head .btn > span { display: none; }
.ch-panel .ch-m { max-width: 88%; }
.ch-panel .ch-msgs { padding: 10px 12px 14px; }
.nt-pop { position: fixed; z-index: 58; width: min(400px, calc(100vw - 16px)); max-height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-l); overflow: hidden; animation: chpFade .12s ease; }
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px 9px; border-bottom: 1px solid var(--border); }
.nt-head h2 { display: flex; align-items: center; gap: 7px; font-size: 1rem; }
.nt-head h2 .ic { color: var(--royal); }
.nt-list { overflow-y: auto; padding: 4px 6px 8px; }
.nt-sec { margin: 10px 10px 4px; font-size: .74rem; font-weight: 800; color: var(--faint); }
.nt-item { position: relative; display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: none; color: var(--text); text-align: start; cursor: pointer; font: inherit; }
.nt-item:hover { background: var(--surface-2); }
.nt-item.unread { background: #f3f7ff; }
.nt-item.unread:hover { background: #eaf1ff; }
.nt-ic { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #42ACFD, #1249FF); }
.nt-ic.message { background: linear-gradient(135deg, #1249FF, #1818A0); }
.nt-ic.owner { background: linear-gradient(135deg, #ffd166, #e09a00); }
.nt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nt-t b { font-size: .86rem; line-height: 1.45; }
.nt-t span { font-size: .8rem; color: var(--muted); }
.nt-t time { font-size: .7rem; color: var(--faint); }
.nt-item.unread .nt-t time { color: var(--royal); font-weight: 700; }
.nt-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--royal); flex: none; margin-top: 6px; }
.nt-none, .nt-empty { text-align: center; color: var(--muted); padding: 26px 12px; margin: 0; }
.nt-none .ic { color: var(--sky); }
.nt-x { width: 32px; height: 32px; }
@media (max-width: 820px) {
  .chp { width: 100vw; padding-top: var(--sat); }
  .chp-scrim { display: none; }
  body.chp-on .bottomnav, body.chp-on .fab { display: none !important; }
  .ch-panel .ch-compose { padding-bottom: calc(8px + var(--sab)); }
  .ch-panel .ch-input { font-size: 16px; }
  .nt-pop { left: 8px !important; right: 8px; top: calc(var(--sat) + 66px) !important; width: auto; max-height: calc(100vh - var(--sat) - 160px); }
}
@media print { .chp-wrap, .nt-pop { display: none !important; } }

/* ================= الإشعارات: أشرطة الدعوة، وصفحة «الإشعارات»، وإرشاد التثبيت على الآيفون (push.js وpushprefs.js) ================= */
/* شريط الدعوة: بطاقة هادئة بأيقونة متدرجة وزر أساسي واحد، ويخفيها «لاحقًا» أسبوعين */
.promo { display: flex; align-items: center; gap: 12px; margin: 12px 24px 0; padding: 12px 14px; border-radius: 18px;
  background: linear-gradient(135deg, #f1f6ff 0%, #ffffff 72%); border: 1px solid rgba(18, 73, 255, .13); box-shadow: 0 8px 24px rgba(9, 9, 81, .07);
  animation: promoIn .4s var(--ease-ios); }
.promo-ic { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 6px 14px rgba(18, 73, 255, .24); }
.promo-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.promo-t b { font-size: .95rem; }
.promo-t span { font-size: .84rem; color: var(--muted); }
.promo-a { display: flex; gap: 6px; flex: none; }
@keyframes promoIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* صفحة الإشعارات: بطاقة حالة كحلية، ثم قوائم بأيقونات ملونة ومفاتيح تشغيل */
.pn { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.pn-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-items: center; padding: 20px;
  border-radius: 22px; overflow: hidden; color: #fff;
  background: radial-gradient(85% 130% at 100% 0%, rgba(66, 172, 253, .5), rgba(66, 172, 253, 0) 62%), linear-gradient(150deg, #111182, #090951); }
.pn-hero::after { content: ""; position: absolute; z-index: -1; left: -50px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(127, 255, 255, .22), rgba(127, 255, 255, 0)); pointer-events: none; }
.pn-hero-ic { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22); }
.pn-hero.go .pn-hero-ic { background: var(--grad); border-color: transparent; box-shadow: 0 8px 20px rgba(18, 73, 255, .35); }
.pn-hero.on .pn-hero-ic { background: rgba(34, 165, 91, .9); border-color: rgba(167, 243, 208, .5); }
.pn-hero.step .pn-hero-ic { background: rgba(66, 172, 253, .35); }
.pn-hero.wait .pn-hero-ic { background: rgba(240, 138, 10, .32); }
.pn-hero.off { background: linear-gradient(150deg, #2b3063, #171a40); }
.pn-hero-t h2 { font-size: 1.12rem; line-height: 1.45; color: #fff; margin: 0 0 4px; }
.pn-hero-t p { margin: 0; color: #d6e1ff; font-size: .9rem; line-height: 1.7; }
.pn-hero-a { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.pn-hero .btn { min-height: 42px; border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .12); color: #fff; }
.pn-hero .btn:hover { background: rgba(255, 255, 255, .2); }
.pn-hero .btn.primary { background: #fff; border-color: #fff; color: var(--navy); }
.pn-hero .btn.primary:hover { background: #eef3ff; }
.pn-hero .btn.ghost { background: transparent; border-color: transparent; color: #c9d6ff; }
.pn-card { padding: 4px 0 6px; overflow: hidden; }
.pn-card-h { padding: 14px 18px 8px; }
.pn-card-h h3 { font-size: 1rem; }
.pn-card-h p { margin: 3px 0 0; font-size: .84rem; color: var(--muted); line-height: 1.6; }
.pn-rows { display: flex; flex-direction: column; }
.pn-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; cursor: pointer; transition: background .15s; }
.pn-row:hover { background: var(--surface-2); }
.pn-rows > .pn-row ~ .pn-row { border-top: 1px solid var(--border); }
.pn-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.t-dm { background: var(--royal); } .t-group { background: var(--ios-teal); } .t-updates { background: var(--ios-purple); }
.t-assigned { background: var(--ios-green); } .t-digest { background: var(--ios-orange); } .t-owner { background: var(--navy-3); }
.t-quiet { background: #4B4FD6; } .t-privacy { background: var(--ios-gray); } .t-mail { background: var(--sky); }
.t-device { background: var(--fill-2); color: var(--navy); }
.pn-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.pn-tx b { font-size: .93rem; font-weight: 700; }
.pn-tx small { font-size: .8rem; color: var(--muted); }
/* مفتاح التشغيل: يمين = موقوف، يسار = مفعّل (اتجاه الكتابة العربية) */
.switch { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: 999px;
  background: #e2e4ee; cursor: pointer; transition: background .25s var(--ease-ios); }
.switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .06); transition: transform .25s var(--ease-ios); }
.switch:checked { background: var(--ios-green); }
.switch:checked::after { transform: translateX(-20px); }
.switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pn-sub { display: flex; flex-direction: column; gap: 10px; padding: 2px 18px 14px; padding-inline-start: 64px; }
.pn-time { display: flex; gap: 12px; flex-wrap: wrap; }
.pn-time label { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); }
.pn-time .input { width: 124px; min-height: 38px; text-align: center; }
.pn-days { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.day-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.day-chips button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-2); background: var(--surface); color: var(--muted);
  font: inherit; font-weight: 700; font-size: .86rem; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.day-chips button:active { transform: scale(.92); }
.day-chips button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pn-rooms { display: flex; flex-wrap: wrap; gap: 6px; }
.pn-room { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border-2); background: var(--surface); border-radius: 999px;
  padding: 4px 11px; font: inherit; font-size: .82rem; cursor: pointer; color: var(--text); }
.pn-room .ic { color: var(--primary); }
.pn-room.muted { color: var(--faint); background: var(--fill); border-style: dashed; }
.pn-room.muted .ic { color: var(--faint); }
.pn-devs, .pn-team { list-style: none; margin: 0; padding: 0 0 4px; }
.pn-devs li, .pn-team li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; }
.pn-devs li + li, .pn-team li + li { border-top: 1px solid var(--border); }
.pn-devs .chip, .pn-team .chip { font-weight: 700; }
.pn-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-weight: 800; }
.pn-none { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 4px 18px 14px; margin: 0; font-size: .88rem; }
/* إرشاد التثبيت على الآيفون: ثلاث خطوات بأيقونات كما تظهر في Safari */
.is-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.is-step { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); }
.is-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 800; display: grid; place-items: center; }
.is-ic { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: #fff; color: var(--royal); box-shadow: 0 2px 10px rgba(9, 9, 81, .09); }
.is-step > div > b { display: block; font-size: .93rem; }
.is-step > div > span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.6; }
.nt-head .nt-set { width: 32px; height: 32px; }
@media (max-width: 820px) {
  .promo { margin: 8px 16px 0; flex-wrap: wrap; }
  .promo-a { width: 100%; }
  .promo-a .btn { flex: 1; min-height: 40px; }
  .pn-hero { padding: 18px 16px; border-radius: 24px; }
  .pn-hero-a .btn { flex: 1 1 auto; }
  .pn-sub { padding-inline-start: 18px; }
  .pn-row { padding: 12px 16px; }
}

/* ================= الإشعارات، التصميم المعتمد (18 نوفمبر 2026): معاينة حية وخط زمني لليوم، والكحلي هو الغالب ================= */
.switch:checked { background: var(--navy-3); }
.day-chips button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pz { --pz-q: rgba(66, 172, 253, .16); display: flex; flex-direction: column; gap: 28px; max-width: 760px; }
.pz h3 { font-size: 1.02rem; margin: 0 0 10px; }
.pz-stage { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: center; }
.pz-lock { background: var(--navy); color: #fff; border-radius: 34px; padding: 22px 16px 14px; min-height: 360px; display: flex; flex-direction: column; }
.pz-date { text-align: center; font-size: .82rem; color: #c3cdf2; }
.pz-time { text-align: center; font-size: 3.1rem; font-weight: 700; line-height: 1.1; margin: 2px 0 16px; direction: ltr; letter-spacing: .5px; }
.pz-stack { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pz-n { background: rgba(255, 255, 255, .09); border-radius: 15px; padding: 9px 12px; font-size: .84rem; line-height: 1.5; max-height: 80px;
  transition: opacity .3s var(--ease-ios), max-height .35s var(--ease-ios), padding .35s var(--ease-ios), margin .35s var(--ease-ios); overflow: hidden; }
.pz-n b { display: block; font-weight: 700; }
.pz-n span { color: #c3cdf2; transition: color .25s; }
.pz-n.hid span { color: transparent; background: rgba(255, 255, 255, .14); border-radius: 4px; }
.pz-n.off { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -7px; }
.pz-empty { color: #c3cdf2; font-size: .85rem; text-align: center; margin: auto 0; }
.pz-note { margin: 10px 0 0; font-size: .72rem; color: #8f9acc; text-align: center; }
.pz-status h2 { font-size: 1.35rem; margin: 6px 0 6px; }
.pz-status p { color: var(--muted); margin: 0 0 16px; line-height: 1.75; }
.pz-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.pz-status.on .pz-dot { background: var(--ios-green); } .pz-status.go .pz-dot { background: var(--sky); } .pz-status.wait .pz-dot { background: var(--ios-orange); }
.pz-btn { font: inherit; font-weight: 700; border-radius: 999px; padding: 10px 20px; cursor: pointer; border: 1px solid var(--border-2); background: var(--surface); color: var(--navy); margin-inline-end: 6px; }
.pz-btn.main { background: var(--navy); border-color: var(--navy); color: #fff; }
.pz-btn.main:hover { background: var(--navy-2); }
.pz-btn.quiet { border-color: transparent; background: none; color: var(--muted); }
.pz-btn:disabled { opacity: .5; }
.pz-sec { border-top: 1px solid var(--border); padding-top: 22px; }
.pz-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pz-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .92rem; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--muted); transition: background .2s, color .2s, border-color .2s; }
.pz-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pz-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; font-size: .88rem; color: var(--muted); }
.pz-inline .input { width: 118px; min-height: 36px; text-align: center; }
.pz-rooms { display: flex; flex-wrap: wrap; gap: 6px; }
.pz-room { font: inherit; font-size: .84rem; border: 0; background: var(--fill); color: var(--text); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.pz-room.muted { text-decoration: line-through; color: var(--faint); }
.pz-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pz-head h3 { margin: 0; }
.pz-head p { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.pz-head + .pz-head { margin-top: 18px; }
.pz-sum { color: var(--text); margin: 6px 0 14px; font-size: .95rem; }
.pz-tl { position: relative; padding: 4px 0; }
.pz-zone { position: absolute; top: 0; bottom: 0; inset-inline-start: 104px; inset-inline-end: 0; border-radius: 8px; pointer-events: none; }
.pz-lane { display: flex; align-items: center; gap: 0; height: 30px; position: relative; z-index: 1; }
.pz-lane > span { width: 104px; flex: none; font-size: .8rem; color: var(--muted); }
.pz-lane.off > span { text-decoration: line-through; color: var(--faint); }
.pz-bar { position: relative; flex: 1; height: 100%; border-bottom: 1px dashed var(--border); }
.pz-bar i { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px -4.5px 0 0; border-radius: 50%; background: var(--navy-3); }
.pz-bar i.held { background: var(--bg); border: 1.5px solid var(--sky); }
.pz-axis { display: flex; justify-content: space-between; margin-inline-start: 104px; font-size: .72rem; color: var(--faint); padding-top: 4px; }
.pz-time-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 16px; font-size: .88rem; color: var(--muted); }
.pz-time-row label { display: flex; align-items: center; gap: 8px; }
.pz-time-row .input { width: 118px; min-height: 36px; text-align: center; }
.pz-days-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pz-list { list-style: none; margin: 0; padding: 0; }
.pz-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.pz-l b { font-weight: 700; } .pz-l em { font-style: normal; font-size: .76rem; color: var(--ok); margin-inline-start: 8px; }
.pz-l small { display: block; color: var(--muted); font-size: .8rem; }
.pz-p { color: var(--muted); margin: 0 0 6px; font-size: .9rem; }
.pz-tag { font-size: .8rem; color: var(--faint); } .pz-tag.on { color: var(--navy); font-weight: 700; }
.pz-meter { height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; margin: 2px 0 10px; }
.pz-meter i { display: block; height: 100%; background: var(--navy-3); border-radius: 99px; }
@media (max-width: 820px) {
  .pz { gap: 24px; }
  .pz-stage { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .pz-lock { min-height: 0; border-radius: 30px; }
  .pz-lane > span { width: 84px; } .pz-zone { inset-inline-start: 84px; } .pz-axis { margin-inline-start: 84px; }
}

/* شريط الدعوة بالكحلي: سطر واحد وزر واحد، دون أيقونة متدرجة */
.promo { background: var(--navy); border: 0; box-shadow: none; color: #fff; border-radius: 20px; }
.promo-ic { background: rgba(255, 255, 255, .12); box-shadow: none; color: var(--aqua); border-radius: 50%; width: 38px; height: 38px; }
.promo-t span { color: #c3cdf2; }
.promo .btn.primary { background: #fff; border-color: #fff; color: var(--navy); }
.promo .btn.ghost { color: #c3cdf2; }
.promo .btn.ghost:hover { background: rgba(255, 255, 255, .08); }

/* إرشاد التثبيت: هاتف بالكحلي يحاكي Safari، والمشهد الحالي في [data-s] */
.iw { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.iw-phone { position: relative; width: 210px; height: 380px; border-radius: 34px; border: 7px solid var(--navy); background: #f4f5fa; overflow: hidden; cursor: pointer; }
.iw-page { position: absolute; inset: 0 0 46px; padding: 34px 16px; }
.iw-site { display: flex; flex-direction: column; gap: 8px; }
.iw-site i { height: 9px; border-radius: 5px; background: #dfe2ee; } .iw-site i.s { width: 60%; }
.iw-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--navy) url(/icons/icon-192.png) center/cover; display: block; }
.iw-bar { position: absolute; inset-inline: 8px; bottom: 8px; height: 36px; border-radius: 99px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 12px;
  font-size: .72rem; color: #555b7a; box-shadow: 0 1px 4px rgba(9, 9, 81, .12); direction: ltr; }
.iw-more { position: relative; font-weight: 800; letter-spacing: 1px; }
.iw-ring { position: absolute; inset: -9px -11px; border-radius: 50%; border: 2px solid var(--sky); opacity: 0; }
.iw[data-s="0"] .iw-ring { animation: iwPulse 1.3s ease-out infinite; }
@keyframes iwPulse { 0% { opacity: .9; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.4); } }
.iw-menu, .iw-share, .iw-add, .iw-home { position: absolute; transition: transform .45s var(--ease-ios), opacity .35s; }
.iw-menu { inset-inline-end: 10px; bottom: 52px; width: 128px; background: #fff; border-radius: 14px; padding: 4px; font-size: .74rem; opacity: 0; transform: translateY(10px) scale(.95); box-shadow: 0 6px 20px rgba(9, 9, 81, .18); }
.iw-menu div, .iw-share div { padding: 7px 10px; border-radius: 9px; color: #2b2f55; }
.iw-share { inset-inline: 0; bottom: 0; background: #fff; border-radius: 22px 22px 0 0; padding: 14px 10px 18px; font-size: .74rem; transform: translateY(105%); }
.iw-share p { margin: 0 6px 8px; font-weight: 800; color: var(--navy); }
.iw-share div span { float: left; }
.iw-add { inset: 0; background: #f4f5fa; padding: 14px 12px; font-size: .74rem; transform: translateY(105%); }
.iw-addbar { display: flex; justify-content: space-between; color: #555b7a; margin-bottom: 18px; }
.iw-addbar b { color: var(--navy); border-radius: 8px; padding: 1px 6px; }
.iw-app { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 10px; font-weight: 700; color: var(--navy); }
.iw-tg { margin-top: 10px; background: #fff; border-radius: 12px; padding: 10px; display: flex; justify-content: space-between; align-items: center; color: #2b2f55; }
.iw-tg i { width: 30px; height: 18px; border-radius: 99px; background: var(--navy-3); position: relative; }
.iw-tg i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.iw-home { inset: 0; background: var(--navy); padding: 46px 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 10px; align-content: start; opacity: 0; }
.iw-home > span { width: 34px; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .14); }
.iw-home .me { background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; height: auto; }
.iw-home .me em { font-style: normal; font-size: .52rem; color: #fff; white-space: nowrap; }
.iw .hl { background: rgba(66, 172, 253, .18); color: var(--navy) !important; font-weight: 700; }
.iw[data-s="0"] .iw-menu { opacity: 1; transform: none; }
.iw[data-s="1"] .iw-share { transform: none; }
.iw[data-s="2"] .iw-add { transform: none; }
.iw[data-s="3"] .iw-home { opacity: 1; }
.iw[data-s="3"] .iw-home .me .iw-logo { animation: iwPop .6s var(--ease-ios); }
@keyframes iwPop { 0% { transform: scale(.3); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.iw-cap { text-align: center; min-height: 64px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.iw-cap b { font-size: .98rem; } .iw-cap span { color: var(--muted); font-size: .86rem; }
.iw-dots { display: flex; gap: 6px; margin-bottom: 6px; }
.iw-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: var(--border-2); cursor: pointer; transition: width .25s; }
.iw-dots button.on { width: 22px; background: var(--navy); }
@media (prefers-reduced-motion: reduce) { .iw * { animation: none !important; transition: none !important; } }
.iw-menu { inset-inline-end: auto; right: 10px; }
.is-sheet .modal-foot .btn.primary { background: var(--navy); border-color: var(--navy); }
