/* ==========================================================================
   aswar-plane.css — تجربة شكلٍ بروح Plane (الفرع try/plane) فوق aswar.css، ويُحمَّل بعده.
   الفكرة: أرضيّةٌ بيضاء واحدة وحدودٌ رفيعة بدل بطاقاتٍ عائمة بظلال، وكثافةٌ أعلى، وقائمةٌ جانبيّة مسطّحة،
   وشريطٌ علويّ يحمل عنوان الشاشة. الخطوط من MWPortal، والألوان اختيار المالك في :root أدناه (ADR-026)، ولا لون صريحاً خارجها (يفرضه اختبار).
   وملفٌّ مستقلّ عمداً: حذفه وحذف رابطه يعيدان الأشكال، فأشكال MWPortal في aswar.css لم تُمسّ.
   ========================================================================== */

:root {
    /* ألوان الشركة، اختارها المالك من قوائمه (ADR-026). تُبدَّل هنا لا في نسخة MWPortal (lib/)، وكلّ ما يقرأ الرموز يتبعها.
       وأسماء الرموز باقيةٌ كما هي: --lime هو الآن لون الزرّ الرئيسيّ، و--status-amber نصّ التحذير */
    --lime: #1B4D66;
    --lime-hover: #0E2238;
    --lime-soft: #BDD5EA;
    --lime-edge: #2FA7A0;
    --on-lime: #FFFFFF;
    --bg-page: #FBF8F3;
    --bg-hover: #E9ECEF;
    --bg-input: #F8F9FA;
    --border-subtle: #E9ECEF;
    --border-default: #DEE2E6;
    --border-hover: #CED4DA;
    --border-input: #6C757D;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-tertiary: #495057;
    --text-placeholder: #6C757D;
    --shadow-rgb: 33, 37, 41;
    --status-green: #2D6A4F;
    --status-blue: #1B4D66;
    --status-amber: #212529;
    --status-purple: #577399;
    --edge-green: #B7E4C7;
    --edge-amber: #E8A87C;
    --edge-red: #FE5F55;
    --edge-blue: #BDD5EA;
    --green-50: #D8F3DC;
    --amber-50: #FBF8F3;
    --blue-50: #F7F7FF;
    --aw-land-streets: #ADB5BD;
    --aw-land-landowner: var(--edge-amber);
    --aw-land-green: #40916C;

    --topbar-h: 48px;
    --content-pad: 20px;
    --control-h: 28px;
    --pager-h: 28px;
    /* مقاسات الإطار وسلّم الارتفاع: 24 · 28 · 32 */
    --aw-nav-h: 40px;
    --aw-side-w: 250px; /* العرض المحفوظ */
    --aw-side-now: var(--aw-side-w); /* العرض المرسوم: يقصر عن المحفوظ في الوضع الطافي، والمحفوظ لا يتغيّر */
    --aw-frame-m: 8px;
    --aw-scrollbar-w: 12px;
    --aw-hover-t: 150ms;
    --aw-h-sm: 24px;
    --aw-h-lg: 32px;
    /* ارتفاع السطر لكلّ حجم خطّ: 12 · 13 · 14 · 16 · 20. وCairo أطول من خطّ Plane، فالقيم أوسع قليلاً من قياسه */
    --aw-lh-12: 18px;
    --aw-lh-13: 20px;
    --aw-lh-14: 22px;
    --aw-lh-16: 24px;
    --aw-lh-20: 28px;
    /* حلقة التركيز الواحدة: 2 بلون التمييز وبُعد 1 وانتقال 200. وما يقصّها فيه متمرّرٌ يرسمها في داخله (--aw-ring-at: -2px)، وما تحمل حلقته حاويته يخفيها (--aw-ring-c: transparent) */
    --aw-ring-w: 2px;
    --aw-ring-at: 1px;
    --aw-ring-c: var(--status-blue);
    --aw-ring-t: 200ms;
    /* ظلّ القوائم بطبقتين */
    --aw-menu-shadow: 0 1px 3px rgba(var(--shadow-rgb), .08), 0 8px 24px rgba(var(--shadow-rgb), .12);
    /* الزرّ المعطَّل: رماديٌّ ثابت بلا شفافيّة */
    --aw-disabled-bg: var(--bg-hover);
    --aw-disabled-fg: var(--text-tertiary);
    /* مرور القائمة 4% ونشطها 8% من لون النصّ */
    --aw-nav-hover: color-mix(in srgb, var(--text-primary) 4%, transparent);
    --aw-nav-active: color-mix(in srgb, var(--text-primary) 8%, transparent);
    --shell-inset: 0px;
    --r-card: 10px;
    --r-card-sm: 8px;
    --r-control: 8px;
    --r-btn: 6px;
    --r-tile: 6px;
    /* لا none: هذا الرمز يأتي في قائمة ظلال (.auth-card)، وnone فيها تُبطل القاعدة كلّها */
    --shadow-card: 0 0 0 0 transparent;
    /* حالات الدار في الخريطة: تختلف العتمة لا اللون وحده (داكنة · متوسّطة · فاتحة · بلا تعبئة) */
    --aw-lot-sold-bg: var(--status-green);
    --aw-lot-sold-fg: var(--inverse-fg);
    --aw-lot-reserved-bg: var(--edge-amber);
    --aw-lot-reserved-fg: var(--text-primary);
    --aw-lot-reserved-edge: var(--aw-lot-reserved-bg); /* بلا حدٍّ ظاهر: العتمة تفرّقها عن «متاحة» وعن «مبيعة» */
    --aw-lot-available-bg: var(--bg-card);
    --aw-lot-available-fg: var(--text-secondary);
    --aw-lot-available-edge: var(--border-hover);
    --aw-lot-unset-fg: var(--text-tertiary);
    --aw-lot-sold-hover: color-mix(in srgb, var(--aw-lot-sold-bg) 85%, var(--text-primary));
    --aw-lot-reserved-hover: color-mix(in srgb, var(--aw-lot-reserved-bg) 85%, var(--text-primary));
    --aw-rank-fill: color-mix(in srgb, var(--bg-hover) 50%, var(--border-default)); /* يُرى بلا أن يثقل، وحدّه لا يقطع النصّ فوقه */
    --aw-rank-sold: color-mix(in srgb, var(--aw-lot-sold-bg) 28%, var(--bg-card)); /* لون «مبيعة» في الخريطة، مخفَّفاً ليبقى النصّ فوقه مقروءاً */
    --aw-panel-w: 1024px;
    --aw-frame-inner: calc(100vw - 2 * var(--aw-frame-m) - 2px); /* عرض ما داخل حدّي الإطار */
}

/* ---------- الإطار: شريطٌ عامّ بعرض النافذة، وتحته لوحةٌ بيضاء واحدة تضمّ القائمة والمحتوى، والرماديّ خلفهما.
   النافذة لا تتمرّر أبداً: #aw-content هو المتمرّر الوحيد، وما يلصق يلصق في أعلاه (top: 0) ---------- */
html.aw-app, body.aw-app { height: 100%; overflow: hidden; }
body.aw-app { display: flex; flex-direction: column; background: var(--bg-page); }
.aw-topnav {
    position: relative; z-index: 40; flex: none;
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px;
    height: var(--aw-nav-h); padding-inline: var(--aw-frame-m);
}
.aw-frame {
    position: relative; flex: 1; min-height: 0; display: flex;
    margin: 0 var(--aw-frame-m) var(--aw-frame-m);
    background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--r-card-sm); overflow: clip;
}
.main { min-height: 0; background: var(--bg-card); }
/* الحشوة الرأسيّة على الحاوية لا المتمرّر: اللاصق يُحسب من داخل حشوة متمرّره، فتظهر الصفوف فوقه في شريطٍ بعرضها */
.content { flex: 1; min-height: 0; padding-block: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.content-container { padding-block: var(--content-pad); }
#aw-content:focus { outline: none; }
/* انتظار الانتقال: يخفت المحتوى بعد 200 ملّي ثانية، ويرفع aswar.js العلامة (الهيكل الرماديّ في المرحلة 8) */
.content.aw-loading { opacity: .6; }
@media (prefers-reduced-motion: no-preference) { .content { transition: opacity var(--aw-hover-t); } }

/* شريط التمرير: 12 بمقبض كبسولة حافّته شفّافة 2 ومسارٍ شفّاف، ولا يظهر إلّا عند الحاجة */
.content::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .aw-block-side::-webkit-scrollbar, .aw-panel::-webkit-scrollbar, .aw-drawer-body::-webkit-scrollbar, .aw-board::-webkit-scrollbar, .aw-cw-body::-webkit-scrollbar { width: var(--aw-scrollbar-w); height: var(--aw-scrollbar-w); }
.aw-board-cards::-webkit-scrollbar { width: min(8px, var(--aw-scrollbar-w)); }
.content::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-track, .aw-block-side::-webkit-scrollbar-track, .aw-panel::-webkit-scrollbar-track, .aw-drawer-body::-webkit-scrollbar-track, .aw-board::-webkit-scrollbar-track, .aw-board-cards::-webkit-scrollbar-track, .aw-cw-body::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .aw-block-side::-webkit-scrollbar-thumb, .aw-panel::-webkit-scrollbar-thumb, .aw-drawer-body::-webkit-scrollbar-thumb, .aw-board::-webkit-scrollbar-thumb, .aw-board-cards::-webkit-scrollbar-thumb, .aw-cw-body::-webkit-scrollbar-thumb {
    background: var(--border-hover); background-clip: padding-box; border: 2px solid transparent; border-radius: 6px;
}
.content::-webkit-scrollbar-thumb:hover, .table-wrap::-webkit-scrollbar-thumb:hover, .aw-block-side::-webkit-scrollbar-thumb:hover, .aw-panel::-webkit-scrollbar-thumb:hover, .aw-drawer-body::-webkit-scrollbar-thumb:hover, .aw-board::-webkit-scrollbar-thumb:hover, .aw-board-cards::-webkit-scrollbar-thumb:hover, .aw-cw-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-placeholder); background-clip: padding-box; border: 2px solid transparent;
}
@supports not selector(::-webkit-scrollbar) {
    .content, .table-wrap, .aw-block-side, .aw-panel, .aw-drawer-body, .aw-board, .aw-board-cards, .aw-cw-body { scrollbar-width: thin; scrollbar-color: var(--border-hover) transparent; }
}

/* ---------- الشريط العامّ: العلامة · البحث في وسط النافذة أيّاً كان ما حوله · المساعدة والحساب ---------- */
.aw-brand {
    display: inline-flex; align-items: center; gap: 8px; justify-self: start; min-width: 0; max-width: 100%; height: var(--aw-h-lg); padding-inline: 4px;
    font-size: 14px; font-weight: 500; color: var(--text-primary); border-radius: 4px;
}
.aw-brand:hover { text-decoration: none; background: var(--aw-nav-hover); }
.sidebar-brand-logo { height: 22px; }
.gsearch { flex: none; justify-self: center; width: 364px; max-width: 100%; }
.searchbox { height: var(--control-h); padding: 0 8px; background: var(--bg-card); border-radius: var(--r-control); }
.searchbox:focus-within { border-color: var(--border-default); box-shadow: none; }
/* بلا بطانة المتصفّح: المسافة بين العدسة والنصّ 8 من الحقل نفسه */
.searchbox-input { width: 100%; padding: 0; font-size: 13px; font-weight: 450; }
.searchbox-ico svg { width: 14px; height: 14px; }
.searchbox-kbd { font-size: 12px; line-height: 1.2; }
.aw-topnav-end { justify-self: end; display: flex; align-items: center; gap: 4px; }
/* زرّ أيقونةٍ بلا حدّ: 28×28، والمرور يغيّر الخلفيّة وحدها */
.aw-nav-btn, .aw-icon-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; padding: 0;
    color: var(--text-secondary); background: transparent; border: 0; border-radius: var(--r-btn); cursor: pointer;
}
.aw-nav-btn:hover, .aw-icon-btn:hover { background: var(--aw-nav-hover); }
.aw-nav-btn svg { width: 16px; height: 16px; }
.aw-icon-btn svg { width: 16px; height: 16px; }
/* flex لا inline-flex: داخل details يقع الزرّ في سطرٍ يرفعه عن الوسط */
.aw-menu > .aw-nav-btn { display: flex; }
.aw-menu > .aw-nav-avatar { border-radius: 50%; }
.aw-menu[open] > .aw-nav-avatar { background: transparent; }
.account-avatar { width: 28px; height: 28px; font-size: 12px; }
.imp-drop.is-over { background: var(--bg-page); } /* لا لون دائرة المستخدم */
/* قائمتا الشريط العامّ */
.aw-menu-panel.aw-nav-panel { padding: 4px; }
.aw-menu-panel.aw-help-panel { width: 202px; }
.aw-menu-panel.aw-account-panel { width: 288px; }
.aw-account-head { display: flex; align-items: center; gap: 8px; padding: 8px; }
.account-name { font-size: 14px; }
.account-role { font-size: 12px; }
.aw-menu-sep { height: 1px; margin: 4px 0; background: var(--border-subtle); }
.aw-menu-row {
    display: flex; align-items: center; gap: 8px; width: 100%; height: var(--aw-h-lg); padding: 0 8px; font: inherit; font-size: 13px; font-weight: 500;
    color: var(--text-primary); text-align: start; background: transparent; border: 0; border-radius: var(--r-btn); cursor: pointer;
}
.aw-menu-row:hover { background: var(--aw-nav-hover); }
.aw-menu-row svg { flex: none; width: 16px; height: 16px; }
.aw-menu-row--danger { color: var(--status-red); }
.aw-menu-note { display: flex; align-items: center; gap: 4px; height: var(--aw-h-lg); margin: 0; padding: 0 8px; font-size: 12px; color: var(--text-tertiary); }

/* نافذة الاختصارات */
/* أعلاها ثابت لا في الوسط: البحث في الاختصارات يقصّر النافذة، فلا يقفز حقله ولا زرّ إغلاقها تحت المؤشّر */
.aw-dialog {
    --aw-dialog-top: max(32px, 10dvh);
    width: min(560px, calc(100vw - 32px)); max-height: min(720px, calc(100dvh - var(--aw-dialog-top) - 32px)); margin: var(--aw-dialog-top) auto auto; padding: 0; overflow: hidden;
    color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--r-card); box-shadow: var(--shadow-lift);
}
.aw-dialog[open] { display: flex; flex-direction: column; }
.aw-dialog::backdrop { background: rgba(var(--shadow-rgb), .35); }
.aw-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 8px; }
.aw-dialog-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.aw-dialog-find { padding: 0 16px 8px; border-bottom: 1px solid var(--border-subtle); }
.aw-sc-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 16px; }
.aw-sc-group + .aw-sc-group { margin-top: 12px; }
.aw-sc-group h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--text-tertiary); }
.aw-sc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--aw-h-lg); font-size: 13px; }
.aw-sc-keys { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12px; color: var(--text-tertiary); }
.aw-sc-keys kbd {
    display: inline-flex; align-items: center; height: var(--aw-h-sm); padding: 0 6px; direction: ltr; unicode-bidi: isolate; font: inherit; font-size: 12px;
    color: var(--text-secondary); background: var(--bg-page); border: 1px solid var(--border-default); border-radius: 4px;
}
.aw-sc-none { margin: 8px 0 0; font-size: 13px; color: var(--text-tertiary); }

/* فقاعة التلميح (data-aw-tip): واحدةٌ في الصفحة، يضعها aswar.js */
.aw-tip {
    position: fixed; z-index: 120; max-width: 320px; padding: 4px 8px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere;
    color: var(--inverse-fg); background: var(--inverse-bg); border-radius: 6px; box-shadow: var(--shadow-lift); pointer-events: none;
}

/* القائمة السياقيّة (الزرّ الأيمن و«…»): واحدةٌ في الصفحة، يضعها aswar.js عند المؤشّر أو تحت الزرّ. وفوق كلّ شيءٍ إلّا التلميح */
.aw-menu-panel.aw-ctx-menu { position: fixed; inset: auto; z-index: 110; width: 202px; padding: 4px; }
a.aw-menu-row:hover { text-decoration: none; }

/* ---------- القائمة الجانبيّة: ورقةٌ واحدة مع المحتوى يفصلهما خطّ. الرأس ثابت، والوسط يتمرّر بشريطٍ مخفيّ ---------- */
.sidebar {
    position: relative; top: auto; flex: none; height: auto; width: var(--aw-side-now);
    background: var(--bg-card); border-inline-end: 1px solid var(--border-default); overflow: clip;
}
/* عرضها من الرمز لا من الأب: لا ينضغط ما فيها أثناء الطيّ */
.aw-side-body { flex: none; display: flex; flex-direction: column; width: calc(var(--aw-side-now) - 1px); height: 100%; padding-top: 10px; }
.aw-side-head { flex: none; display: flex; align-items: center; justify-content: flex-end; height: var(--control-h); margin: 0 12px 8px; }
.aw-side-nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 12px; scrollbar-width: none; }
.aw-side-nav::-webkit-scrollbar { display: none; }
.nav-list { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.nav-list li + li { margin-top: 1px; }
.nav-item { height: var(--aw-h-lg); gap: 8px; padding: 0 8px; font-size: 14px; font-weight: 500; border-radius: 8px; }
/* المرور يغيّر الخلفيّة وحدها: لا لون النصّ ولا حركة الأيقونة. والعنصر النشط أغمق بالوزن نفسه */
.nav-item:hover { background: var(--aw-nav-hover); color: var(--text-secondary); }
.nav-item.active, .nav-item.active:hover { background: var(--aw-nav-active); color: var(--text-primary); font-weight: 500; }
.nav-item.active::before { display: none; }
.sidebar .nav-item:hover svg { animation: none !important; }
.nav-ic { width: 16px; }
.nav-ic svg { width: 16px; height: 16px; }

/* قائمة المشاريع تحت بندها بإزاحة 16 */
.aw-sec-body { margin-top: 1px; padding-inline-start: 16px; }
.aw-tree-chev svg { width: 14px; height: 14px; }
.aw-tree-chev[aria-expanded="true"] svg { transform: rotate(-90deg); }
/* زرّ صغيرٌ في صفّ: 20×20 بأيقونة 14. والمخفيّ حتّى المرور يصله Tab، ويظهر له */
.aw-mini-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; padding: 0;
    color: var(--text-tertiary); background: transparent; border: 0; border-radius: 4px; cursor: pointer;
}
.aw-mini-btn:hover { text-decoration: none; background: var(--aw-nav-hover); }
.aw-mini-btn svg { width: 14px; height: 14px; }

/* الشجرة: صفّ المشروع 32 */
.aw-tree { margin: 0; padding: 0; list-style: none; }
.aw-tree > li + li { margin-top: 1px; }
.aw-tree-row { display: flex; align-items: center; height: var(--aw-h-lg); padding-inline-end: 6px; border-radius: 8px; transition: background var(--aw-hover-t); }
.aw-tree-row:hover { background: var(--aw-nav-hover); }
.aw-tree-row.active { background: var(--aw-nav-active); }
.aw-tree-link { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; height: 100%; padding: 0 8px; font-size: 14px; font-weight: 500; color: var(--text-secondary); border-radius: 8px; }
.aw-tree-link:hover { text-decoration: none; }
.aw-tree-row.active .aw-tree-link { color: var(--text-primary); }
.aw-tree-ic { flex: none; display: inline-flex; color: var(--text-tertiary); }
.aw-tree-ic svg { width: 16px; height: 16px; }
.aw-tree-row.active .aw-tree-ic { color: var(--text-primary); }
.aw-tree-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* «…» بلا مكانٍ حتّى المرور: الاسم يأخذ عرضه */
.aw-tree-more { width: 0; opacity: 0; overflow: hidden; }
.aw-tree-row:hover .aw-tree-more, .aw-tree-row:focus-within .aw-tree-more { width: 20px; opacity: 1; margin-inline-end: 2px; }
.aw-tree-empty { margin: 0; padding: 6px 8px; font-size: 13px; color: var(--text-tertiary); }
@media (hover: none) { .aw-tree-more { width: 20px; opacity: 1; } }
/* صفٌّ قائمته السياقيّة مفتوحة: يبقى مظلَّلاً، و«…» ظاهرة بعد خروج المؤشّر */
.aw-tree-row.is-ctx-open:not(.active) { background: var(--aw-nav-hover); }
.aw-tree-row.is-ctx-open .aw-tree-more { width: 20px; opacity: 1; margin-inline-end: 2px; }
/* فتح قائمة المشاريع وطيّها بحركة: aswar.js يضع is-moving عند الضغط وحده، فما يصل مع التبديل يُرسم في مكانه بلا حركة */
@media (prefers-reduced-motion: no-preference) {
    .aw-tree-chev svg { transition: transform var(--aw-hover-t); }
    .aw-sec-body.is-moving {
        interpolate-size: allow-keywords; overflow: clip; transition: height var(--aw-hover-t), display var(--aw-hover-t) allow-discrete;
    }
    .aw-sec-body.is-moving[hidden] { height: 0; }
    @starting-style { .aw-sec-body.is-moving:not([hidden]) { height: 0; } }
}

/* مقبض تغيير العرض على الحافّة الداخليّة: 4 عرضاً، يتلوّن بالمرور والتركيز وأثناء السحب، ولا يُحدَّد نصٌّ أثناءه */
.aw-side-resize {
    position: absolute; inset-block: 0; inset-inline-end: 0; width: 4px; cursor: col-resize; background: transparent; touch-action: none;
}
.aw-side-resize:hover, .aw-side-resize:focus-visible, .sidebar.is-resizing .aw-side-resize { background: var(--border-hover); }
.aw-frame:has(.sidebar.is-resizing) { cursor: col-resize; user-select: none; }

/* طيّ القائمة: عرضها صفر، والمحتوى يكبر، وزرّ فتحها أوّل صفّ الرأس */
.aw-side-open { display: none; }
@media (prefers-reduced-motion: no-preference) {
    .sidebar { transition: width 300ms ease, visibility 300ms; }
    .sidebar.is-resizing { transition: none; }
}
@media (min-width: 901px) {
    html[data-aw-side="closed"] .sidebar { width: 0; border-inline-end-width: 0; visibility: hidden; }
    html[data-aw-side="closed"] .aw-side-open { display: inline-flex; }
}

/* ---------- صفّ الرأس (48) وصفّ شارات التصفية تحته: ثابتان خارج المتمرّر، وعلى هامش المحتوى نفسه. وشريط تمرير المحتوى يقع في نهاية السطر ---------- */
/* header.topbar لا .topbar: aswar.css يضع حشوته بهذا الوزن عند 900 فأقلّ */
header.topbar, .aw-subbar {
    --aw-row-pad: max(var(--aw-content-gutter), calc((100% - var(--aw-scrollbar-w) - var(--aw-content-max)) / 2));
    padding-inline: var(--aw-row-pad) calc(var(--aw-row-pad) + var(--aw-scrollbar-w));
}
.topbar { flex: none; position: relative; top: auto; z-index: 5; gap: 8px; background: var(--bg-card); border-bottom: 1px solid var(--border-default); }
/* أساسه صفر: يأخذ ما يتبقّى وحده، فاسم مشروعٍ طويل (حتّى 200 حرف) لا يأكل الأزرار */
.aw-bar-title { flex: 1 1 0; min-width: 0; display: flex; align-items: center; }
.aw-bar-title h1 {
    display: inline-flex; align-items: center; gap: 6px; min-width: 0; margin: 0;
    font-size: 13px; font-weight: 500; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aw-bar-title .h1-ico svg { width: 16px; height: 16px; }
.aw-bar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.aw-bar-actions .btn { height: var(--control-h); padding-block: 0; font-size: 13px; }
/* قسمٌ معرَّف بلا محتوى (ما لا يخصّ هذه الصفحة): لا فراغ له ولا خطّ */
.aw-bar-actions:not(:has(*)), .aw-subbar:not(:has(*)) { display: none; }
/* زرّ الإضافة في الشريط: نصٌّ وحده */
.aw-bar-actions .aw-bar-new { padding-inline: 10px; font-weight: 500; white-space: nowrap; }

/* بحث صفحة المشاريع بالأنماط وحدها: عدسةٌ 24 بلا إطار في label يعطي الحقل التركيز، وتتّسع إلى حقلٍ 241×28 ما دام فيه التركيز أو نصّ، فصفحةٌ تصل بـ?q= تصل مفتوحة.
   والحقل المطويّ عرضه صفر لا مخفيّ: يصله Tab. وحين يضيق الصفّ يذهب العنوان أوّلاً ثمّ ينكمش الحقل المفتوح، فلا يخرج من الصفّ شيء */
.aw-bar-actions:has(.aw-lsearch) { flex-shrink: 1; min-width: 0; }
.aw-lsearch { position: relative; flex: 0 1 auto; width: var(--aw-h-sm); min-width: 0; }
.aw-lsearch-box {
    display: flex; align-items: center; justify-content: center; height: var(--aw-h-sm); overflow: hidden;
    color: var(--text-secondary); border: 1px solid transparent; border-radius: var(--r-btn); cursor: pointer;
}
.aw-lsearch-box:hover { background: var(--aw-nav-hover); }
.aw-lsearch-ico { display: inline-flex; flex: none; }
.aw-lsearch-ico svg, .aw-lsearch-clear svg { width: 14px; height: 14px; }
.aw-lsearch-box input { flex: 0 0 0; width: 0; min-width: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 450; color: var(--text-primary); background: transparent; border: 0; opacity: 0; }
.aw-lsearch-box input::placeholder { color: var(--text-placeholder); }
.aw-lsearch-box input::-webkit-search-cancel-button { display: none; }
/* × داخل الحقل: 24 في 28. وهي في الصفحة ما دام الطلب يبحث، فالحقل مفتوحٌ معها */
.aw-lsearch-clear {
    position: absolute; top: 2px; inset-inline-end: 2px; display: inline-flex; align-items: center; justify-content: center; width: var(--aw-h-sm); height: var(--aw-h-sm);
    color: var(--text-secondary); border-radius: var(--r-btn);
}
.aw-lsearch-clear:hover { text-decoration: none; background: var(--aw-nav-hover); }
.aw-lsearch:where(:focus-within, :has(input:not(:placeholder-shown), .aw-lsearch-clear)) { width: 241px; }
.aw-lsearch:where(:focus-within, :has(input:not(:placeholder-shown), .aw-lsearch-clear)) .aw-lsearch-box {
    justify-content: flex-start; gap: 6px; height: var(--control-h); padding-inline: 6px; background: var(--bg-card); border-color: var(--border-default); cursor: text;
}
.aw-lsearch:where(:focus-within, :has(input:not(:placeholder-shown), .aw-lsearch-clear)) input { flex: 1 1 0; opacity: 1; }
.aw-lsearch:has(.aw-lsearch-clear) .aw-lsearch-box { padding-inline-end: 27px; }
@media (prefers-reduced-motion: no-preference) { .aw-lsearch { transition: width var(--aw-hover-t); } }

/* مسار الصفحة في الشريط: المشروع ثمّ القسم، وآخره عنوان الشاشة. كلّ حلقةٍ 24 بأيقونة 16 ووزنٍ واحد، والحاليّة أغمق فقط */
.aw-crumbs { gap: 4px; margin: 0; font-size: 13px; font-weight: 500; }
.aw-crumbs-sep svg { width: 14px; height: 14px; }
.aw-crumbs .aw-ico svg { width: 16px; height: 16px; }
.aw-crumbs h1 { gap: 4px; height: var(--aw-h-sm); font-size: 13px; }
.aw-crumbs-here { overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.aw-crumb {
    display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: var(--aw-h-sm); padding-inline: 4px;
    font-size: 13px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; border-radius: var(--r-btn);
}
a.aw-crumb { flex-shrink: 0; }
.aw-crumbs a.aw-crumb { color: var(--text-secondary); }
.aw-crumb:hover { text-decoration: none; background: var(--aw-nav-hover); }
.aw-menu > summary.aw-crumb { height: var(--aw-h-sm); gap: 4px; }
.aw-crumb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.aw-crumb-chev { display: inline-flex; flex: none; }
.aw-crumb-chev svg { width: 14px; height: 14px; }
/* اسم المشروع وحده ينكمش حين يضيق الصفّ: ما بعده يقول أين أنت، والاسم كاملٌ في تلميحه */
.aw-crumb-menu { flex: 0 1 auto; min-width: 48px; }
.aw-crumb-menu--here { flex: none; }
.aw-crumbs > h1 { flex: none; }
.aw-crumb-menu--here h1 { color: inherit; }
/* اتّجاه num من اليسار إلى اليمين، فنهايته هي الجهة المواجهة للمسار: 10 منها مع فراغ المسار */
.aw-crumb-count {
    display: inline-flex; align-items: center; justify-content: center; flex: none; height: 20px; margin-inline-end: 6px; padding-inline: 6px;
    font-size: 12px; font-weight: 500; line-height: 1; color: var(--status-blue); background: var(--edge-blue); border-radius: 4px;
}
/* flex لا inline-flex: السطر حول الزرّ داخل details يطيله فيخرج عن محاذاة جيرانه */
.aw-crumbs .aw-menu > summary, .aw-tools .aw-menu > summary { display: flex; }
/* مبدّل عرض المشروع: «البلوكات» و«الدور» كلمتان في مجموعة مبدّل الأشكال نفسها، وكلٌّ رابطٌ إلى صفحته. والكلمات تفرقه عن مبدّل الأشكال بالأيقونات في طرف الصفّ. ولا ينكمش: اسم المشروع قبله هو الذي ينكمش */
.aw-views { display: inline-flex; flex: none; gap: 1px; margin-inline-start: 4px; padding: 2px; background: var(--bg-hover); border-radius: var(--r-control); }
.aw-crumbs a.aw-view {
    display: inline-flex; align-items: center; gap: 6px; height: var(--aw-h-sm); padding-inline: 8px; color: var(--text-secondary); white-space: nowrap;
    border: 1px solid transparent; border-radius: var(--r-btn);
}
.aw-crumbs a.aw-view:hover { color: var(--text-primary); text-decoration: none; }
.aw-crumbs a.aw-view[aria-current="page"] { color: var(--text-primary); background: var(--bg-card); border-color: var(--border-default); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .06); }
.aw-view .aw-crumb-count { margin-inline-end: 0; }
/* الخيار الآخر عددُه بلون اسمه: الأزرق علامة الصفحة الحاليّة وحدها. والحشوة باقية كي لا يتحرّك المبدّل عند التنقّل */
.aw-view:not([aria-current="page"]) .aw-crumb-count { color: inherit; background: none; }
/* المبدّل لا ينكمش، فإن لم يسع المسارَ والأدواتِ سطرٌ واحد نزلت الأدوات إلى سطرها، وإلّا لم يبقَ من اسم المشروع إلّا حرف.
   بلا عرضٍ ثابت: القائمة الجانبيّة مفتوحةً أو مطويّةً وبأيّ عرضٍ تغيّر ما يتبقّى. وفي سطرٍ واحد ارتفاعه 48 كغيره. وفي 640 فأضيق الأدوات في سطرها دائماً (أدناه)، والاسم ينكمش بجانب زرّ القائمة كي لا يصير الصفّ ثلاثة أسطر */
@media screen and (min-width: 641px) {
    header.topbar:has(.aw-views) { flex-wrap: wrap; row-gap: 6px; height: auto; min-height: var(--topbar-h); padding-block: 8px; }
    header.topbar:has(.aw-views) .aw-bar-title { flex-basis: auto; }
}

/* صفوف قائمة المسار: البحث ثابتٌ فوق، وما طال يتمرّر تحته */
.aw-menu-panel.aw-pick-panel { display: flex; flex-direction: column; gap: 4px; width: 221px; padding: 4px; overflow: hidden; font-size: 13px; color: var(--text-primary); }
.aw-pick-search {
    flex: none; width: 100%; height: var(--control-h); padding: 0 8px; font: inherit; font-size: 13px; font-weight: 400; color: var(--text-primary);
    background: transparent; border: 1px solid var(--border-default); border-radius: var(--r-btn);
}
.aw-pick-search::placeholder { color: var(--text-placeholder); }
.aw-pick-rows { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.aw-crumbs a.aw-menu-row { color: var(--text-primary); }
.aw-pick-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-menu-row[aria-current="true"] .aw-menu-tick { display: inline-flex; flex: none; }
.aw-pick-none { margin: 0; padding: 6px 8px; font-size: 12px; font-weight: 400; color: var(--text-tertiary); }

/* أدوات قائمة الدور في الصفّ نفسه: كلّها 28 وبينها 8، وهي هي في كلّ شكلٍ وفي صفحة البلوك. وكذلك أدوات صفحة البلوكات */
.aw-tools, .aw-map-tools { display: flex; align-items: center; gap: 8px; }
/* مبدّل الأشكال: أزرارٌ متلاصقة في مجموعةٍ رماديّة، والنشط أبيض بحدٍّ رفيعٍ وظلٍّ خفيف */
.aw-shapes { display: inline-flex; gap: 1px; padding: 2px; background: var(--bg-hover); border-radius: var(--r-control); }
.aw-shape {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: var(--aw-h-sm); color: var(--text-tertiary);
    border: 1px solid transparent; border-radius: var(--r-btn);
}
.aw-shape:hover { color: var(--text-primary); text-decoration: none; }
.aw-shape svg { width: 16px; height: 16px; }
.aw-shape[aria-current="true"], .aw-shape:has(:checked) { color: var(--text-primary); background: var(--bg-card); border-color: var(--border-default); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .06); }
/* مبدّل صفحة البلوكات: زرّان 28×24 في المجموعة نفسها، كلٌّ label فيه راديو مخفيّ يحمل الحالة والتركيز */
.aw-map-tools .aw-shape { width: var(--control-h); cursor: pointer; }
/* زرّ التصفية أيقونةٌ وحدها، يتلوّن وعليه نقطة ما دامت تصفيةٌ تعمل */
.aw-menu > summary.aw-filter-btn { position: relative; justify-content: center; width: var(--control-h); padding: 0; }
.aw-menu > summary.aw-filter-btn.is-on { color: var(--status-blue); background: var(--edge-blue); border-color: var(--status-blue); }
.aw-filter-btn .aw-menu-dot { position: absolute; top: -3px; inset-inline-end: -3px; }
/* «العرض» و«نظرة عامّة»: نصٌّ وحده، و«نظرة عامّة» مضغوطٌ ما دامت لوحتها مفتوحة */
.btn.aw-tool-text { padding: 0 10px; white-space: nowrap; }
.btn.aw-tool-text[aria-current="true"] { background: var(--bg-hover); }

/* صفّ شارات التصفية: تحت الشريط وعلى هامشه، فلا تذهب مع التمرير */
.aw-subbar { flex: none; padding-block: 8px; background: var(--bg-card); }

/* ---------- الأقسام والبطاقات: حدودٌ بلا ظلال ---------- */
/* الرئيسيّة: الترحيب قسمٌ كغيره، وبين قسمٍ وقسم 48، وبين العنوان ومحتواه 13، والعناوين 14/600. و«نظرة عامّة» لها مسافاتها: .aw-drawer-body > * يصفّر هامش .ws-head فيها */
.aw-greet, .ws-head, .dash-section { margin-bottom: 48px; }
.dash-section:last-child { margin-bottom: 0; }
/* السطران 48: الترحيب 20/600 وتحته الوقت 16/500. وأيقونة الشمس أو القمر 16 */
.aw-greet-hello { margin: 0; font-size: 20px; font-weight: 600; line-height: 24px; }
.aw-greet-now { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 500; line-height: 24px; }
.aw-greet-now .aw-ico { margin: 0; }
.aw-greet-now .aw-ico svg { width: 16px; height: 16px; }
/* المتمرّر تحت الرأس لا خلفه: 12 كافية لما يُقفز إليه */
.dash-section { scroll-margin-top: 12px; }
.items-pager, .imp-stage { scroll-margin-top: 12px; }
.dash-sec-head { align-items: center; margin-bottom: 13px; }
.dash-sec-head h2 { font-size: 14px; font-weight: 600; line-height: var(--aw-h-sm); }
/* إجراء القسم: زرٌّ بإطار 24 زاويته 6 */
.btn.aw-sec-btn { height: var(--aw-h-sm); padding: 0 8px; font-size: 13px; font-weight: 500; white-space: nowrap; border-radius: var(--r-btn); }
/* تقسيم الأرض الإجماليّ: صفوف 400 وبطاقتها معها، فلا يبتعد الاسم عن رقمه ولا تبقى بطاقةٌ عريضة حول قائمةٍ ضيّقة. وتنبيهها داخلها يلتفّ */
.aw-land-card { width: min(426px, 100%); }
.card-pad { padding: 12px; }
.aw-chart--doughnut { height: 180px; }
.aw-page-meta { margin: 0 0 12px; font-size: 12px; color: var(--text-tertiary); }

/* شريط الأرقام: صفٌّ واحدٌ بفواصل، لا أربع بطاقات */
.kpi-strip { gap: 0; border: 1px solid var(--border-default); border-radius: var(--r-card-sm); overflow: hidden; }
.kpi-card { padding: 12px 14px; background: transparent; border: 0; border-radius: 0; box-shadow: none; border-inline-start: 1px solid var(--border-default); }
.kpi-card:first-child { border-inline-start: 0; }
.kpi-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.kpi-num { font-size: 20px; }
/* تلميح المبلغ الكامل على الرقم نفسه: بعرض نصّه، فتتوسّطه الفقاعة، وما حوله تلميح البطاقة */
.kpi-num[data-aw-tip] { width: fit-content; }
/* 12 بدل 11 وسطرهما 20 كما كان: صفّ الأرقام يبقى بطوله 114 (ADR-021) */
.kpi-unit, .kpi-sub { font-size: 12px; line-height: 20px; }
.kpi-sub { margin-top: 2px; }
.kpi-ico { width: 26px; height: 26px; align-self: flex-start; border-radius: var(--r-tile); }
.kpi-ico svg { width: 14px; height: 14px; }
.kpi-ico[data-tone] { background: var(--bg-page); color: var(--text-tertiary); }
.kpi-card--link:hover { background: var(--bg-hover); border-color: var(--border-default); box-shadow: none; }
/* عمودان أو عمودٌ واحد: الفواصل تتبع الصفوف — نفس حدود .kpi-strip في aswar.css */
@media (min-width: 901px) and (max-width: 1019px), (max-width: 860px) {
    .kpi-card:nth-child(odd) { border-inline-start: 0; }
    .kpi-card:nth-child(n+3) { border-top: 1px solid var(--border-default); }
}
@media (max-width: 560px) {
    .kpi-card { border-inline-start: 0; }
    .kpi-card:nth-child(n+2) { border-top: 1px solid var(--border-default); }
}

/* بطاقة المشروع تبقى بطاقة (طلب المالك). ثلاثٌ في السطر بفاصل 32 ما دام الثلث 280 فأكثر، ثمّ اثنتان ثمّ واحدة: عرضها من عرض الشبكة نفسها، فتتبع القائمة الجانبيّة. و65 لا 64: كسر البكسل لا يُسقط الثالثة */
.aw-project-grid { grid-template-columns: repeat(auto-fill, minmax(max(min(280px, 100%), calc((100% - 65px) / 3)), 1fr)); gap: 32px; }
/* كبطاقة البلوك: رابط الاسم ممتدٌّ فوقها كلّها، وما يُنقر وحده فوقه. والمرور تبقى به بيضاء: حدٌّ أغمق وظلٌّ خفيف، بلا حركة */
.aw-project-card { position: relative; gap: 4px; min-width: 0; transition: outline-color var(--aw-ring-t); }
.aw-project-card:is(:hover, :has(.is-ctx-open)) { border-color: var(--border-hover); box-shadow: 0 1px 4px rgba(var(--shadow-rgb), .12); }
@media (prefers-reduced-motion: no-preference) {
    .aw-project-card { transition: border-color .3s, box-shadow .3s, outline-color var(--aw-ring-t); }
    .aw-project-card > .aw-row-more { transition: background-color var(--aw-hover-t), opacity .3s, outline-color var(--aw-ring-t); }
}
.aw-pc-link { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; color: var(--text-primary); }
.aw-pc-link:hover { text-decoration: none; }
.aw-pc-link::after { content: ""; position: absolute; inset: 0; }
/* سطرٌ بعرض البطاقة يُقصّ، وبعرض نصّه لا عرضها: تتوسّط فقاعة التلميح ما يُرى منه. وفوق الامتداد ليصله المؤشّر، وهو في الرابط فنقرته نقرته */
.aw-pc-link b { position: relative; z-index: 1; max-width: 100%; overflow: hidden; font-size: 14px; font-weight: 500; line-height: 21px; white-space: nowrap; text-overflow: ellipsis; }
.aw-pc-date { margin: 0; font-size: 12px; color: var(--text-secondary); }
.aw-pc-rows { margin-top: 8px; }
/* في آخر سطر البلاطة وعلى وسطها: 28 و24 */
.aw-project-card > .aw-row-more { position: absolute; z-index: 1; top: 18px; inset-inline-end: 16px; }
.settings-ico { width: 28px; height: 28px; }
.settings-ico svg { width: 16px; height: 16px; }
.settings-ico[data-tone] { background: var(--bg-page); color: var(--text-secondary); }
.ic-drow { padding: 4px 0; font-size: 12px; border-bottom: 0; }
.aw-land-rows .ic-drow { padding: 5px 0; border-bottom: 1px solid var(--border-subtle); }
.aw-land-rows .ic-drow:last-child { border-bottom: 0; }
.aw-land-rows .ic-drow b { font-weight: 600; }

/* ---------- الأزرار والحقول والجدول: أصغر وأكثف ---------- */
/* هذه الأربعة لصفحتي الدخول والخطأ العامّة وحدهما، وهما خارج السلّم: ما في الإطار بعدها */
.btn { padding: 4px 10px; font-size: 12.5px; }
@media (max-width: 600px) { .btn { padding: 6px 12px; } }
.btn svg { width: 14px; height: 14px; }
.form-control { padding: 5px 8px; font-size: 12.5px; }
/* في الإطار: الزرّ 28 بخطّ 13 وأيقونة 16، والصغير 24 بخطّ 12 وأيقونة 14. :where بلا وزن: كلّ قاعدةٍ لزرٍّ بعينه تغلبها */
:where(.aw-app) .btn { height: var(--control-h); padding: 0 10px; font-size: 13px; }
@media (max-width: 600px) { :where(.aw-app) .btn { padding: 0 12px; } }
:where(.aw-app) .btn svg { width: 16px; height: 16px; }
:where(.aw-app) .btn-sm { height: var(--aw-h-sm); padding: 0 8px; font-size: 12px; }
:where(.aw-app) .btn-sm svg { width: 14px; height: 14px; }
/* ما بقي من aswar.css خارج السلّم، بالمحدِّد نفسه */
.badge, .gsearch-row-body span, .form-hint { font-size: 12px; }
.gsearch-group { font-size: 12px; font-weight: 600; }
.gsearch-empty, .chart-empty, .imp-panel-t { font-size: 13px; }
.aw-app .alert-note .alert-ico svg { width: 16px; height: 16px; }
.form-group label { font-size: 12px; }
.items-pager { padding: 8px 12px; }
.pg-meta { font-size: 12px; }
.pg-btn, .pg-num { font-size: 12px; border-radius: var(--r-btn); }
.pg-btn svg { width: 16px; height: 16px; }

/* ---------- أيقونةٌ تسبق المعلومة (ADR-022): صغيرةٌ رماديّة، داخل السطر فلا تغيّر محاذاة ما حولها ---------- */
.aw-ico {
    display: inline-flex; flex-shrink: 0; vertical-align: -3px; margin-inline-end: 5px; color: var(--text-tertiary);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.aw-ico svg { width: 16px; height: 16px; }
.aw-prop .aw-ico svg { width: 14px; height: 14px; } /* في الشارة 24 */
.aw-ico[data-status="sold"] { color: var(--status-green); }
.aw-ico[data-status="reserved"] { color: var(--aw-lot-reserved-bg); }
.aw-st-tick { stroke: var(--aw-lot-sold-fg); }
/* شارة الحالة: شكلها ثمّ اسمها، واللون من الشارة */
.aw-status { display: inline-flex; align-items: center; gap: 4px; padding-inline: 6px 9px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.aw-status svg { width: 14px; height: 14px; flex-shrink: 0; }
/* حيث الأب flex بمسافةٍ بين عناصره لا هامش */
.aw-crumbs .aw-ico, .aw-sale-box-name .aw-ico, .aw-menu-row .aw-ico, .aw-map-row-link .aw-ico, .aw-map-card-link .aw-ico, .aw-map-count .aw-ico, .aw-bs-title .aw-ico, .aw-bs-item .aw-ico { margin: 0; }
.aw-crumbs .aw-ico { color: inherit; }
.aw-pc-date .aw-ico { margin-inline-end: 4px; }

/* الشاشات الفارغة (_Empty · AswarArt): بلا بطاقة، عمودٌ 400 من بداية السطر في وسط ما يحويها: رسمٌ 160، وبعده بـ24 عنوانٌ 16/600، وبعده بـ8 جملةٌ 13/450، وبعدها بـ16 زرّ 32.
   وحشوتها 16: في نافذةٍ قصيرة لا تلتصق بما فوقها */
.aw-empty { width: min(400px, 100%); margin: auto; padding: 16px 0; text-align: start; }
.aw-empty .ce-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 28px; }
.aw-empty .ce-say { max-width: none; margin: 8px 0 0; font-size: 13px; font-weight: 450; line-height: 20px; }
.aw-empty .ce-act { justify-content: flex-start; }
.aw-empty .btn { height: var(--aw-h-lg); padding: 0 12px; font-size: 14px; font-weight: 500; }
.aw-empty .aw-art { width: 160px; margin: 0 0 24px; }
/* وما يحويها يأخذ المساحة كلّها تحت الصفوف الثابتة، أو ما بقي تحت الترحيب. ولوحة الدار تحمل الشكل نفسه (_HouseMissing) وهي في الحاوية نفسها، فلا تُحسب */
.content-container:has(.aw-empty:not(.aw-panel > *)) { display: flex; flex-direction: column; min-height: 100%; padding-bottom: 0; }
.content-container:has(> .aw-empty:first-child) { padding-top: 0; }
.aw-greet:has(+ .aw-empty) { margin-bottom: 0; }
.content-container > [data-aw-cols]:has(> .aw-empty) { flex: 1; display: flex; flex-direction: column; }
.content-container > .aw-block:has(> .aw-block-list > .aw-empty) { flex: 1; align-items: stretch; }
.aw-block-list:has(> .aw-empty) { display: flex; flex-direction: column; padding-bottom: 0; }
.aw-art { display: block; height: auto; }
.aw-art-edge { stroke: var(--border-hover); }
.aw-art-faint { stroke: var(--border-default); }
.aw-art-dash { stroke-dasharray: 4 4; }
.aw-art-base { fill: var(--bg-page); }
.aw-art-back { fill: var(--bg-card); } /* تحت الدائرة: لونها في الوضع الداكن شفّاف، فلا تظهر الخطوط من خلالها */
.aw-art-tint { fill: var(--blue-50); }
.aw-art-mark { stroke: var(--status-blue); }
.aw-art-flag { fill: var(--status-blue); stroke: var(--status-blue); }

/* ---------- قائمة الدور ---------- */
/* تبدأ مباشرةً تحت الصفّ، إلّا أن تسبقها رسالة نجاح، وكذلك صفحة البلوكات. وما يلصق في المتمرّر: رأس المجموعة في القائمة، ورأس الجدول في الجدول */
.content-container:has(> [data-aw-cols], > .aw-map):not(:has(> .alert)), .content-container:has(.aw-block-list) { padding-top: 0; }
/* القائمتان المنسدلتان: «تصفية» و«العرض» */
.aw-menu { position: relative; }
.aw-menu > summary { display: inline-flex; align-items: center; gap: 6px; height: var(--control-h); list-style: none; cursor: pointer; user-select: none; }
.aw-menu > summary::-webkit-details-marker { display: none; }
.aw-menu[open] > summary { background: var(--bg-hover); }
.aw-menu-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--status-blue); }
.aw-menu-dot[hidden] { display: none; }
.aw-menu-panel {
    position: absolute; z-index: 20; top: calc(100% + 4px); inset-inline-start: 0;
    width: 280px; max-width: calc(100vw - 32px); max-height: min(70vh, 480px); overflow-y: auto; padding: 10px;
    background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--r-card-sm); box-shadow: var(--aw-menu-shadow);
}
.aw-menu--end .aw-menu-panel { inset-inline: auto 0; }
/* قائمةٌ داخل لوحة: صفٌّ 32 يُفتح بالنقر، ولوحته بجانب اللوحة نحو المحتوى وعلى مستوى أعلاها: حاويتها اللوحة لا الصفّ. ولا قصّ في اللوحة فتخرج منها */
.aw-menu-panel.aw-filter-panel, .aw-menu-panel.aw-display-panel { overflow: visible; }
.aw-menu-sub { position: static; }
.aw-menu-sub > .aw-menu-panel { top: -1px; inset-inline: auto calc(100% + 5px); }
.aw-menu > summary.aw-menu-row { display: flex; gap: 8px; height: var(--aw-h-lg); }
.aw-menu-row .aw-ico svg { width: 16px; height: 16px; }
.aw-menu-chev { display: inline-flex; flex: none; color: var(--text-tertiary); }
.aw-menu-chev svg { width: 14px; height: 14px; transform: var(--aw-chev-flip, none); } /* يشير إلى جهة لوحته */
/* لوحة التصفية 221 وقيم كلّ حقلٍ مثلها (.aw-pick-panel): رقم الدار نموذجٌ صغير، وزرّه 28 */
.aw-filter-fields { overflow: visible; }
.aw-filter-key, .aw-filter-fields > li:has(> .aw-filter-key[hidden]) { display: none; }
.aw-filter-no { display: flex; align-items: center; gap: 4px; margin: 0; }
.aw-filter-no .aw-pick-search { flex: 1 1 0; width: auto; min-width: 0; }
.aw-filter-no .btn { flex: none; height: var(--control-h); padding: 0 8px; font-size: 13px; }
/* لوحة العرض 296: الخصائص شاراتٌ، والتجميع والترتيب صفّان يعرضان القيمة الحاليّة ويفتحان خياراتهما جانباً (202). وحدّ الجانبيّة وحشوها 8 طولاً: الترتيب بصفوفه الثمانية وفاصله 273 */
.aw-menu-panel.aw-display-panel { width: 296px; padding: 4px; }
.aw-menu-panel.aw-opts-panel { width: 202px; padding: 3px 4px; }
.aw-menu-now { flex: none; max-width: 60%; overflow: hidden; font-weight: 400; color: var(--text-tertiary); white-space: nowrap; text-overflow: ellipsis; }
.aw-menu-label { margin: 10px 0 4px; font-size: 12px; font-weight: 500; color: var(--text-tertiary); }
.aw-menu-label:first-child { margin-top: 0; }
.aw-display-panel > .aw-menu-label { margin: 4px 8px; }
.aw-display-panel > .aw-col-chips { padding: 0 8px 4px; }
.aw-col-chips { display: flex; flex-wrap: wrap; gap: 4px; }
/* شارة خاصيّةٍ أو عمود: 24 و13 وأقصاها 120. المفعَّلة خلفيّتها أغمق ونصّها داكن، وغيرها أفتح ونصّها رماديّ */
.aw-col-chip {
    max-width: 120px; height: var(--aw-h-sm); padding: 0 8px; overflow: hidden; font: inherit; font-size: 13px; font-weight: 450; line-height: var(--aw-h-sm); white-space: nowrap; text-overflow: ellipsis;
    color: var(--text-tertiary); background: var(--bg-input); border: 0; border-radius: 4px; cursor: pointer;
}
.aw-col-chip[aria-pressed="true"] { color: var(--text-primary); background: var(--border-default); }
.aw-menu-tick { display: none; }
.aw-menu-tick svg { width: 14px; height: 14px; }
/* إظهار الأعمدة والخصائص وإخفاؤها: القائمة تضع أسماء المخفيّة في data-aw-hide */
[data-aw-hide~="block"] [data-aw-col="block"], [data-aw-hide~="area"] [data-aw-col="area"], [data-aw-hide~="type"] [data-aw-col="type"],
[data-aw-hide~="value"] [data-aw-col="value"], [data-aw-hide~="status"] [data-aw-col="status"],
[data-aw-hide~="block"] .aw-prop--block, [data-aw-hide~="area"] .aw-prop--area, [data-aw-hide~="value"] .aw-prop--value, [data-aw-hide~="status"] .aw-prop--status { display: none; }

/* لوح شارات التصفية: مملوءٌ 44 وزاويته 8، يلتفّ إن ضاق ويطول معه. ولا overflow فيه ولا في آبائه: قوائم القيم تخرج منه فوق المحتوى */
.aw-filter-chips { gap: 8px; min-height: 44px; padding: 8px 16px; background: var(--bg-input); border-bottom: 0; border-radius: var(--r-card-sm); }
/* الشارة: أربع قطعٍ في إطارٍ واحد 28 وزاويته 6، بخطّ 13 */
.aw-fchip { display: inline-flex; align-items: stretch; flex: none; max-width: 100%; height: var(--control-h); font-size: 13px; font-weight: 450; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--r-btn); }
.aw-fchip > * + * { border-inline-start: 1px solid var(--border-default); }
.aw-fchip-field, .aw-fchip-op { display: inline-flex; align-items: center; flex: none; white-space: nowrap; }
.aw-fchip-field { gap: 4px; padding-inline: 8px; color: var(--text-secondary); }
.aw-fchip-field .aw-ico { margin: 0; }
.aw-fchip-field .aw-ico svg { width: 16px; height: 16px; }
.aw-fchip-op { padding-inline: 6px; color: var(--text-tertiary); }
.aw-fchip-value { min-width: 0; }
.aw-fchip-value > summary { display: flex; gap: 4px; height: 100%; padding-inline: 8px; white-space: nowrap; }
.aw-fchip-value > summary:hover { background: var(--aw-nav-hover); }
.aw-fchip-value > summary .aw-ico { margin: 0; }
.aw-fchip-value > summary .aw-ico svg { width: 14px; height: 14px; }
/* قيمةٌ طويلة تُقصّ، وكاملةٌ في تلميحها */
.aw-fchip-name { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
/* قيم الحقل تحت القطعة، وطرفها عند آخر الشارة (× 28 وخطّها): تمتدّ إلى جهة أوّل الصفّ فتبقى في النافذة أينما وقعت الشارة */
.aw-fchip-value > .aw-menu-panel { inset-inline: auto calc(-1 * var(--control-h) - 1px); }
.aw-fchip-x {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--control-h); color: var(--text-secondary);
    border-start-end-radius: 5px; border-end-end-radius: 5px;
}
.aw-fchip-x:hover { color: var(--text-primary); background: var(--aw-nav-hover); text-decoration: none; }
.aw-fchip-x svg { width: 14px; height: 14px; }
/* زرّ التصفية بعد آخر شارة: 28×28، ولوحته من طرفه نحو أوّل الصفّ. ومع شارةٍ واحدة الزرّ قريبٌ من أوّل الصفّ، فالقيم إلى الجهة الأخرى */
.aw-fadd > summary { display: flex; justify-content: center; width: var(--control-h); padding: 0; }
.aw-fadd > summary:hover { background: var(--aw-nav-active); }
.aw-fadd > .aw-menu-panel { inset-inline: auto 0; }
.aw-filter-chips:not(:has(.aw-fchip + .aw-fchip)) { --aw-chev-flip: scaleX(-1); }
.aw-filter-chips:not(:has(.aw-fchip + .aw-fchip)) .aw-menu-sub > .aw-menu-panel { inset-inline: calc(100% + 5px) auto; transform-origin: top right; }
/* وقد يلتفّ الزرّ وحده إلى أوّل سطرٍ جديد، فلا تسع النافذة لوحتيه من عنده: لوحته تحت اللوح من أوّله، وقيمها إلى جهة آخره. يقع مع ثلاث شارات تحت 1280 ومع اثنتين تحت 960 */
@media (max-width: 1279px) {
    .aw-filter-chips:has(.aw-fchip:nth-child(3)) { position: relative; --aw-chev-flip: scaleX(-1); }
    .aw-filter-chips:has(.aw-fchip:nth-child(3)) .aw-fadd { position: static; }
    .aw-filter-chips:has(.aw-fchip:nth-child(3)) .aw-fadd > .aw-menu-panel { inset-inline: 16px auto; transform-origin: top right; }
    .aw-filter-chips:has(.aw-fchip:nth-child(3)) .aw-menu-sub > .aw-menu-panel { inset-inline: calc(100% + 5px) auto; transform-origin: top right; }
}
@media (max-width: 959px) {
    .aw-filter-chips { position: relative; --aw-chev-flip: scaleX(-1); }
    .aw-fadd { position: static; }
    .aw-fadd > .aw-menu-panel { inset-inline: 16px auto; }
    .aw-filter-chips .aw-fadd > .aw-menu-panel { transform-origin: top right; }
    .aw-filter-chips .aw-menu-sub > .aw-menu-panel { inset-inline: calc(100% + 5px) auto; transform-origin: top right; }
}
/* «مسح الكلّ» نصٌّ في الطرف البعيد */
.aw-filter-chips .btn-link-clear {
    display: inline-flex; align-items: center; height: var(--control-h); margin-inline-start: auto; padding-inline: 8px; font-size: 13px; font-weight: 500;
    color: var(--text-secondary); text-decoration: none; border-radius: var(--r-btn);
}
.aw-filter-chips .btn-link-clear:hover { background: var(--aw-nav-active); text-decoration: none; }
/* الانتقال بالسابقة والتالية يمرّر القائمة: الدار المفتوحة لا تقف تحت ما يلصق في المتمرّر */
.aw-lot { scroll-margin-top: 12px; }

/* شارات خصائص الدار في القائمة واللوحة: 24 بحدٍّ رفيع بلا تعبئة، ولون الحالة في أيقونتها وحدها */
.aw-prop {
    display: inline-flex; align-items: center; gap: 4px; flex: none; height: var(--aw-h-sm); padding-inline: 8px;
    font-size: 12px; font-weight: 500; line-height: 1; color: var(--text-secondary); white-space: nowrap;
    border: 1px solid var(--border-default); border-radius: 4px;
}
.aw-prop .aw-ico { margin: 0; }
.aw-prop-more { display: none; justify-content: center; min-width: 34px; }

/* زرّ «…» في صفّ الدار وبطاقتها: 24×24، يظهر بالمرور وبتركيز لوحة المفاتيح وما دامت قائمته مفتوحة. واللمس لا مرور فيه فيبقى ظاهراً */
.aw-row-more {
    display: inline-flex; align-items: center; justify-content: center; width: var(--aw-h-sm); height: var(--aw-h-sm); padding: 0;
    color: var(--text-secondary); background: transparent; border: 0; border-radius: var(--r-btn); cursor: pointer; opacity: 0;
}
.aw-row-more:hover { background: var(--aw-nav-active); }
.aw-row-more svg { width: 16px; height: 16px; }
:is(.aw-hrow, .aw-card, .aw-row):is(:hover, :has(:focus-visible), .is-ctx-open) .aw-row-more, :is(.aw-map-card, .aw-project-card):is(:hover, :has(:focus-visible), :has(.is-ctx-open)) .aw-row-more { opacity: 1; }
@media (hover: none) { .aw-row-more { opacity: 1; } }

/* رأس المجموعة: 49 بخلفيّةٍ خفيفة وخطٍّ تحته، لاصقٌ في المتمرّر. والرأس كلّه يطوي بلا سهم (details)، و«كلّ الدور» رأسٌ ثابت بالشكل نفسه */
.aw-hgroup { border-bottom: 0; }
.aw-hgroup > summary, .aw-hgroup-head {
    position: sticky; top: 0; z-index: 3; display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; height: 49px; padding: 0 12px;
    font-size: 13px; background: var(--bg-input); border-bottom: 1px solid var(--border-default);
}
.aw-hgroup > summary:hover { background: var(--border-default); }
.aw-hgroup-key { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.aw-hgroup-key .aw-ico { margin-inline-end: 8px; vertical-align: -3px; }
.aw-hgroup-key .aw-ico svg { width: 16px; height: 16px; }
.aw-hgroup-count { flex: none; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.aw-hgroup-sums { flex: none; white-space: nowrap; }

/* شكل «قائمة»: صفٌّ 48 وخطٌّ 1 بلا بطاقة، والصفّ كلّه رابط، وعرض الشارات متغيّرٌ فلا تصطفّ عموديّاً */
.aw-hlist { container: aw-hlist / inline-size; margin: 0; padding: 0; list-style: none; }
.aw-hrow { position: relative; height: 49px; border-bottom: 1px solid var(--border-default); }
.aw-hrow-link {
    display: flex; align-items: center; gap: 8px; height: 48px; padding-inline: 12px 44px; color: var(--text-primary);
    scroll-margin-block: 57px 12px;
}
.aw-hrow-link:hover { text-decoration: none; }
/* المتصفّح لا يبدأ تحديد نصٍّ داخل رابطٍ إلّا بهذا، مع draggable="false" في الرابط: النصّ يُحدَّد ويُنسخ (excluded #470) */
.aw-hrow-link > *, .aw-card-link > * { user-select: text; }
.aw-hrow:is(:hover, .is-ctx-open) .aw-hrow-link { background: var(--bg-hover); }
/* عرضٌ أدنى لأربعة أرقام: عناوين الصفوف تبدأ من مكانٍ واحد */
.aw-hrow-no { flex: none; min-width: 32px; font-size: 12px; font-weight: 500; color: var(--text-tertiary); text-align: right; }
.aw-hrow-title { flex: 0 1 auto; min-width: 0; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-hrow-props { flex: none; display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.aw-hrow > .aw-row-more { position: absolute; top: 12px; inset-inline-end: 12px; }
/* الطيّ بعرض القائمة لا النافذة: تضيق مع القائمة الجانبيّة وملخّص البلوك. يُطوى الأقلّ أهمّيّةً أوّلاً، ويظهر +n بتلميحٍ فيه ما طوي، والارتفاع لا يتغيّر */
@container aw-hlist (max-width: 639px) {
    .aw-prop--value { display: none; }
    .aw-prop-more--1 { display: inline-flex; }
}
@container aw-hlist (max-width: 519px) {
    .aw-prop--area, .aw-prop-more--1 { display: none; }
    .aw-prop-more--2 { display: inline-flex; }
}
@container aw-hlist (max-width: 429px) {
    .aw-prop--block, .aw-prop-more--2 { display: none; }
    .aw-prop-more--3 { display: inline-flex; }
}
@container aw-hlist (max-width: 369px) {
    .aw-prop--status, .aw-prop-more--3 { display: none; }
    .aw-prop-more--4 { display: inline-flex; }
}
/* الدور بلا بطاقة في الأشكال كلّها، فالترقيم تحتها بخطٍّ لا ببطاقة في الشاشات الصغيرة أيضاً */
@media (max-width: 860px) { .items-pager { margin-bottom: 0; background: transparent; border-width: 1px 0 0; border-color: var(--border-subtle); border-radius: 0; } }

/* شكل «لوحة»: الأعمدة تملأ ما بقي من ارتفاع المحتوى ولكلٍّ تمريره، فالصفحة نفسها لا تتمرّر رأسيّاً. والبطاقة 312 = 336 - حشو العمود 16 - مكان شريطه 8 */
.content-container:has(.aw-board) { display: flex; flex-direction: column; height: 100%; padding-bottom: 8px; }
.content-container:has(.aw-board) > [data-aw-cols] { flex: 1; min-height: 0; display: flex; }
.aw-board { flex: 1; min-width: 0; min-height: 0; display: flex; gap: 16px; padding-top: 8px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
/* 336 كما في Plane، ويضيق إلى 328 فتسع ثلاثة أعمدة هوامش الصفحة الواسعة عند 1440 ولا يُقصّ ثالثها */
.aw-board-col { flex: 1 0 328px; display: flex; flex-direction: column; max-width: min(336px, 100%); min-height: 0; padding: 8px; background: var(--bg-input); border-radius: var(--r-card-sm); }
.aw-board-head { flex: none; display: flex; align-items: center; height: var(--control-h); margin-bottom: 8px; padding-inline: 4px; }
.aw-board-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.aw-board-cards { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.aw-card { position: relative; flex: none; }
.aw-card-link {
    display: flex; flex-direction: column; gap: 4px; padding: 12px; color: var(--text-primary); background: var(--bg-card);
    border: 1px solid var(--border-default); border-radius: var(--r-card-sm); scroll-margin-block: 8px;
}
.aw-card-link:hover { text-decoration: none; }
/* ظلٌّ خفيف بالمرور كما في Plane: البطاقة بيضاء فوق عمودٍ رماديّ، ولا خلفيّة تتغيّر */
.aw-card:is(:hover, .is-ctx-open) .aw-card-link { box-shadow: 0 1px 4px rgba(var(--shadow-rgb), .12); }
.aw-card-no { align-self: flex-start; font-size: 12px; font-weight: 500; color: var(--text-tertiary); }
/* بعرض نصّه لا عرض البطاقة: تتوسّط فقاعة التلميح ما يُرى منه */
.aw-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; align-self: flex-start; max-width: 100%; overflow: hidden; font-size: 14px; font-weight: 500; line-height: 24px; }
.aw-card-props { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.aw-card > .aw-row-more { position: absolute; top: 8px; inset-inline-end: 8px; width: 22px; height: 22px; }

/* شكل «جدول»: رأس 45 وصفوف 44. حدودٌ منفصلة: الحدّ المدمج لا يلصق مع خليّته. والخطّ بجانب عمود الرقم ظلٌّ داخليّ، فحلقة الدار المفتوحة تحلّ محلّه بلا انقطاع */
.aw-htable { container: aw-htable / inline-size; contain: layout; }
.aw-htable-t { border-collapse: separate; border-spacing: 0; }
.aw-htable-t th, .aw-htable-t td { padding: 0 12px; font-size: 13px; }
.aw-htable-t th { z-index: 3; height: 45px; font-weight: 500; color: var(--text-secondary); background: var(--bg-card); border-bottom: 1px solid var(--border-default); }
/* لون المرور والحلقة يقعان على الخلايا، فانتقالهما عليها لا على الصفّ */
.aw-htable-t td { height: 44px; border-bottom: 1px solid var(--border-default); transition: background-color var(--aw-hover-t), box-shadow var(--aw-ring-t); }
.aw-htable-t tbody tr { transition: none; }
.aw-htable-t tbody tr.aw-row:nth-child(even) { background: transparent; } /* لا تناوب: الصفوف بخلفيّةٍ واحدة يفصلها خطّ */
/* رقم الدار في أوّل السطر و«…» في آخره لاصقان عند التمرير الأفقيّ */
.aw-htable-t .aw-td-no, .aw-htable-t .aw-td-more { position: sticky; background: var(--bg-card); }
.aw-htable-t .aw-td-no { inset-inline-start: 0; box-shadow: inset 1px 0 0 var(--border-default); }
.aw-htable-t .aw-td-more { inset-inline-end: 0; width: 48px; min-width: 48px; padding: 0; text-align: center; box-shadow: inset -1px 0 0 var(--border-default); }
.aw-htable-t td.aw-td-no, .aw-htable-t td.aw-td-more { z-index: 1; }
.aw-htable-t th.aw-td-no, .aw-htable-t th.aw-td-more { z-index: 4; }
/* رأس العمود رابطٌ يرتّب: السهم يقول الاتّجاه، وباهتٌ حيث لا ترتيب. واتّجاهه rtl في عمودي الأرقام أيضاً: الأيقونة عن يمين عنوانها كغيرها */
.aw-th-link { display: flex; align-items: center; gap: 4px; height: 44px; color: inherit; direction: rtl; }
.aw-th-link:hover { color: var(--text-primary); text-decoration: none; }
.aw-htable-t th.num .aw-th-link { justify-content: flex-end; }
.aw-th-link .aw-ico { margin: 0; }
.aw-th-link .aw-ico svg { width: 16px; height: 16px; }
.aw-th-arrow { display: inline-flex; flex: none; color: var(--text-placeholder); }
.aw-th-arrow svg { width: 14px; height: 14px; }
th[aria-sort] .aw-th-arrow { color: var(--text-primary); }
/* قائمة الأعمدة: 221 عرضاً. والجدول الضيّق يتمرّر أفقيّاً فيقصّ ما يخرج منه، فهي fixed وحاويتها .aw-htable (contain: layout يجعلها حاويةً لها) فلا تُقصّ */
.aw-td-more .aw-menu > summary { display: flex; justify-content: center; width: var(--control-h); margin-inline: auto; padding: 0; }
.aw-menu-panel.aw-cols-panel { position: fixed; top: 49px; inset-inline: auto 0; width: 221px; font-weight: 400; white-space: normal; text-align: start; }
/* نصّ الدار يُحدَّد ويُنسخ: الخلايا بلا لفّ ولا قصّ إلّا الصنف. نصٌّ عليه تلميح لا يتجاوز عرضه، فتتوسّط الفقاعة ما يُرى منه */
.aw-cell-text { display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
/* الصفّ: المرور يغيّر الخلفيّة وحدها */
.aw-row { cursor: pointer; }
.aw-row:is(:hover, .is-ctx-open) td { background: var(--bg-hover); }
.aw-row-link { scroll-margin-block: 53px 12px; font-weight: 500; color: var(--text-primary); }
.aw-row-link:hover { text-decoration: none; }
/* شارة الحالة كشارات القائمة: حدٌّ رفيع بلا تعبئة، ولونها في أيقونتها */
.aw-htable-t .aw-status { height: var(--aw-h-sm); padding-inline: 8px; font-size: 12px; font-weight: 500; line-height: 1; color: var(--text-secondary); background: transparent; border: 1px solid var(--border-default); border-radius: 4px; }
.aw-htable-t .aw-status svg { width: 14px; height: 14px; color: var(--text-tertiary); }
.aw-htable-t .aw-status.badge-on svg { color: var(--status-green); }
.aw-htable-t .aw-status.badge-warn svg { color: var(--aw-lot-reserved-bg); }
/* كلّما ضاق الجدول قلّ ما في رأسه قبل أن يتمرّر: أيقونات الأعمدة (البلوك عمودٌ زائد في صفحة الدور فتُخفى هناك أبكر)، ثمّ «التخمينيّة»، ثمّ أسهم الأعمدة غير المرتَّب بها */
@container aw-htable (max-width: 779px) { .aw-htable-t:has(th[data-aw-col="block"]) .aw-th-link .aw-ico { display: none; } }
@container aw-htable (max-width: 699px) { .aw-th-link .aw-ico, .aw-th-extra { display: none; } }
@container aw-htable (max-width: 599px) { .aw-htable-t th:not([aria-sort]) .aw-th-arrow { display: none; } }
/* إن اتّسع للجدول كلّه: لا تمرير أفقيّ فيلصق الرأس في أعلى المتمرّر، والصنف يأخذ ما بقي ويُقصّ.
   ورابط الرقم يمتدّ بعرض الجدول فالصفّ كلّه رابطٌ حقيقيّ، والنصوص فوقه تُحدَّد وتُنسخ وتلميحاتها تعمل (excluded #470)؛ فهي تُرفع هنا وحده: عند التمرير الأفقيّ كانت ستمرّ فوق العمود اللاصق. وتحت العتبة النقر على الصفّ بـaswar.js */
@container aw-htable (min-width: 520px) {
    .table-wrap { overflow: visible; }
    .aw-htable-t td[data-aw-col="type"] { width: 100%; max-width: 0; }
    .aw-cell-text { max-width: 100%; }
    .aw-htable-t .aw-td-more { box-shadow: none; }
    .aw-menu-panel.aw-cols-panel { position: absolute; top: calc(100% + 4px); }
    .aw-row-link::after { content: ""; position: absolute; top: 0; bottom: -1px; inset-inline-start: 0; width: 100cqw; }
    .aw-row-link > .num { position: relative; z-index: 1; }
    .aw-htable-t td > span { position: relative; z-index: 2; }
    .aw-htable-t td.aw-td-more { z-index: 2; }
}

/* الدار المفتوحة: علامةٌ واحدة في الأشكال الثلاثة والخريطة، حلقة 2 بلون التمييز والخلفيّة كما هي. وتركيز لوحة المفاتيح بالشكل نفسه.
   والحكم في القائمة واللوحة لـaria-current، فإيّاه يبدّل aswar.js على الرابط */
.aw-hrow-link[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--status-blue); }
.aw-card-link[aria-current="true"], .aw-card:hover .aw-card-link[aria-current="true"], .aw-card.is-ctx-open .aw-card-link[aria-current="true"] { border-color: var(--status-blue); box-shadow: inset 0 0 0 1px var(--status-blue); }
/* في الجدول حلقةٌ من ظلال الخلايا: اللاصق يغطّي ما تحته، والظلّ داخل كلّ خليّة لا يغطّيه شيء */
.aw-row.is-selected td, .aw-row:has(.aw-row-link:focus-visible) td { box-shadow: inset 0 2px 0 var(--status-blue), inset 0 -2px 0 var(--status-blue); }
.aw-row.is-selected td:first-child, .aw-row:has(.aw-row-link:focus-visible) td:first-child { box-shadow: inset 0 2px 0 var(--status-blue), inset 0 -2px 0 var(--status-blue), inset -2px 0 0 var(--status-blue); }
.aw-row.is-selected td:last-child, .aw-row:has(.aw-row-link:focus-visible) td:last-child { box-shadow: inset 0 2px 0 var(--status-blue), inset 0 -2px 0 var(--status-blue), inset 2px 0 0 var(--status-blue); }

/* ---------- قائمة الأصناف والبلوكات: شريطٌ خفيف خلف الاسم وأرقامٌ في أعمدة، لا محاور ---------- */
.aw-rank { --aw-rank-cols: minmax(0, 1fr) 44px 76px; }
.aw-rank--sold { --aw-rank-cols: minmax(0, 1fr) 84px 76px; }
.aw-rank--blocks { --aw-rank-cols: minmax(0, 1fr) 44px; }
.aw-rank--blocks.aw-rank--sold { --aw-rank-cols: minmax(0, 1fr) 84px; }
.aw-rank-head, .aw-rank-row { display: grid; grid-template-columns: var(--aw-rank-cols); align-items: center; gap: 12px; padding: 0 12px; }
.aw-rank-head { min-height: 44px; font-size: 12px; color: var(--text-tertiary); }
.aw-rank-list { margin: 0; padding: 0; list-style: none; }
.aw-rank-list > li { border-top: 1px solid var(--border-subtle); }
.aw-rank-row { min-height: 44px; font-size: 13px; color: var(--text-primary); }
.aw-rank-row:hover { text-decoration: none; background: var(--bg-hover); }
/* الاسم فوق شريطه، ويأخذ ما يتبقّى من العرض: صنفان قد يختلفان في آخر كلماتهما */
.aw-rank-key { position: relative; min-width: 0; display: flex; align-items: center; min-height: 30px; padding: 0 8px; }
.aw-rank-bar { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.aw-rank-fill { fill: var(--aw-rank-fill); transition: fill var(--aw-hover-t); }
.aw-rank-row:hover .aw-rank-fill { fill: var(--border-default); }
.aw-rank-sold { fill: var(--aw-rank-sold); }
.aw-rank-name { position: relative; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* الأرقام إلى اليمين في الاتّجاهين: الآحاد تحت الآحاد والفاصلة تحت الفاصلة */
.aw-rank-num { text-align: right; color: var(--text-secondary); white-space: nowrap; }
.aw-rank-head .aw-rank-num { color: inherit; }
.aw-rank-count { font-weight: 600; color: var(--text-primary); }
/* الكسر: الخطّ المائل في مكانٍ واحد في كلّ الصفوف، فالبسط إلى يمين ما قبله والمقام إلى يسار ما بعده */
.aw-rank-frac { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px; color: var(--text-secondary); white-space: nowrap; }
.aw-rank-frac > b { font-weight: 600; color: var(--text-primary); text-align: right; }
.aw-rank-frac-head { text-align: center; white-space: nowrap; }
@media (max-width: 640px) {
    /* الأعمدة نفسها أضيق، والاسم يلتفّ سطرين لا يُقصّ: صنفان قد يختلفان في آخر كلماتهما. وعمود العدد يسع «1,234» */
    .aw-rank { --aw-rank-cols: minmax(0, 1fr) 36px 48px; }
    .aw-rank--sold { --aw-rank-cols: minmax(0, 1fr) 76px 48px; }
    .aw-rank--blocks { --aw-rank-cols: minmax(0, 1fr) 36px; }
    .aw-rank--blocks.aw-rank--sold { --aw-rank-cols: minmax(0, 1fr) 76px; }
    .aw-rank-frac-head { white-space: normal; }
    .aw-rank-head, .aw-rank-row { gap: 8px; padding: 0 8px; }
    .aw-rank-head { white-space: normal; }
    .aw-rank-head .aw-rank-num { white-space: normal; }
    .aw-rank-row { padding-block: 6px; font-size: 12px; }
    .aw-rank-name { white-space: normal; }
}

/* ---------- تقدّم البيع: كسرٌ وشريطٌ وأعداد، بلا نسبٍ مئويّة (طلب المالك) ---------- */
.aw-progress { display: flex; flex-direction: column; gap: 12px; }
.aw-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.aw-progress-frac { margin: 0; font-size: 13px; color: var(--text-secondary); }
.aw-progress-frac .num { font-size: 20px; font-weight: 600; color: var(--text-tertiary); }
.aw-progress-frac b { font-weight: 700; color: var(--text-primary); }
.aw-progress-value { margin: 0; font-size: 13px; color: var(--text-secondary); }
.aw-progress-value b { font-weight: 600; color: var(--text-primary); }
.aw-salebar {
    display: block; width: 100%; height: 8px; border-radius: 4px; background: var(--bg-hover);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.aw-salebar--thin { height: 4px; border-radius: 2px; margin-bottom: 8px; }
.aw-salebar-part[data-status="sold"] { fill: var(--aw-lot-sold-bg); }
.aw-salebar-part[data-status="reserved"] { fill: var(--aw-lot-reserved-bg); }
.aw-salebar-part[data-status="available"] { fill: var(--aw-lot-available-edge); }
.aw-salebar-part[data-status="unset"] { fill: var(--bg-hover); }
/* الشريط الغليظ: 14 وزاويته 2، أجزاؤه 10 مدوّرةٌ بينها 2 وحوله 2. الحشوة 1 والنصف الآخر من الخطّ حول كلّ جزءٍ بلون أرضيّته، ولا style (CSP) فلا هندسة تُحسب للفراغ */
.aw-salebar--seg { height: 14px; padding: 1px; border-radius: 2px; }
.aw-salebar--seg .aw-salebar-part { rx: 3px; stroke: var(--bg-hover); stroke-width: 2px; }

/* ---------- صفحة البلوك: قائمة دوره، وفي طرف السطر عمود ملخّصه ---------- */
.aw-block { display: grid; grid-template-columns: minmax(0, 1fr) 384px; align-items: start; }
/* لا حشوة تحت في الصفحة: العمود بطول المتمرّر كلّه، فلا يتمرّر لقصر قائمةٍ، وحشوة آخر القائمة لها وحدها */
.content-container:has(> .aw-block) { padding-bottom: 0; }
.aw-block-list { min-width: 0; padding-bottom: var(--content-pad); }
/* اللوحة بجانب الملخّص تملأ ارتفاع المحتوى */
.content-container:has(.aw-block .aw-board) > .aw-block { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
.aw-block-list:has(.aw-board) { display: flex; min-height: 0; padding-bottom: 8px; }
@media (min-width: 1181px) { .aw-block:has(.aw-board) .aw-block-side { align-self: start; } }
/* ارتفاع العمود ما تحت الصفوف الثابتة كلّها، وله تمريره، ومكان شريطه من حشوته: يبقى ما فيه 343 طال أم قصر */
.main:has(.aw-filter-chips) { --aw-subbar-h: 60px; }
.aw-block-side {
    --aw-panel-name-w: 120px; position: sticky; top: 0; min-width: 0;
    height: calc(100dvh - var(--aw-nav-h) - var(--topbar-h) - var(--aw-frame-m) - 2px - var(--aw-subbar-h, 0px));
    padding-block: 0 var(--content-pad); padding-inline: var(--content-pad) calc(var(--content-pad) - var(--aw-scrollbar-w));
    overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: var(--bg-card); border-inline-start: 1px solid var(--border-default);
}
.aw-block-side:focus { outline: none; }
/* زرّ الملخّص: المربّع المخفيّ يحمل الحالة والتركيز، وفوق 1180 المعلَّم مخفيٌّ وعند 1180 فأقلّ المعلَّم مفتوح (× وسمٌ ثانٍ له)، فمعناه يتبدّل بالأنماط وحدها وتلميحه معه */
.aw-sum-hide, .aw-sum-show { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.aw-icon-btn.is-ctx-open { background: var(--aw-nav-hover); }
@media (min-width: 1181px) {
    .main:has(#aw-block-sum:checked) .aw-block { grid-template-columns: minmax(0, 1fr); }
    .main:has(#aw-block-sum:checked) .aw-block-side { display: none; }
    .aw-sum-toggle:has(:checked) .aw-sum-hide, .aw-sum-toggle:not(:has(:checked)) .aw-sum-show { display: none; }
}
/* طبقةٌ 384 فوق القائمة تحت صفوفها الثابتة، وتحت صفّ الأدوات (5) فقوائمه فوقها وتحت لوحة الدار (25)، وأقصاها الإطار */
@media (max-width: 1180px) {
    .aw-block { grid-template-columns: minmax(0, 1fr); }
    .aw-block-side {
        display: none; position: fixed; z-index: 4; top: calc(var(--aw-nav-h) + 1px + var(--topbar-h) + var(--aw-subbar-h, 0px)); bottom: calc(var(--aw-frame-m) + 1px);
        inset-inline-end: calc(var(--aw-frame-m) + 1px); width: min(384px, var(--aw-frame-inner)); height: auto; border: 0; box-shadow: 0 0 0 1px var(--border-default), var(--shadow-lift);
    }
    .main:has(#aw-block-sum:checked) .aw-block-side { display: block; }
    .aw-sum-toggle:has(:checked) .aw-sum-show, .aw-sum-toggle:not(:has(:checked)) .aw-sum-hide { display: none; }
}
/* 1180 فأضيق: المسار بأسماء مشاريعنا والأدوات وزرّا الملخّص و«…» لا يسعها سطرٌ واحد والقائمة الجانبيّة بجانبها، وفي سطرٍ واحد يقلّص اسم المشروع إلى حرف، فالأدوات في سطرها. والطبقة تحت الصفّ بارتفاعه الجديد */
@media screen and (max-width: 1180px) {
    .main:has(.aw-sum-toggle) { --topbar-h: 79px; }
    header.topbar:has(.aw-sum-toggle) { flex-wrap: wrap; row-gap: 6px; padding-block: 8px; }
    header.topbar:has(.aw-sum-toggle) .aw-bar-actions { flex: 0 0 100%; }
}
/* الرأس يلصق في العمود، و«…» و× في طرفه. والخطّ بينه وبين ما تحته خطّ أوّل قسم */
.aw-bs-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 48px; background: var(--bg-card); }
.aw-bs-title { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: 16px; font-weight: 600; }
.aw-bs-title .aw-ico svg { width: 16px; height: 16px; }
.aw-bs-title-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-bs-tools { flex: none; display: flex; align-items: center; gap: 4px; }
/* «التقدّم»: الكسر 20/700 وبجانبه جملته 12، ثمّ الشريط الغليظ، ثمّ الدليل عمودين: كلّ بندٍ 171.5×28 بخطوة 32 */
.aw-bs-progress { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.aw-bs-sold { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.aw-bs-big { font-size: 20px; font-weight: 700; line-height: 24px; }
.aw-bs-say { font-size: 12px; color: var(--text-secondary); }
.aw-bs-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.aw-bs-item, .aw-bs-row { display: flex; align-items: center; gap: 8px; padding-inline: 8px; font-size: 13px; border-radius: var(--r-btn); }
.aw-bs-item:hover, .aw-bs-row:hover { text-decoration: none; background: var(--aw-nav-hover); }
.aw-bs-item { height: var(--control-h); color: var(--text-secondary); }
.aw-bs-item .aw-ico svg { width: 16px; height: 16px; }
.aw-bs-item-name { flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-bs-item b { flex: none; font-weight: 500; color: var(--text-primary); }
/* «التفصيل»: صفوف 32 بلا رؤوس أعمدة: الاسم يأخذ ما بقي ويُقصّ وكاملٌ في تلميحه، فشريطٌ 56×4، فالكسر 36 */
.aw-bs-rows { margin: 4px 0 0; padding: 0; list-style: none; }
.aw-bs-row { height: var(--aw-h-lg); color: var(--text-primary); }
.aw-bs-name { flex: 1 1 0; min-width: 0; white-space: nowrap; }
.aw-bs-name .aw-cell-text { max-width: 100%; }
.aw-bs-row .aw-salebar { flex: none; width: 56px; margin: 0; }
.aw-bs-frac, .aw-bs-count { flex: none; min-width: 36px; font-size: 12px; color: var(--text-secondary); text-align: right; }
/* «الخصائص»: صفوف لوحة الدار نفسها: عمود العناوين 120 والقيمة ملاصقةٌ له، بخطوة 40 */
.aw-block-side .aw-panel-fields dd { min-height: var(--control-h); font-size: 13px; }

/* ---------- صفحة البلوكات: بطاقاتٌ أو صفوف، يختار أيّهما يظهر راديو شريط الصفحة (خارج المحتوى، فمن .main)، والبطاقات مختارةٌ في القالب ---------- */
.aw-map { container: aw-map / inline-size; }
.aw-map-rows, .aw-map-cards { margin: 0; padding: 0; list-style: none; }
.main:has(input[name="aw-map-layout"][value="cards"]:checked) .aw-map-rows { display: none; }
/* الصفّ 52 وخطٌّ 1 بلا بطاقة، وكلّه رابط، والمرور يغيّر الخلفيّة وحدها. و«…» بجانب الرابط لا فيه، ظاهرٌ دائماً */
.aw-map-row { position: relative; height: 53px; border-bottom: 1px solid var(--border-default); }
.aw-map-row-link { display: flex; align-items: center; gap: 8px; height: 52px; padding-inline: 12px 44px; color: var(--text-primary); }
.aw-map-row-link:hover { text-decoration: none; }
.aw-map-row:is(:hover, .is-ctx-open) .aw-map-row-link { background: var(--bg-hover); }
.aw-map-row-link .aw-ico svg, .aw-map-card-link .aw-ico svg { width: 16px; height: 16px; }
.aw-map-title { flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.aw-map-row-end { flex: none; display: flex; align-items: center; gap: 8px; margin-inline-start: auto; font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.aw-map-row-end .num { min-width: 36px; text-align: right; }
.aw-map-row .aw-salebar { flex: none; width: 56px; margin: 0; }
.aw-map-row > .aw-row-more { position: absolute; top: 14px; inset-inline-end: 12px; opacity: 1; }
/* البطاقات: ثلاثٌ في السطر بارتفاعٍ واحد، ثمّ اثنتان ثمّ واحدة كلّما ضاق المحتوى. وتحت خطّ الصفّ فراغ: حدّها لا يلتصق به */
.aw-map-cards { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 24px; padding-top: var(--content-pad); }
.main:has(input[name="aw-map-layout"][value="cards"]:checked) .aw-map-cards { display: grid; }
/* وفوقها رسالة نجاحٍ بعد حفظ مشروعٍ جديد لا خطّ الصفّ: هامش الرسالة يكفي */
.content-container:has(> .alert) .aw-map-cards { padding-top: 0; }
@container aw-map (max-width: 887px) { .aw-map-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container aw-map (max-width: 583px) { .aw-map-cards { grid-template-columns: minmax(0, 1fr); } }
/* البطاقة كلّها رابط: رابط العنوان ممتدٌّ فوقها، والمرور ظلٌّ خفيف. وما يُنقر وحده فوقه: مربّعات الدور و«…»، وما بين المربّعات يصل إلى الرابط */
.aw-map-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--border-default); border-radius: var(--r-card-sm); transition: box-shadow var(--aw-hover-t), outline-color var(--aw-ring-t); }
.aw-map-card:is(:hover, :has(.is-ctx-open)) { box-shadow: 0 1px 4px rgba(var(--shadow-rgb), .12); }
.aw-map-card-link { display: flex; align-items: center; gap: 8px; padding-inline-end: var(--control-h); font-size: 14px; font-weight: 500; line-height: var(--aw-h-sm); color: var(--text-primary); }
.aw-map-card-link:hover { text-decoration: none; }
.aw-map-card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.aw-map-card-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aw-map-count { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; color: var(--text-secondary); }
.aw-map-card .aw-lots { position: relative; z-index: 1; pointer-events: none; }
.aw-map-card .aw-lot { pointer-events: auto; }
.aw-map-card > .aw-row-more { position: absolute; z-index: 1; top: 16px; inset-inline-end: 16px; }
/* السطر الباهت تحت البلوكات، وعلى حدّ نصّ الصفوف */
.aw-map + .aw-page-meta { margin-block: 12px 0; padding-inline: 12px; }
.aw-lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 3px; }
.aw-lot {
    display: flex; align-items: center; justify-content: center; height: 24px; overflow: hidden; font-size: 12px;
    border: 1px dashed var(--border-default); border-radius: 3px; background: transparent; color: var(--aw-lot-unset-fg);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.aw-lot:hover { text-decoration: none; background: var(--bg-hover); }
.aw-lot[data-status="sold"] {
    background: var(--aw-lot-sold-bg); border: 1px solid var(--aw-lot-sold-bg); color: var(--aw-lot-sold-fg);
}
.aw-lot[data-status="reserved"] {
    background: var(--aw-lot-reserved-bg); border: 1px solid var(--aw-lot-reserved-edge); color: var(--aw-lot-reserved-fg);
}
.aw-lot[data-status="available"] {
    background: var(--aw-lot-available-bg); border: 1px solid var(--aw-lot-available-edge); color: var(--aw-lot-available-fg);
}
.aw-lot[data-status="sold"]:hover { background: var(--aw-lot-sold-hover); }
.aw-lot[data-status="reserved"]:hover { background: var(--aw-lot-reserved-hover); }
.aw-lot[data-status="available"]:hover { background: var(--bg-hover); }
/* حول المربّع لا داخله: حلقةٌ زرقاء داخل الأخضر الغامق لا تُقرأ */
.aw-lot.is-selected { outline: 2px solid var(--status-blue); outline-offset: 1px; }

/* ---------- اللوحتان فوق القائمة: لوحة الدار ونظرة عامّة، بهندسةٍ واحدة ---------- */
/* 1024 في نهاية السطر (يسار العربيّة) داخل حدود الإطار، من تحت الشريط العامّ إلى أسفله. الزاوية 4 حيث تطلّ على القائمة، و7 حيث تقع في زاوية الإطار فتتبع منحناه.
   وحلقة الحدّ ظلٌّ لا يأخذ من عرضها: على جهة الإطار تقع فوق حدّه */
.aw-panel, .aw-drawer {
    position: fixed; top: calc(var(--aw-nav-h) + 1px); bottom: calc(var(--aw-frame-m) + 1px); inset-inline-end: calc(var(--aw-frame-m) + 1px);
    width: min(var(--aw-panel-w), var(--aw-frame-inner)); background: var(--bg-card);
    border-radius: 4px; border-start-end-radius: 7px; border-end-end-radius: 7px; box-shadow: 0 0 0 1px var(--border-default), var(--shadow-lift);
}

/* ---------- لوحة الدار: لا يبقى خلفها من القائمة إلّا أوّل الصفّ ---------- */
/* وتحت الشريط العامّ (40): نتائج البحث تُرسم فوقها، وفوق القوائم المنسدلة (20). وهي المتمرّر كلّه ورأسها لاصقٌ فيه، ومكان شريطها محجوز فلا يقفز ما فيها حين يطول (aswar.js يقرأ scrollHeight منها) */
.aw-panel { --aw-panel-pad: 32px; --aw-panel-name-w: min(293px, 40%); z-index: 25; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.aw-panel[hidden] { display: none; }
.aw-panel:focus { outline: none; }
/* دارٌ غير موجودة (_HouseMissing): شكل الشاشة الفارغة في وسط اللوحة، وحشوتها حوله */
.aw-panel:has(> .aw-empty) { display: flex; flex-direction: column; }
.aw-panel > .aw-empty { width: min(400px, 100% - 2 * var(--aw-panel-pad)); }
/* الرأس أزرارٌ وحدها: 60 بلا خطّ، والجسم يتمرّر تحته. الإغلاق والطريقة جهة القائمة، والسهمان و«…» في الطرف. وآخره يحسب مكان الشريط: 16 من حافّة اللوحة */
.aw-panel-head {
    position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    height: 60px; padding-inline: 16px calc(16px - var(--aw-scrollbar-w)); background: var(--bg-card);
}
.aw-panel-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.aw-panel-tool {
    display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0;
    color: var(--text-secondary); background: transparent; border: 0; border-radius: var(--r-btn); cursor: pointer;
}
.aw-panel-tool:hover { color: var(--text-primary); background: var(--bg-hover); text-decoration: none; }
.aw-panel-tool svg { width: 16px; height: 16px; }
.aw-panel-tool.is-ctx-open { color: var(--text-primary); background: var(--bg-hover); }
/* زرّ الطريقة يرسم الطريقة الحاليّة، وقائمتها 204 وسطورها 194×32. والراديو مخفيٌّ في سطره، ومنه تقرأ الصحّ والرسم وشكل اللوحة كلّها. flex: السطر حول الزرّ داخل details يطيله */
.aw-panel-mode > summary { display: flex; }
.aw-panel-mode-now { display: none; }
.aw-panel:has(input[value="side"]:checked) .aw-panel-mode-now--side,
.aw-panel:has(input[value="window"]:checked) .aw-panel-mode-now--window,
.aw-panel:has(input[value="full"]:checked) .aw-panel-mode-now--full { display: flex; }
.aw-menu-panel.aw-panel-mode-menu { width: 204px; padding: 4px; }
.aw-panel-mode-menu .aw-menu-row:has(:checked) .aw-menu-tick { display: inline-flex; flex: none; }

/* الجسم من فوق: الرقم · العنوان · صفّ الخصائص · «الخصائص» ومجموعاتها. 32 من كلّ جهة، ومكان الشريط وراءها في آخر السطر */
.aw-panel-body { padding: var(--aw-panel-pad); }
.aw-panel-no { margin: 0 0 23px; font-size: 12px; font-weight: 500; line-height: 14px; color: var(--text-tertiary); }
.aw-panel-title { margin: 0 0 15px; font-size: 20px; font-weight: 600; line-height: 28px; }
.aw-panel-title:focus { outline: none; }
/* صفّ الخصائص: خاناتٌ 183×32 بلا أسماء حقولها، بينها فاصلٌ رفيع. يلتفّ إذا ضاق، ولا يُقصّ غير الصنف. والقصّ على الصفّ يُخفي فاصل أوّل كلّ سطر، وهامشه يضع أيقونة أوّل خانة تحت حرف العنوان */
.aw-panel-quick { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-block-end: 32px; margin-inline-start: -8px; overflow: clip; }
.aw-panel-cell {
    position: relative; display: flex; align-items: center; gap: 8px; flex: none; min-width: 183px; height: var(--aw-h-lg); padding-inline: 8px;
    font-size: 14px; font-weight: 450; color: var(--text-primary); white-space: nowrap; border-radius: var(--r-btn); transition: background var(--aw-hover-t);
}
.aw-panel-cell::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: -5px; width: 1px; background: var(--border-default); }
.aw-panel-cell:hover, .aw-panel-fields dd:hover, .aw-panel-chip:hover { text-decoration: none; background: var(--aw-nav-hover); }
.aw-panel-cell--type { flex: 0 1 183px; min-width: 0; }
.aw-panel-cell--type .aw-cell-text { min-width: 0; }
.aw-panel-val { display: inline-flex; align-items: center; gap: 8px; }
.aw-panel-cell .aw-ico, .aw-panel-fields .aw-ico, .aw-panel-chip .aw-ico { margin: 0; }
.aw-panel-cell .aw-ico svg, .aw-panel-fields .aw-ico svg { width: 16px; height: 16px; }
.aw-panel-props-title { margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 20px; }
/* مجموعةٌ تُطوى (details، ولا يُحفظ طيّها): رأس 24 بخطّ 12/600 وسهمٌ بجانبه، وخطٌّ بين مجموعةٍ ومجموعة */
.aw-panel-group { padding-block: 12px; border-top: 1px solid var(--border-default); }
.aw-panel-props-title + .aw-panel-group { padding-top: 0; border-top: 0; }
.aw-panel-group > summary {
    display: flex; align-items: center; gap: 4px; height: var(--aw-h-sm); font-size: 12px; font-weight: 600; color: var(--text-secondary); list-style: none;
    cursor: pointer; user-select: none; border-radius: 4px;
}
.aw-panel-group > summary::-webkit-details-marker { display: none; }
.aw-panel-group > summary:hover { color: var(--text-primary); }
.aw-panel-chev { display: inline-flex; flex: none; color: var(--text-tertiary); }
.aw-panel-chev svg { width: 14px; height: 14px; }
.aw-panel-group:not([open]) .aw-panel-chev svg { transform: rotate(90deg); }
/* صفوف الخصائص: عمودان ثابتان، فتبدأ القيم كلّها من خطٍّ واحد، 293 من بداية الاسم. كلّ صفٍّ 40 بلا خطوط، وصندوق القيمة 32 وخلفيّته بالمرور */
.aw-panel-fields { margin: 4px 0 0; }
.aw-panel-fields > div { display: grid; grid-template-columns: var(--aw-panel-name-w) minmax(0, 1fr); align-items: center; min-height: 40px; }
.aw-panel-fields dt { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 450; color: var(--text-secondary); }
.aw-panel-fields dd {
    display: flex; align-items: center; min-width: 0; min-height: var(--aw-h-lg); margin: 0; padding-inline: 8px; font-size: 14px; font-weight: 450; color: var(--text-primary);
    overflow-wrap: anywhere; border-radius: var(--r-btn); transition: background var(--aw-hover-t);
}
.aw-panel-fields dd.aw-panel-none { color: var(--text-tertiary); }
/* البلوك والصنف شارتان، رابطان كما كانا، بلا سهم: لا تفتحان قائمة. والأيقونة 14، ونقطة الصنف 8 في 14 */
.aw-panel-chip {
    display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: var(--aw-h-sm); padding-inline: 8px; font-size: 13px; font-weight: 500; line-height: 18px; color: var(--text-primary);
    border: 1px solid var(--border-default); border-radius: 4px;
}
.aw-panel-fields .aw-panel-chip .aw-ico svg { width: 14px; height: 14px; }
.aw-panel-dot { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 14px; height: 14px; }
.aw-panel-dot::before { content: ""; width: 8px; height: 8px; background: var(--text-tertiary); border-radius: 50%; }
/* مجموعة البلوك: الكسر والشريط ومربّعات دوره */
.aw-panel-group--block > summary { margin-bottom: 8px; }
.aw-panel-frac { margin: 0 0 4px; font-size: 12px; color: var(--text-secondary); }

/* طريقتا النافذة وملء الشاشة: فوق 900 وحدها، فدونها ملء النافذة فوق الشريط العامّ (aswar.js يبني على أنّها تغطّي البحث) */
@media (min-width: 901px) {
    /* في وسط الشاشة 1185×708 بلا تعتيمٍ خلفها، وأقصاها الإطار */
    .aw-panel:has(input[value="window"]:checked) {
        top: max(calc(var(--aw-nav-h) + 1px), calc((100dvh - 708px) / 2));
        bottom: max(calc(var(--aw-frame-m) + 1px), calc((100dvh - 708px) / 2));
        inset-inline-end: max(calc(var(--aw-frame-m) + 1px), calc((100vw - 1185px) / 2));
        width: min(1185px, var(--aw-frame-inner)); border-radius: 4px;
    }
    /* تملأ الإطار بعمودين: المحتوى والبلوك لأنّ مربّعاته تحتاج العرض، وعمود الخصائص 315 ملاصقٌ لطرفها وخطّه من أعلى الجسم إلى أسفله */
    .aw-panel:has(input[value="full"]:checked) { width: var(--aw-frame-inner); border-radius: 7px; }
    .aw-panel:has(input[value="full"]:checked) .aw-panel-body {
        display: grid; grid-template-columns: minmax(0, 1fr) 315px; grid-template-rows: auto auto auto 1fr; column-gap: var(--aw-panel-pad);
        min-height: calc(100% - 60px); padding-inline-end: 0;
    }
    .aw-panel:has(input[value="full"]:checked) .aw-panel-body > * { grid-column: 1; min-width: 0; }
    .aw-panel:has(input[value="full"]:checked) .aw-panel-body > .aw-panel-props {
        --aw-panel-name-w: 128px; grid-column: 2; grid-row: 1 / -1; margin-block: calc(-1 * var(--aw-panel-pad)); padding: var(--aw-panel-pad) 16px; border-inline-start: 1px solid var(--border-default);
    }
    .aw-panel:has(input[value="full"]:checked) .aw-panel-group--block { padding-block: 0; border-top: 0; }
}
/* تبديل الطريقة يتحرّك 300 ملّي ثانية: حجماً وموضعاً */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
    .aw-panel { transition: top 300ms ease, bottom 300ms ease, inset-inline-end 300ms ease, width 300ms ease; }
}

/* ---------- نظرة عامّة: لوحةٌ فوق الدور، والقائمة ظاهرةٌ بجانبها. ولا يجمعها بلوحة الدار غير هندستها ---------- */
/* فوق لوحة الدار (25) وتحت الشريط العامّ (40). والرابط الشفّاف تحتها بسعة الإطار: النقر خارجها يغلقها */
.aw-drawer-back { position: fixed; z-index: 26; top: calc(var(--aw-nav-h) + 1px); bottom: calc(var(--aw-frame-m) + 1px); inset-inline: calc(var(--aw-frame-m) + 1px); cursor: default; }
.aw-drawer { --aw-drawer-pad: 24px; z-index: 27; display: flex; flex-direction: column; overflow: hidden; }
.aw-drawer:has(.aw-drawer-wide :checked) { width: var(--aw-frame-inner); border-radius: 7px; }
/* الرأس 60 ثابتٌ والجسم تحته يتمرّر وحده */
.aw-drawer-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 60px; padding-inline: var(--aw-drawer-pad) 16px; border-bottom: 1px solid var(--border-default); }
.aw-drawer-title { min-width: 0; margin: 0; overflow: hidden; font-size: 16px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.aw-drawer-tools { flex: none; display: flex; align-items: center; gap: 8px; }
/* زرّ التكبير: label بشكل الزرّ، ومربّعه المخفيّ يحمل الحالة والتركيز */
.aw-drawer-wide:has(:checked) { background: var(--aw-nav-active); }
/* مكان الشريط من الحشوة: يبقى المحتوى 976 طال أم قصر */
.aw-drawer-body {
    flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 56px; padding-block: 24px 32px; padding-inline: var(--aw-drawer-pad) calc(var(--aw-drawer-pad) - var(--aw-scrollbar-w));
    overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
}
.aw-drawer-body:focus { outline: none; }
.aw-drawer-body > * { flex: none; min-width: 0; margin-block: 0; }
.aw-drawer h3 { margin: 0; font-size: 16px; font-weight: 500; }
.aw-drawer-sub { margin: 0; font-size: 13px; color: var(--text-secondary); }
.aw-drawer-sec { scroll-margin-top: 24px; } /* رقم «مساحة الأرض» يقفز إلى قسمها، فيبقى عنوانها على مسافة الجسم من رأسها */
.aw-drawer-sec > h3 { margin-bottom: 24px; }
.aw-drawer-sec > .aw-drawer-sub:not(:last-child) { margin-bottom: 12px; }
/* تقدّم البيع بلا بطاقة، والحالات تحته صناديق 154×72 كلٌّ رابطٌ إلى دورها */
.aw-sale-boxes { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.aw-sale-box {
    display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 154px; height: 72px; padding-inline: 12px;
    color: var(--text-primary); border: 1px solid var(--border-default); border-radius: 12px;
}
.aw-sale-box:hover { text-decoration: none; background: var(--aw-nav-hover); }
.aw-sale-box-name { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.aw-sale-box > .num { align-self: flex-start; font-size: 16px; font-weight: 600; line-height: 24px; }
/* مربّع اللون بألوان شريط الحالات نفسها */
.aw-sw[data-status] { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.aw-sw[data-status="sold"] { background: var(--aw-lot-sold-bg); }
.aw-sw[data-status="reserved"] { background: var(--aw-lot-reserved-bg); }
.aw-sw[data-status="available"] { background: var(--aw-lot-available-edge); }
.aw-sw[data-status="unset"] { background: var(--bg-hover); }
/* صندوقان متجاوران 398×162 في أضيقهما، وعمودٌ واحد حين لا يسعان. الحشو 24 من ثلاث جهات وصفر من أوّل السطر، والصفوف فيها مسافتها: الأسماء والعنوان على خطٍّ واحد 24 من الحافّة */
.aw-drawer-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(398px, 100%), 1fr)); gap: 20px; }
.aw-drawer-box { min-width: 0; min-height: 162px; padding-block: 24px; padding-inline: 0 24px; border: 1px solid var(--border-default); border-radius: 12px; }
.aw-drawer-box > h3, .aw-drawer-box > .aw-drawer-sub { padding-inline-start: 24px; }
.aw-drawer-box > .aw-drawer-sub { margin-block: 4px 8px; }
.aw-drawer-box .aw-rank-head { min-height: var(--aw-h-sm); padding-inline: 24px 0; font-size: 12px; }
.aw-drawer-box .aw-rank-list > li { border-top: 0; }
.aw-drawer-box .aw-rank-row { min-height: var(--aw-h-lg); margin-inline: 8px -16px; padding-inline: 8px 16px; font-size: 13px; border-radius: var(--r-btn); }
.aw-drawer-box .aw-rank-key { min-height: var(--aw-h-sm); }
.aw-drawer-none { padding-inline-start: 24px; font-size: 13px; color: var(--text-tertiary); text-align: center; }
.aw-drawer-none .aw-art { width: 80px; margin: 0 auto 8px; }
.aw-drawer-none p { margin: 0; }
/* جدول البلوكات: إطار 1 وزاوية 8، رأس 44 بخلفيّةٍ خفيفة، وصفوف 44 الخطّ بينها داخلها فلا يطيلها، والصفّ كلّه رابط */
.aw-drawer-table { overflow: hidden; border: 1px solid var(--border-default); border-radius: var(--r-card-sm); }
.aw-drawer-table .aw-rank-head { min-height: 44px; font-size: 12px; font-weight: 600; color: var(--text-secondary); background: var(--bg-input); }
.aw-drawer-table .aw-rank-list > li { border-top: 0; }
.aw-drawer-table .aw-rank-row { min-height: 44px; font-size: 13px; box-shadow: inset 0 1px 0 var(--border-default); }
.aw-drawer-table .aw-rank-key { min-height: 0; padding: 0; }
/* تقسيم الأرض على أرضيّة اللوحة بلا بطاقة */
.aw-drawer-sec .aw-land-rows .ic-drow { font-size: 13px; }
/* لا فرق بعد هذا العرض بينها وبين الإطار: لا تكبير، وزواياها زوايا الإطار */
@media (max-width: 1042px) {
    .aw-drawer, .aw-panel { border-radius: 7px; }
    .aw-drawer-wide { display: none; }
}
@media (max-width: 640px) {
    .aw-drawer { --aw-drawer-pad: 16px; }
    .aw-panel { --aw-panel-pad: 16px; }
    /* خانتان في السطر، وما طال منهما يأخذ سطره ولا يُقصّ */
    .aw-panel-cell { flex: 1 0 calc(50% - 4px); min-width: auto; }
    .aw-panel-cell--type { flex: 1 1 calc(50% - 4px); min-width: 0; }
}

/* ---------- مشروع جديد: شكل النافذة في Plane، والصفحة صفحتها ---------- */
/* الطبقة خلفها تغطّي الشريط العامّ والقائمة (40 و30) بلون خلفيّة .aw-dialog، ولا فعل لها. والنافذة 800 في وسط الشاشة وأعلاها 80: رأسها وذيلها ثابتان، وجسمها وحده يتمرّر */
.aw-cw-back { position: fixed; z-index: 80; inset: 0; background: rgba(var(--shadow-rgb), .35); }
.aw-cw {
    position: fixed; z-index: 81; top: 80px; inset-inline: 0; display: flex; flex-direction: column; width: min(800px, calc(100vw - 32px)); max-height: calc(100dvh - 160px); margin-inline: auto; overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border-default); border-radius: 12px; box-shadow: var(--shadow-lift);
}
.aw-cw-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); }
.aw-cw-title { margin: 0; font-size: 16px; font-weight: 500; line-height: var(--aw-h-sm); }
.aw-cw-head .aw-mini-btn { color: var(--text-secondary); }
/* في الخطوة الأولى النموذج نفسه عمودٌ فيه الجسم والذيل، وفي المراجعة نموذج الحفظ هو الذيل. ومكان الشريط من الحشوة: لا يقفز ما في الجسم حين يطول */
.aw-cw-form { flex: 0 1 auto; display: flex; flex-direction: column; min-height: 0; }
.aw-cw-body { position: relative; flex: 0 1 auto; min-height: 0; padding-block: 16px; padding-inline: 16px calc(16px - var(--aw-scrollbar-w)); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.aw-cw-body:focus { outline: none; }
.aw-cw-foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border-default); }
.aw-cw-foot .btn { height: var(--control-h); padding: 0 10px; font-size: 13px; font-weight: 500; white-space: nowrap; }
/* الخطوات الثلاث كما هي، أضيق */
.imp-stages { margin: 0; }
.imp-stage { padding: 12px 0; }
.imp-stage:first-child { padding-top: 0; }
.imp-stage:last-child { padding-bottom: 0; }
.imp-stage-head { gap: 8px; margin-bottom: 8px; }
.imp-stage-title, .imp-stage-ghost-title { font-size: 14px; letter-spacing: 0; line-height: 20px; }
.imp-stage-lede, .imp-stage-sum { margin: 0; font-size: 12px; line-height: 18px; }
.imp-stage-lede { max-width: none; }
.imp-stage-body { padding-inline-start: 36px; }
.imp-acts { margin-bottom: 8px; }
/* خانة الملفّ 147: سطور الخطوة صارت بارتفاعها في السلّم، وهي تحفظ للنافذة ارتفاعها 671 */
.imp-drop { gap: 4px; min-height: 147px; padding: 12px 16px; }
.imp-drop-ico { margin: 0; }
.imp-drop-ico svg { width: var(--aw-h-sm); height: var(--aw-h-sm); }
.imp-drop b { font-size: 13px; }
.imp-drop-hint { font-size: 12px; }
.imp-drop-btn { margin: 0; }
/* الأسماء داخل الحقول وعناوينها لقارئ الشاشة وحده: 32 وخطّ 14، والاسم 560، وستّة حقول المساحة 3×2 ما اتّسعت النافذة. واتّجاه .num يساريّ، فاسم الحقل الفارغ باتّجاه الصفحة */
.aw-cw .form-control { height: var(--aw-h-lg); padding: 0 8px; font-size: 14px; font-weight: 450; }
.aw-cw .form-control:placeholder-shown { direction: rtl; }
.aw-cw-name { margin-bottom: 8px; }
.aw-cw-name .form-control { max-width: 560px; }
.aw-cw .inv-grid { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 8px; }
.aw-cw .aw-landsum { margin-top: 8px; padding: 6px 10px; font-size: 12px; line-height: 20px; }
/* الشاشة الضيّقة أو القصيرة: هوامشها 8 */
@media (max-width: 640px), (max-height: 600px) { .aw-cw { top: 8px; max-height: calc(100dvh - 16px); } }
@media (max-width: 640px) {
    .aw-cw { width: calc(100vw - 16px); }
    .aw-cw-body { padding-inline: 12px calc(12px - var(--aw-scrollbar-w)); }
    .imp-stage-body { padding-inline-start: 0; }
}

/* ---------- الشاشات الصغيرة: القائمة الجانبيّة نفسها طبقةً فوق المحتوى، تُفتح من زرّ الرأس ---------- */
@media (max-width: 900px) {
    /* العرض المحفوظ من شاشةٍ أوسع لا يُخرج زرّ الإغلاق عن النافذة: يبقى بجانبها من الإطار 48، وعليها تقع النقرة التي تغلقها */
    :root { --aw-side-now: min(var(--aw-side-w), calc(100vw - 2 * var(--aw-frame-m) - 2px - 48px)); }
    header.topbar, .aw-subbar { --aw-row-pad: 12px; }
    .content-container { padding-block: 14px; }
    .sidebar { display: flex; position: absolute; inset-block: 0; inset-inline-start: 0; z-index: 30; box-shadow: var(--shadow-lift); transform: translateX(100%); visibility: hidden; }
    html[data-aw-overlay="open"] .sidebar { transform: none; visibility: visible; }
    /* لوحة الدار هنا ملء الشاشة (85): القائمة تطفو فوقها، وإلّا فُتحت خلفها بلا أن تُرى وأخذت التركيز. وفي غيرها تبقى تحت الشريط العامّ وقوائمه */
    html[data-aw-overlay="open"]:has(.aw-panel:not([hidden])) .sidebar { z-index: 90; }
    .aw-side-open { display: inline-flex; }
    .aw-side-resize { display: none; }
    /* اللوحة ملء الشاشة فوق الشريط العامّ، فلا طريقة عرضٍ تُختار */
    .aw-panel { z-index: 85; inset: 0; width: 100%; border-radius: 0; }
    .aw-panel-mode { display: none; }
    /* قيم الشارة: طرفها أبعد 40 عن آخر الشارة، فتسع النافذة شارةً في أوّل السطر وشارةً في آخره */
    .aw-fchip-value > .aw-menu-panel { inset-inline: auto calc(-1 * var(--control-h) - 41px); }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 900px) { .sidebar { transition: transform 300ms ease, visibility 300ms; } }
/* لمسٌ: الشريط يطفو فوق المحتوى ولا يأخذ مكاناً، فلا يُحسب في هامش الصفّين */
@media (pointer: coarse) { :root { --aw-scrollbar-w: 0px; } }
@media (max-width: 640px) {
    .aw-topnav { grid-template-columns: auto minmax(0, 1fr) auto; }
    .aw-brand .sidebar-brand-name { display: none; }
    .gsearch { width: 100%; }
    .gsearch-panel { position: fixed; inset-inline: var(--aw-frame-m); top: calc(var(--aw-nav-h) + 2px); width: auto; min-width: 0; max-width: none; }
    /* أدوات القائمة لا تسع سطر المسار: سطرٌ لكلٍّ منهما. وقوائمها تُفتح من طرف سطرها لا من زرّها، فلا تخرج من النافذة */
    header.topbar:has(.aw-tools, .aw-map-tools) { flex-wrap: wrap; row-gap: 6px; height: auto; padding-block: 8px; }
    header.topbar:has(.aw-tools, .aw-map-tools) .aw-bar-actions { flex: 0 0 100%; }
    /* صفحة البلوك: زرّا الملخّص و«…» في سطر الأدوات بمسافةٍ أضيق، وفي الأضيق يلتفّان. وقوائم الأدوات تُفتح من طرف السطر كلّه كما في غيرها */
    header.topbar:has(.aw-sum-toggle) .aw-bar-actions { position: relative; flex-wrap: wrap; gap: 6px 4px; }
    header.topbar:has(.aw-sum-toggle) .aw-tools { position: static; gap: 4px; }
    header.topbar:has(.aw-sum-toggle) .btn.aw-tool-text { padding-inline: 8px; }
    /* الصفّ هنا يطول بما فيه: طبقة الملخّص تغطّيه من تحت الشريط العامّ، و× يغلقها */
    .aw-block-side { z-index: 24; top: calc(var(--aw-nav-h) + 1px); }
    .aw-crumbs, .aw-tools { position: relative; }
    .aw-crumbs .aw-menu, .aw-tools .aw-menu { position: static; }
    .aw-crumbs .aw-menu-panel { inset-inline: 0 auto; }
    .aw-tools .aw-menu-panel { inset-inline: 0; width: auto; max-width: none; }
    /* لا مكان لقائمةٍ بجانب لوحة: قيم الحقل تحت صفّها داخل اللوحة بخطٍّ عموديّ، واللوحة هي التي تتمرّر */
    .aw-menu-panel.aw-filter-panel, .aw-menu-panel.aw-display-panel { overflow-y: auto; }
    .aw-menu-sub > .aw-menu-panel {
        position: static; width: auto; max-width: none; max-height: none; margin-block: 4px; margin-inline-start: 15px; padding: 0; padding-inline-start: 8px; overflow: visible;
        background: transparent; border: 0; border-inline-start: 1px solid var(--border-default); border-radius: 0; box-shadow: none;
    }
    .aw-menu-sub > .aw-menu-panel .aw-pick-rows { overflow: visible; }
    .aw-menu-chev svg { transform: rotate(90deg); }
    .aw-fchip-name { max-width: 100px; }
    /* رأس المجموعة سطران داخل ارتفاعه: المجموعان لا يسعهما سطر الاسم، ولا يزولان */
    .aw-hgroup > summary { flex-wrap: wrap; align-content: center; row-gap: 0; }
    .aw-hgroup > summary .aw-hgroup-key { flex: 0 1 auto; max-width: calc(100% - 48px); line-height: 22px; }
    .aw-hgroup > summary .aw-hgroup-sums { flex-basis: 100%; margin-inline-start: 0; line-height: 18px; }
}
/* صفحة البلوك في الهاتف: حلقات المسار كلّها لا يسعها سطرٌ وما بعد الاسم لا ينكمش فلا يبقى منه إلّا حرف. فالاسم في سطره وقائمته تحته، ونهاية السطر تقوم مقام فاصله */
@media screen and (max-width: 500px) {
    header.topbar:has(.aw-sum-toggle) .aw-crumbs { flex-wrap: wrap; }
    header.topbar:has(.aw-sum-toggle) .aw-crumb-menu:first-child { position: relative; flex: 0 0 100%; }
    header.topbar:has(.aw-sum-toggle) .aw-crumb-menu:first-child > summary { width: fit-content; }
    header.topbar:has(.aw-sum-toggle) .aw-crumb-menu:first-child + .aw-crumbs-sep { display: none; }
}

/* ---------- السلّم ولوحة المفاتيح والحركة: ما يسري على الشاشات كلّها ---------- */
/* ارتفاع السطر بحجم الخطّ، حيث يجري النصّ أو يلتفّ. وما ثبّتت مرحلةٌ ارتفاعه، أو صفٌّ ثابتٌ يقصّ نصّه سطراً واحداً، يبقى كما هو: لا أثر له في صفٍّ ثابت، والقصّ بسطرٍ أقصر قد يأخذ من حركات العربيّة */
.aw-page-meta, .aw-pc-date, .aw-pc-rows .ic-drow, .aw-rank-head, .aw-lot, .aw-bs-say, .aw-panel-frac, .aw-menu-label, .aw-pick-none, .aw-sc-keys,
.imp-drop-hint, .pg-meta, .form-hint, .gsearch-group, .account-role, .aw-app .alert-sub { line-height: var(--aw-lh-12); }
.aw-drawer-sub, .aw-drawer-none, .aw-drawer-sec .aw-land-rows .ic-drow, .aw-progress-frac, .aw-progress-value, .aw-sale-box-name, .aw-panel-fields dt, .aw-block-side .aw-panel-fields dd, .aw-sc-group h3, .aw-sc-row, .aw-sc-none,
.aw-tree-empty, .chart-empty, .gsearch-empty, .imp-drop b, .imp-panel-t, .imp-panel-list, .imp-result-lines, .aw-app .alert, .aw-app .alert-title { line-height: var(--aw-lh-13); }
.aw-panel-fields dd, .account-name { line-height: var(--aw-lh-14); }
.aw-drawer h3, .aw-dialog-head h2 { line-height: var(--aw-lh-16); }
.aw-progress-frac .num { line-height: var(--aw-lh-20); }

/* حلقة التركيز: 2 بلون التمييز وبُعد 1، تظهر بانتقال 200، وهي موجودةٌ شفّافةً قبل التركيز ليتلاشى لونها. والمرور 150 على الخلفيّة والحدّ واللون والظلّ، فلا انتقال لزرٍّ بعينه إلّا ما زاد عليها. وفي الإطار وحده: صفحتا الدخول والخطأ العامّة كما هما */
.aw-app :is(a, button, summary, label, input, select, textarea) {
    outline: var(--aw-ring-w) solid transparent; outline-offset: var(--aw-ring-at);
    transition: background-color var(--aw-hover-t), border-color var(--aw-hover-t), color var(--aw-hover-t), box-shadow var(--aw-hover-t), outline-color var(--aw-ring-t);
}
.aw-app :is(a, button, summary, input, select, textarea):focus-visible { outline: var(--aw-ring-w) solid var(--aw-ring-c); outline-offset: var(--aw-ring-at); }
.aw-project-card, .aw-map-card { outline: var(--aw-ring-w) solid transparent; outline-offset: var(--aw-ring-at); }
.aw-side-resize { outline: var(--aw-ring-w) solid transparent; outline-offset: -2px; transition: background-color var(--aw-hover-t), outline-color var(--aw-ring-t); }
/* ما تحمل حلقته حاويته: حقل البحث والمربّع المخفيّ بـlabel حولهما، والرابط الممتدّ ببطاقته أو صفّه */
.searchbox-input, .aw-lsearch-box input, .aw-row-link, .aw-pc-link, .aw-map-card-link { --aw-ring-c: transparent; }
.aw-app .searchbox:focus-within, .aw-app .imp-drop:focus-within, .aw-app label:has(input:focus-visible),
.aw-project-card:has(.aw-pc-link:focus-visible), .aw-map-card:has(.aw-map-card-link:focus-visible), .aw-side-resize:focus-visible { outline-color: var(--aw-ring-c); }
.aw-app .imp-drop:focus-within { outline-offset: var(--aw-ring-at); }
/* في داخل الجزء (-2) حيث يقصّ الحلقة متمرّرٌ أو يغطّيها ما يلصق فوقها: صفوف القوائم والبطاقات في متمرّرها، ورؤوس المجموعات والأعمدة، وصفوف القائمة الجانبيّة وقوائم الاختيار، وشريط الأرقام وصفّ خصائص الدار بقصّهما. وصفّ الجدول حلقته ظلال خلاياه */
.aw-hrow-link, .aw-map-row-link, .aw-card-link, .aw-rank-row, .aw-hgroup > summary, .aw-th-link, .aw-menu-row, .aw-panel-cell, .kpi-card--link,
.nav-item, .aw-tree-link { --aw-ring-at: -2px; }
/* الحقل لا شكل ثانياً لتركيزه: الحلقة وحدها */
.aw-app .form-control:focus { box-shadow: none; }
.aw-app .form-control:not(.is-invalid):focus { border-color: var(--border-input); }
/* وضع الألوان القسريّة يُظهر الإطار الشفّاف: يبقى للتركيز وحده */
@media (forced-colors: active) {
    .aw-app :is(a, button, summary, label, input, select, textarea):not(:focus-visible, :focus-within), .aw-project-card:not(:focus-within), .aw-map-card:not(:focus-within), .aw-side-resize:not(:focus-visible) { outline-style: none; }
}

/* الزرّ المعطَّل: رماديٌّ ثابت بمؤشّر المنع، بلا شفافيّة، ويصله المؤشّر فتظهر العلامة. وزرّ نموذجٍ أُرسل (data-aw-once) منها: النقرة الثانية يمنعها aswar.js */
.aw-app :is(.btn:disabled, .btn[aria-disabled="true"], .pg-btn.is-disabled) {
    color: var(--aw-disabled-fg); background: var(--aw-disabled-bg); border-color: var(--aw-disabled-bg); opacity: 1; cursor: not-allowed; pointer-events: auto; transform: none;
}

/* ظهور القوائم: تلاشٍ وتكبيرٌ 150 من جهة زرّها، وآخره بلا transform فتبقى اللوحات الجانبيّة في مكانها. وأوّل لحظةٍ بلا تصغير: aswar.js يقيس القائمة السياقيّة فور إظهارها.
   وقائمةٌ عادت مفتوحةً بعد تبديل الصفحة (restoreUi) لا تومض: الحركة تجري ولا أثر لها، وأثرها حين يكون التركيز على زرّها أو حقلها، وهو كذلك عند فتحها */
@media (prefers-reduced-motion: no-preference) {
    @keyframes aw-menu-in {
        0% { opacity: var(--aw-menu-from-o); }
        1% { opacity: var(--aw-menu-from-o); transform: scale(var(--aw-menu-from-s)); }
    }
    .aw-menu[open] > .aw-menu-panel { --aw-menu-from-o: 1; --aw-menu-from-s: 1; animation: aw-menu-in 150ms ease-out; }
    .aw-menu[open]:has(> summary:focus, > .aw-menu-panel > [data-aw-menu-search]:focus) > .aw-menu-panel { --aw-menu-from-o: 0; --aw-menu-from-s: .96; }
    .aw-ctx-menu { --aw-menu-from-o: 0; --aw-menu-from-s: .96; animation: aw-menu-in 150ms ease-out; }
    .aw-menu-panel { transform-origin: top right; }
    .aw-menu--end .aw-menu-panel, .aw-fadd > .aw-menu-panel, .aw-fchip-value > .aw-menu-panel, .aw-menu-sub > .aw-menu-panel { transform-origin: top left; }
}

/* الطباعة: تعود الصفحة وثيقةً تتمرّر، بلا إطارٍ ولا شريطٍ عامّ. ويبقى من الرأس عنوان الشاشة واسم المشروع والتاريخ */
@media print {
    html.aw-app, body.aw-app { display: block; height: auto; overflow: visible; }
    .aw-topnav, .sidebar, .aw-panel, .aw-dialog, .aw-tip, .aw-ctx-menu, .aw-tools, .aw-map-tools, .aw-bs-tools, .aw-panel-chev, .aw-crumb-chev, .aw-crumbs .aw-menu-panel,
    .aw-fchip-x, .aw-fadd, .aw-filter-chips .btn-link-clear, .aw-filter-chips .aw-menu-panel, .aw-filter-chips .aw-ico { display: none !important; }
    .aw-subbar { padding: 0; border: 0; }
    /* الشارات نصٌّ عاديّ: تقول الورقة ما صفّته، بلا إطارٍ ولا خلفيّة */
    .aw-filter-chips { min-height: 0; padding: 0 0 8px; gap: 4px 16px; background: none; border-radius: 0; }
    .aw-fchip { gap: 4px; height: auto; color: var(--text-primary); background: none; border: 0; }
    .aw-fchip > * + * { border: 0; }
    .aw-fchip-field, .aw-fchip-op, .aw-fchip-value > summary { padding: 0; color: inherit; }
    .aw-fchip-name { max-width: none; white-space: normal; overflow: visible; }
    .aw-frame { display: block; margin: 0; border: 0; border-radius: 0; overflow: visible; }
    .main { display: block; }
    .content { overflow: visible; scrollbar-gutter: auto; }
    header.topbar { display: flex !important; position: static; height: auto; padding: 0 0 8px; border: 0; }
    .aw-side-open, .aw-bar-actions .btn, .aw-bar-actions .aw-icon-btn, .aw-lsearch, .aw-view:not([aria-current="page"]) { display: none !important; }
    /* من المبدّل يبقى اسم الصفحة وعددها نصّاً: تقول الورقة ما هي */
    .aw-views { margin: 0; padding: 0; background: none; }
    .aw-crumbs a.aw-view[aria-current="page"] { padding: 0; background: none; border: 0; box-shadow: none; }
    .aw-hgroup > summary, .aw-hgroup-head, .table th, .aw-htable-t .aw-td-no { position: static; }
    /* الملخّص تحت القائمة ظاهراً أيّاً كانت حالته على الشاشة، والأقسام المطويّة مفتوحة: أرقامها في الورقة */
    .aw-block { display: block; }
    .aw-block-side { display: block !important; position: static; width: auto; height: auto; padding: 0; overflow: visible; scrollbar-gutter: auto; border: 0; box-shadow: none; }
    .aw-bs-head { position: static; height: auto; }
    .aw-block-side details::details-content { display: block; height: auto; content-visibility: visible; }
    .aw-bs-row { height: auto; min-height: var(--aw-h-lg); }
    .aw-bs-name { white-space: normal; }
    .aw-map-card, .aw-project-card { break-inside: avoid; }
    .aw-row-more, .aw-td-more, .aw-prop-more { display: none !important; }
    /* بلا حاوية: لا طيّ في القائمة، ولا امتداد لرابط الجدول */
    .aw-hlist, .aw-htable { container-type: normal; }
    .aw-hgroup > summary, .aw-hgroup-head { break-after: avoid; }
    .table-wrap { overflow: visible; }
    .aw-htable-t .aw-td-no { box-shadow: none; }
    .aw-cell-text { max-width: none; white-space: normal; }
    /* صفّ القائمة يُطبع كاملاً: ما طال يلتفّ ولا يُقصّ */
    .aw-hrow { height: auto; break-inside: avoid; }
    .aw-hrow-link { flex-wrap: wrap; height: auto; padding-block: 4px; padding-inline-end: 12px; }
    .aw-hrow-title { white-space: normal; overflow: visible; }
    .aw-hrow-props { flex-wrap: wrap; }
    /* اللوحة تُطبع أعمدةً متتالية في تدفّقٍ عاديّ */
    .content-container:has(.aw-board), .content-container:has(.aw-board) > [data-aw-cols], .aw-block-list:has(.aw-board) { display: block; height: auto; }
    .aw-board, .aw-board-col, .aw-board-cards { display: block; width: auto; max-width: none; height: auto; overflow: visible; background: none; }
    .aw-board-col { margin-bottom: 16px; padding: 0; }
    .aw-card { margin-bottom: 8px; break-inside: avoid; }
    .aw-bar-title h1, .aw-crumbs-here, .aw-crumb, .aw-crumb-name { white-space: normal; overflow: visible; }
    /* نظرة عامّة: اللوحة وحدها في تدفّق الصفحة، والقائمة خلفها لا تُطبع */
    .main:has(> .aw-drawer) > :not(.aw-drawer), .aw-drawer-tools { display: none !important; }
    .aw-drawer { position: static; display: block; width: auto !important; overflow: visible; border-radius: 0 !important; box-shadow: none; }
    .aw-drawer-head { height: auto; padding: 0 0 12px; border: 0; }
    .aw-drawer-title { overflow: visible; white-space: normal; }
    .aw-drawer-body { display: block; padding: 0; overflow: visible; scrollbar-gutter: auto; }
    .aw-drawer-body > * { margin-bottom: 24px; }
    .aw-drawer-box, .aw-drawer-table, .aw-sale-box { break-inside: avoid; }
    /* مشروع جديد: النافذة وحدها في تدفّق الصفحة، بلا ظلٍّ ولا طبقةٍ خلفها ولا أزرار */
    .aw-cw-back, .aw-cw-foot, .aw-cw-head .aw-mini-btn { display: none !important; }
    .aw-cw { position: static; display: block; width: auto; max-height: none; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
    .aw-cw-head { padding: 0 0 12px; border: 0; }
    .aw-cw-form { display: block; }
    .aw-cw-body { padding: 0; overflow: visible; scrollbar-gutter: auto; }
    /* القائمة تبقى مع عنوانها وعناوين أعمدتها: الوحدة في العنوان وحده، فصفوفٌ بلا عنوانٍ أرقامٌ بلا معنى */
    .dash-sec-head { break-after: avoid; }
}
