﻿/* ==========================================================================
   داركم — نظام التصميم الهندسي (Blueprint)
   الفكرة: النظام لوحة مخططات إنشائية. كحلي المخطط للهيكل، ورق رسم هندسي
   للخلفية، وأصفر المسّاح علامة وحيدة للمكان الحالي والفعل الأهم.
   ========================================================================== */

/* ---------- الخطوط (مضمّنة محلياً: تعمل بدون إنترنت) ----------
   نوزّع الأوزان حتى تبقى الصفحات القديمة (التي تستخدم 800–950) مقروءة وغير ثقيلة */
@font-face { font-family: "DK Text"; src: url("../fonts/plex-arabic-400.woff2") format("woff2"); font-weight: 1 450; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "DK Text"; src: url("../fonts/plex-arabic-500.woff2") format("woff2"); font-weight: 451 650; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "DK Text"; src: url("../fonts/plex-arabic-600.woff2") format("woff2"); font-weight: 651 850; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "DK Text"; src: url("../fonts/plex-arabic-700.woff2") format("woff2"); font-weight: 851 1000; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "DK Text"; src: url("../fonts/plex-latin-400.woff2") format("woff2"); font-weight: 1 450; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "DK Text"; src: url("../fonts/plex-latin-500.woff2") format("woff2"); font-weight: 451 650; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "DK Text"; src: url("../fonts/plex-latin-600.woff2") format("woff2"); font-weight: 651 850; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "DK Text"; src: url("../fonts/plex-latin-700.woff2") format("woff2"); font-weight: 851 1000; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }

@font-face { font-family: "DK Kufi"; src: url("../fonts/kufi-arabic-600.woff2") format("woff2"); font-weight: 1 650; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "DK Kufi"; src: url("../fonts/kufi-arabic-700.woff2") format("woff2"); font-weight: 651 750; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "DK Kufi"; src: url("../fonts/kufi-arabic-800.woff2") format("woff2"); font-weight: 751 1000; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "DK Kufi"; src: url("../fonts/kufi-latin-600.woff2") format("woff2"); font-weight: 1 650; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "DK Kufi"; src: url("../fonts/kufi-latin-700.woff2") format("woff2"); font-weight: 651 750; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }
@font-face { font-family: "DK Kufi"; src: url("../fonts/kufi-latin-800.woff2") format("woff2"); font-weight: 751 1000; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212; }

/* ---------- الرموز ---------- */
:root {
    --ink: #102A43;          /* كحلي المخطط */
    --ink-2: #193A5C;
    --ink-3: #2A527A;
    --ink-line: rgba(255,255,255,.07);
    --paper: #ECF0EE;        /* ورق رسم هندسي */
    --sheet: #FFFFFF;
    --rule: #C9D3D9;
    --rule-2: #E2E8EB;
    --text: #13212C;
    --muted: #586874;
    --faint: #8796A2;
    --mark: #F2B92B;         /* أصفر المسّاح: العلامة الوحيدة */
    --mark-ink: #4A3600;
    --ok: #1C7A57;  --ok-bg: #E4F2EC;
    --warn: #A9650A; --warn-bg: #FBF0DC;
    --bad: #A3372E; --bad-bg: #F8E6E3;
    --info: #1F5C9E; --info-bg: #E3EDF7;
    --r: 6px;
    --r-sm: 4px;
    --side: 252px;
    --top: 60px;
    --f-text: "DK Text", "Segoe UI", Tahoma, sans-serif;
    --f-head: "DK Kufi", "DK Text", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body.dk {
    margin: 0;
    font-family: var(--f-text);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--paper);
    /* ورق مربعات: خط رئيسي كل 5 مربعات */
    background-image:
        linear-gradient(rgba(16,42,67,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16,42,67,.055) 1px, transparent 1px),
        linear-gradient(rgba(16,42,67,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16,42,67,.025) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
    background-attachment: fixed;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

:where(body.dk) :where(h1, h2, h3, h4, h5, .dk-h) {
    font-family: var(--f-head);
    color: var(--ink);
    letter-spacing: 0;
    line-height: 1.35;
}

:where(body.dk) a { color: var(--info); text-decoration: none; }
:where(body.dk) a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }

.dk-num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.dk-muted { color: var(--muted); }
.dk-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==========================================================================
   الهيكل
   ========================================================================== */
.dk-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--side) minmax(0, 1fr);
    grid-template-rows: var(--top) minmax(0, 1fr);
    grid-template-areas: "side top" "side main";
}

/* ---------- الشريط الجانبي (لوحة المخطط) ---------- */
.dk-side {
    grid-area: side;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--ink);
    background-image:
        linear-gradient(var(--ink-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
    background-size: 24px 24px;
    color: #DCE6EE;
    overflow: hidden;
    z-index: 60;
}

.dk-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--top);
    padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    color: #fff;
    text-decoration: none;
    flex: 0 0 auto;
}
.dk-brand:hover { color: #fff; }
.dk-brand svg { width: 34px; height: 34px; flex: 0 0 auto; }
.dk-brand b { font-family: var(--f-head); font-weight: 800; font-size: 1.2rem; line-height: 1; display: block; }
.dk-brand small { display: block; font-size: .72rem; color: #9FB3C4; margin-top: 4px; line-height: 1.2; }

.dk-nav { flex: 1 1 auto; overflow-y: auto; padding: 10px 0 18px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.dk-nav-group { padding: 6px 0; }
.dk-nav-group + .dk-nav-group { border-top: 1px dashed rgba(255,255,255,.10); }
.dk-nav-title { font-size: .72rem; color: #7F96AA; padding: 8px 20px 4px; font-weight: 500; }

.dk-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1px 10px;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    color: #C9D6E2;
    font-weight: 500;
    font-size: .95rem;
    text-decoration: none;
}
.dk-link i { width: 18px; text-align: center; color: #8FA6BA; font-size: .95rem; }
.dk-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.dk-link:hover i { color: #fff; }
.dk-link .dk-count {
    margin-inline-start: auto;
    min-width: 22px; height: 20px; padding: 0 6px;
    border-radius: 3px; display: grid; place-items: center;
    background: var(--bad); color: #fff; font-size: .72rem; font-weight: 600;
}

/* العلامة المميزة: خط قياس أصفر بنهايتين عند الصفحة الحالية */
.dk-link.active { background: rgba(255,255,255,.09); color: #fff; }
.dk-link.active i { color: var(--mark); }
.dk-link.active::before {
    content: "";
    position: absolute;
    inset-block: 6px;
    inset-inline-start: -10px;
    width: 3px;
    background: var(--mark);
}
.dk-link.active::after {
    content: "";
    position: absolute;
    inset-inline-start: -14px;
    top: 6px;
    width: 11px;
    height: calc(100% - 12px);
    border-top: 1px solid var(--mark);
    border-bottom: 1px solid var(--mark);
}

.dk-side-foot { flex: 0 0 auto; border-top: 1px solid rgba(255,255,255,.12); padding: 12px 14px; }
.dk-user { display: flex; align-items: center; gap: 10px; color: #fff; }
.dk-avatar {
    width: 34px; height: 34px; flex: 0 0 auto;
    display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: var(--r-sm);
    font-family: var(--f-head); font-weight: 700; font-size: .85rem; color: var(--mark);
}
.dk-user b { display: block; font-weight: 500; font-size: .9rem; line-height: 1.2; }
.dk-user small { color: #8FA6BA; font-size: .75rem; }
.dk-user form { margin: 0 auto 0 0; }
.dk-user button { background: transparent; border: 1px solid rgba(255,255,255,.2); color: #C9D6E2; width: 32px; height: 32px; border-radius: var(--r-sm); }
.dk-user button:hover { color: #fff; border-color: rgba(255,255,255,.45); }

/* ---------- الشريط العلوي ---------- */
.dk-top {
    grid-area: top;
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--top);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--rule);
    backdrop-filter: saturate(1.1) blur(6px);
}
.dk-top-title { min-width: 0; }
.dk-top-title b { font-family: var(--f-head); font-weight: 700; font-size: 1.02rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.dk-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 520px;
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--rule);
    border-radius: var(--r);
    background: var(--sheet);
    color: var(--muted);
    font: inherit;
    font-size: .92rem;
    cursor: text;
    text-align: start;
}
.dk-search:hover { border-color: var(--ink-3); color: var(--text); }
.dk-search span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-kbd { font-family: var(--f-text); font-size: .72rem; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 3px; padding: 0 6px; color: var(--muted); direction: ltr; background: #F6F8F9; }

.dk-project {
    display: flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 10px;
    border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet);
}
.dk-project i { color: var(--faint); }
.dk-project select { border: 0; background: transparent; font: inherit; font-size: .9rem; color: var(--text); max-width: 190px; outline: 0; }

.dk-iconbtn {
    width: 40px; height: 40px; flex: 0 0 auto;
    display: grid; place-items: center;
    border: 1px solid var(--rule); border-radius: var(--r);
    background: var(--sheet); color: var(--ink);
}
.dk-iconbtn:hover { border-color: var(--ink-3); }
.dk-menu-btn { display: none; }

/* ---------- المحتوى ---------- */
.dk-main { grid-area: main; min-width: 0; padding: 22px 22px 40px; }
.dk-container { max-width: 1320px; margin: 0 auto; min-width: 0; }

.dk-backdrop { display: none; }

@media (max-width: 992px) {
    .dk-shell { grid-template-columns: minmax(0,1fr); grid-template-areas: "top" "main"; }
    .dk-side { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 86vw); transform: translateX(100%); transition: transform .22s ease; box-shadow: none; }
    .dk-side.open { transform: none; box-shadow: -20px 0 60px rgba(0,0,0,.25); }
    .dk-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(16,42,67,.45); z-index: 55; }
    .dk-menu-btn { display: grid; }
    .dk-top { padding: 0 12px; gap: 8px; }
    .dk-top-title { display: none; }
    .dk-search { max-width: none; margin: 0; }
    .dk-search .dk-kbd { display: none; }
    .dk-project { display: none; }
    .dk-main { padding: 14px 12px 32px; }
}
@media (prefers-reduced-motion: reduce) { .dk-side { transition: none; } }

/* ==========================================================================
   مكوّنات الصفحات الجديدة
   ========================================================================== */

/* ---------- خط القياس ---------- */
.dk-dim { position: relative; height: 10px; color: var(--ink-3); }
.dk-dim::before { content: ""; position: absolute; inset-inline: 0; top: 4px; border-top: 1px solid currentColor; }
.dk-dim::after { content: ""; position: absolute; inset: 0; border-inline: 1px solid currentColor; }

/* ---------- جدول بيانات المخطط (رأس الصفحة) ---------- */
.dk-tb {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1.5px solid var(--ink);
    background: var(--sheet);
    border-radius: var(--r-sm);
    margin-bottom: 18px;
}
.dk-tb-main { padding: 16px 20px 14px; min-width: 0; }
.dk-tb h1 { font-size: 1.55rem; font-weight: 800; margin: 0; }
.dk-tb p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.dk-tb .dk-dim { margin-top: 12px; max-width: 220px; color: var(--mark); }
.dk-tb-cells { display: grid; grid-auto-flow: column; margin: 0; border-inline-start: 1px solid var(--ink); }
.dk-tb-cells > div { padding: 12px 16px; min-width: 110px; display: flex; flex-direction: column; justify-content: center; }
.dk-tb-cells > div + div { border-inline-start: 1px solid var(--rule); }
.dk-tb-cells dt { font-size: .72rem; color: var(--faint); font-weight: 500; }
.dk-tb-cells dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); white-space: nowrap; }
.dk-tb-actions { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-inline-start: 1px solid var(--rule); }
@media (max-width: 860px) {
    .dk-tb { grid-template-columns: 1fr; }
    .dk-tb-cells { border-inline-start: 0; border-top: 1px solid var(--ink); grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
    .dk-tb-cells > div:nth-child(odd) { border-inline-start: 0; }
    .dk-tb-cells > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
    .dk-tb h1 { font-size: 1.3rem; }
}

/* ---------- لوحة (Sheet) ---------- */
.dk-sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); min-width: 0; }
.dk-sheet-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule-2); }
.dk-sheet-head h2 { font-size: 1rem; font-weight: 700; margin: 0; }
.dk-sheet-head .dk-sheet-tools { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.dk-sheet-body { padding: 16px; }
.dk-sheet-foot { padding: 10px 16px; border-top: 1px solid var(--rule-2); display: flex; gap: 8px; align-items: center; }

.dk-grid { display: grid; gap: 16px; }
.dk-grid-2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .dk-grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- شريط الأرقام (خلايا مثل جدول المخطط، لا بطاقات) ---------- */
.dk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); margin-bottom: 16px; }
.dk-stat { padding: 14px 18px; min-width: 0; position: relative; }
.dk-stat + .dk-stat { border-inline-start: 1px solid var(--rule-2); }
.dk-stat dt, .dk-stat .k { font-size: .8rem; color: var(--muted); font-weight: 500; }
.dk-stat dd, .dk-stat .v { margin: 4px 0 0; font-family: var(--f-head); font-weight: 700; font-size: 1.45rem; color: var(--ink); line-height: 1.25; direction: ltr; text-align: right; unicode-bidi: isolate; }
.dk-stat .s { font-size: .78rem; color: var(--faint); }
.dk-stat.is-bad .v, .dk-stat.is-bad dd { color: var(--bad); }
.dk-stat.is-ok .v, .dk-stat.is-ok dd { color: var(--ok); }
.dk-stat a.v:hover { text-decoration: underline; }
@media (max-width: 700px) {
    .dk-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .dk-stat:nth-child(odd) { border-inline-start: 0; }
    .dk-stat:nth-child(n+3) { border-top: 1px solid var(--rule-2); }
}

/* ---------- مسطرة المال: محصّل / متبقٍ / متأخر على خط واحد ---------- */
.dk-measure { padding: 6px 0 2px; }
.dk-measure-bar { display: flex; height: 14px; border: 1px solid var(--ink); background: repeating-linear-gradient(90deg, #fff 0 9px, var(--rule-2) 9px 10px); }
.dk-measure-bar > span { display: block; height: 100%; }
.dk-measure-bar .m-ok { background: var(--ink); }
.dk-measure-bar .m-bad { background: repeating-linear-gradient(135deg, var(--bad) 0 4px, #C55A50 4px 8px); }
.dk-measure-ticks { position: relative; height: 18px; color: var(--muted); font-size: .72rem; }
.dk-measure-ticks span { position: absolute; top: 2px; transform: translateX(50%); white-space: nowrap; direction: ltr; }
.dk-measure-ticks span::before { content: ""; position: absolute; top: -3px; right: 50%; height: 5px; border-right: 1px solid currentColor; }
.dk-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: var(--muted); margin-top: 6px; }
.dk-legend i { display: inline-block; width: 10px; height: 10px; margin-inline-end: 6px; vertical-align: -1px; border: 1px solid var(--ink); }
.dk-legend b { color: var(--text); font-weight: 600; }

/* ---------- الأزرار ---------- */
.dk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px;
    border-radius: var(--r-sm); border: 1px solid var(--rule);
    background: var(--sheet); color: var(--ink);
    font: inherit; font-weight: 600; font-size: .92rem; white-space: nowrap;
    text-decoration: none; cursor: pointer;
}
.dk-btn:hover { border-color: var(--ink); color: var(--ink); }
.dk-btn.ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.dk-btn.ink:hover { background: var(--ink-2); color: #fff; }
.dk-btn.mark { background: var(--mark); border-color: #D9A21A; color: var(--mark-ink); }
.dk-btn.mark:hover { background: #F6C84A; color: var(--mark-ink); }
.dk-btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.dk-btn.ok:hover { color: #fff; filter: brightness(1.08); }
.dk-btn.sm { height: 32px; padding: 0 10px; font-size: .84rem; }
.dk-btn.icon { width: 32px; padding: 0; }
.dk-btn[disabled], .dk-btn.disabled { opacity: .45; pointer-events: none; }

/* ---------- أعمال سريعة ---------- */
.dk-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); margin-bottom: 16px; overflow: hidden; }
.dk-action { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text); text-decoration: none; min-width: 0; }
.dk-action + .dk-action { border-inline-start: 1px solid var(--rule-2); }
.dk-action .ic { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: var(--r-sm); color: var(--ink); }
.dk-action b { display: block; font-weight: 600; color: var(--ink); }
.dk-action small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.dk-action:hover { background: #F5F8FA; color: var(--text); }
.dk-action.primary .ic { background: var(--mark); border-color: #D9A21A; color: var(--mark-ink); }
@media (max-width: 700px) {
    .dk-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .dk-action:nth-child(odd) { border-inline-start: 0; }
    .dk-action:nth-child(n+3) { border-top: 1px solid var(--rule-2); }
    .dk-action small { display: none; }
}

/* ---------- الجداول ---------- */
.dk-table-wrap { position: relative; overflow-x: auto; width: 0; min-width: 100%; }
.dk-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dk-table th { font-weight: 500; font-size: .78rem; color: var(--muted); text-align: start; padding: 9px 12px; border-bottom: 1px solid var(--rule); background: #F7F9FA; white-space: nowrap; }
.dk-table td { padding: 10px 12px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
.dk-table tr:last-child td { border-bottom: 0; }
.dk-table tbody tr:hover td { background: #FAFBFC; }
.dk-table .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dk-table .who b { display: block; font-weight: 600; color: var(--ink); }
.dk-table .who small { color: var(--muted); font-size: .8rem; direction: ltr; unicode-bidi: isolate; }
.dk-table .row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.dk-empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.dk-empty b { display: block; color: var(--ink); font-family: var(--f-head); font-size: 1.05rem; margin-bottom: 4px; }

/* ---------- وسوم الحالة ---------- */
.dk-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 3px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: #EEF2F4; color: var(--muted); border-inline-start: 3px solid currentColor; }
.dk-pill.ok { background: var(--ok-bg); color: var(--ok); }
.dk-pill.warn { background: var(--warn-bg); color: var(--warn); }
.dk-pill.bad { background: var(--bad-bg); color: var(--bad); }
.dk-pill.info { background: var(--info-bg); color: var(--info); }

/* ---------- تبويبات / مرشّحات ---------- */
.dk-tabs { display: flex; gap: 0; border: 1px solid var(--rule); border-radius: var(--r-sm); overflow: hidden; background: var(--sheet); width: max-content; max-width: 100%; overflow-x: auto; }
.dk-tabs a, .dk-tabs button { display: flex; align-items: center; gap: 8px; padding: 7px 14px; color: var(--muted); font-size: .88rem; font-weight: 500; border: 0; background: transparent; white-space: nowrap; text-decoration: none; }
.dk-tabs a + a, .dk-tabs button + button { border-inline-start: 1px solid var(--rule-2); }
.dk-tabs .on { background: var(--ink); color: #fff; }
.dk-tabs .on:hover { color: #fff; }
.dk-tabs .n { font-size: .75rem; opacity: .75; }

/* ---------- تقدم المشروع: مقطع مثل شرائح مخطط ---------- */
.dk-split { display: flex; height: 10px; background: var(--rule-2); border-radius: 2px; overflow: hidden; min-width: 90px; }
.dk-split span { display: block; height: 100%; }
.dk-split .s-sold { background: var(--ink); }
.dk-split .s-res { background: var(--mark); }

/* ---------- تنبيهات ---------- */
.dk-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid; margin-bottom: 14px; font-weight: 500; }
.dk-alert.ok { background: var(--ok-bg); border-color: #BCDCCD; color: #145C41; }
.dk-alert.bad { background: var(--bad-bg); border-color: #E7C2BD; color: #7E2A23; }
.dk-alert i { margin-top: 4px; }

/* ---------- الإشعار المنبثق ---------- */
.dk-toast { position: fixed; bottom: 18px; left: 18px; z-index: 9999; width: 340px; max-width: calc(100vw - 36px); background: var(--ink); color: #fff; border-radius: var(--r); padding: 12px 44px 12px 14px; border-inline-start: 4px solid var(--mark); opacity: 0; transform: translateY(8px); transition: .2s ease; }
.dk-toast.show { opacity: 1; transform: none; }
.dk-toast .t { font-weight: 600; }
.dk-toast .b { color: #C9D6E2; font-size: .88rem; }
.dk-toast .x { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; display: grid; place-items: center; color: #9FB3C4; cursor: pointer; }

/* ==========================================================================
   البحث الذكي (Ctrl+K)
   ========================================================================== */
.dk-cmd { position: fixed; inset: 0; z-index: 2000; display: none; align-items: flex-start; justify-content: center; padding: 10vh 14px 14px; background: rgba(16,42,67,.5); }
.dk-cmd.open { display: flex; }
.dk-cmd-box { width: min(680px, 100%); background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; box-shadow: 0 30px 80px rgba(16,42,67,.35); }
.dk-cmd-in { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--rule); }
.dk-cmd-in i { color: var(--ink-3); }
.dk-cmd-in input { flex: 1 1 auto; height: 58px; border: 0; outline: 0; font: inherit; font-size: 1.08rem; color: var(--text); background: transparent; min-width: 0; }
.dk-cmd-list { overflow-y: auto; padding: 6px 0 10px; }
.dk-cmd-group { font-size: .74rem; color: var(--faint); padding: 10px 18px 4px; font-weight: 500; }
.dk-cmd-item { display: flex; align-items: center; gap: 12px; padding: 9px 18px; color: var(--text); text-decoration: none; cursor: pointer; border-inline-start: 3px solid transparent; }
.dk-cmd-item .ic { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: var(--r-sm); color: var(--ink); font-size: .9rem; }
.dk-cmd-item .tx { min-width: 0; flex: 1 1 auto; }
.dk-cmd-item b { display: block; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-cmd-item small { display: block; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-cmd-item .go { color: var(--faint); font-size: .8rem; }
.dk-cmd-item.sel { background: #F2F6F9; border-inline-start-color: var(--mark); color: var(--text); }
.dk-cmd-item.sel .ic { background: var(--ink); border-color: var(--ink); color: #fff; }
.dk-cmd-item.act .ic { border-color: var(--ink); }
.dk-cmd-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--rule-2); font-size: .75rem; color: var(--faint); background: #FAFBFC; }
.dk-cmd-empty { padding: 26px 18px; color: var(--muted); text-align: center; }

/* ==========================================================================
   طبقة توحيد الصفحات القديمة
   تُحمَّل بعد محتوى الصفحة حتى تتغلب على الأنماط المكتوبة داخل كل صفحة.
   ========================================================================== */
.dk-main { font-family: var(--f-text); }
.dk-main :where(h1,h2,h3,h4,h5) { font-family: var(--f-head); }


/* الحواف: دقة هندسية بدل الزجاج والدوائر */
.dk-main :is(div, section, aside, article, form, a, button, input, select, textarea, label, table, span, img, ul, li, nav)[class]:not(.rounded-circle):not(.dot):not([class*="avatar"]):not(.spinner-border):not(.form-check-input):not(.dk-keep) {
    border-radius: var(--r-sm) !important;
}
.dk-main :is(div, section, aside, article, form, a, button, span, table, nav, ul, li)[class] { backdrop-filter: none !important; }
.dk-main :is(.hc-page, .hc-card, .hc-kpi, .hc-table, .hc-toolbar, .hc-pager, .hc-field, .hc-input, .c-card, .u-card, .u-page, .p-card, .g-card, .st-card, .stg-card, .inst-card, .kpi, .box, .mini-box, .hc-form-shell, .hc-empty, .hc-note, .hc-alert, .hc-warn, .view-toggle, .icon-btn, .msg-box) {
    box-shadow: none !important;
}

/* إزالة الزخارف الدائرية العائمة */
.dk-main :is(.box, .c-card, .g-card, .hc-card, .hc-kpi, .hc-page, .inst-card, .kpi, .p-card, .st-card, .stg-card, .u-card)::after,
.dk-main .kpi::before { display: none !important; }

/* الحاويات = لوحات بيضاء بخط رسم */
.dk-main :is(.hc-page, .u-page, .hc-form-shell) { background: var(--sheet) !important; border: 1px solid var(--rule) !important; padding: 18px !important; }
.dk-main :is(.hc-card, .hc-kpi, .c-card, .u-card, .p-card, .g-card, .st-card, .stg-card, .inst-card, .kpi, .box) { background: var(--sheet) !important; border: 1px solid var(--rule) !important; }
.dk-main :is(.mini-box, .hc-field, .hc-toolbar, .hc-pager) { background: #F7F9FA !important; border: 1px solid var(--rule-2) !important; }
.dk-main .hc-kpi .v, .dk-main .kpi .v, .dk-main .hc-kpi .val { font-family: var(--f-head); color: var(--ink); }

/* رؤوس الصفحات القديمة: نفس روح جدول المخطط */
.dk-main :is(.hc-head, .hc-header, .hc-form-head) { border-bottom: 1.5px solid var(--ink); padding-bottom: 12px !important; margin-bottom: 16px !important; }
.dk-main :is(.hc-head, .hc-header) h3 { font-size: 1.35rem; font-weight: 800; }
.dk-main .hc-sub, .dk-main .hc-hint, .dk-main .hc-muted { color: var(--muted) !important; font-weight: 400 !important; }

/* الأزرار الأيقونية القديمة */
.dk-main .icon-btn { border: 1px solid var(--rule) !important; background: var(--sheet) !important; color: var(--ink) !important; transform: none !important; }
.dk-main .icon-btn:hover { border-color: var(--ink) !important; }
.dk-main .icon-btn.primary { background: var(--ink) !important; border-color: var(--ink) !important; color: #fff !important; }
.dk-main .icon-btn.primary:hover { background: var(--ink-2) !important; }
.dk-main .icon-btn.gray { background: #F3F5F7 !important; }
.dk-main .icon-btn.danger { background: var(--bad-bg) !important; border-color: #E7C2BD !important; color: var(--bad) !important; }
.dk-main .icon-btn.success { background: var(--ok-bg) !important; border-color: #BCDCCD !important; color: var(--ok) !important; }

/* حقول الإدخال */
.dk-main :is(.form-control, .form-select, .hc-select) { border: 1px solid var(--rule) !important; background-color: #fff !important; color: var(--text); font-family: var(--f-text); box-shadow: none !important; }
.dk-main :is(.form-control, .form-select, .hc-select):focus { border-color: var(--ink) !important; outline: 2px solid var(--mark); outline-offset: 0; }
.dk-main .hc-input { background: #fff !important; border: 1px solid var(--rule) !important; }
.dk-main .hc-input:focus-within { border-color: var(--ink) !important; outline: 2px solid var(--mark); }

/* جداول */
.dk-main .table { --bs-table-bg: transparent; font-size: .9rem; }
.dk-main .table > thead th, .dk-main .hc-table thead th { background: #F7F9FA !important; color: var(--muted) !important; font-weight: 500 !important; font-size: .8rem; border-bottom: 1px solid var(--rule) !important; }
.dk-main .hc-table { border: 1px solid var(--rule) !important; background: var(--sheet) !important; }

/* أزرار Bootstrap */
.dk-main .btn { font-weight: 600; box-shadow: none !important; }
.dk-main .btn-primary { background: var(--ink); border-color: var(--ink); }
.dk-main .btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.dk-main .btn-outline-primary { color: var(--ink); border-color: var(--ink); }
.dk-main .btn-outline-primary:hover { background: var(--ink); color: #fff; }

/* تبديل العرض والشرائح */
.dk-main .view-toggle { border: 1px solid var(--rule) !important; background: #fff !important; }
.dk-main .view-toggle button.active { background: var(--ink) !important; color: #fff !important; }
.dk-main :is(.chip, .hc-chip, .soft-badge, .st-pill, .pill) { border-radius: 3px !important; }

/* رسائل */
.dk-main :is(.hc-alert, .msg-err) { background: var(--bad-bg) !important; border: 1px solid #E7C2BD !important; color: #7E2A23 !important; }
.dk-main .msg-ok { background: var(--ok-bg) !important; border: 1px solid #BCDCCD !important; color: #145C41 !important; }
.dk-main .hc-warn { background: var(--warn-bg) !important; border: 1px dashed #E2B868 !important; color: #6E4306 !important; }

/* اللون الأزرق القديم يتحول لكحلي المخطط */
.dk-main .text-primary { color: var(--ink) !important; }
.dk-main .bg-primary { background-color: var(--ink) !important; }

/* بطاقات الإحصاء القديمة: الأرقام بخط العناوين */
.dk-main :is(.hc-kpi, .kpi) :is(.v, .val, .value, b, strong) { font-variant-numeric: tabular-nums; }

/* القوائم المنسدلة */
.dropdown-menu { border: 1px solid var(--rule); border-radius: var(--r-sm); box-shadow: 0 14px 40px rgba(16,42,67,.15); font-family: var(--f-text); }
.dropdown-item:active { background: var(--ink); }

/* الطباعة: نطبع المحتوى فقط */
@media print {
    body.dk { background: #fff; }
    .dk-side, .dk-top, .dk-cmd, .dk-toast, .dk-backdrop { display: none !important; }
    .dk-shell { display: block; }
    .dk-main { padding: 0; }
}

/* ==========================================================================
   واجهة العمارة: طوابق × شقق (تُستخدم بالإدارة والبيع وواجهة العرض)
   ========================================================================== */
.bs { background: #fff; border: 1.5px solid var(--ink); border-radius: var(--r-sm); min-width: 0; }
.bs + .bs { margin-top: 18px; }
.bs-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.bs-head h3 { margin: 0; font-family: var(--f-head); font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.bs-head .meta { color: var(--muted); font-size: .88rem; }
.bs-head .bs-tools { display: flex; gap: 8px; align-items: center; }
.bs-legend { margin-inline-start: auto; display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.bs-legend i { display: inline-block; width: 12px; height: 12px; margin-inline-end: 6px; vertical-align: -1px; border: 1px solid var(--ok); border-inline-start-width: 4px; background: #fff; }
.bs-legend i.r { border-color: var(--warn); background: var(--warn-bg); }
.bs-legend i.s { border-color: var(--rule); background: #DDE3E8; }
.bs-legend b { color: var(--ink); font-weight: 600; }
.bs-grid { overflow-x: auto; padding: 16px 18px 18px; width: 0; min-width: 100%; }
.bs-floor { display: grid; grid-template-columns: 58px repeat(var(--n, 4), minmax(72px, 1fr)); gap: 6px; margin-bottom: 6px; min-width: max-content; }
.bs-floor .lbl { display: flex; align-items: center; justify-content: center; font-family: var(--f-head); font-weight: 700; font-size: .85rem; color: var(--ink); background: #F1F4F6; border: 1px solid var(--rule); border-radius: 3px; }
.bs-body { max-width: calc(64px + var(--n, 4) * 176px); min-width: max-content; margin-inline: auto; }
.bs-body .bs-roof, .bs-body .bs-ground { min-width: 0; }
.bs-cell { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; column-gap: 8px; row-gap: 2px; min-height: 56px; padding: 6px 10px; border-radius: 3px; border: 1px solid var(--ok); border-inline-start-width: 4px; background: #fff; color: var(--ink); text-decoration: none; }
.bs-cell b { font-weight: 700; font-size: .92rem; direction: ltr; text-align: right; line-height: 1.2; }
.bs-cell em { font-style: normal; font-size: .72rem; color: var(--muted); white-space: nowrap; text-align: end; align-self: center; line-height: 1.2; }
.bs-cell small { grid-column: 1 / -1; font-size: .8rem; font-weight: 600; color: var(--ok); white-space: nowrap; line-height: 1.2; }
.bs-cell.sold em { color: var(--faint); }
a.bs-cell:hover { background: var(--ok-bg); color: var(--ink); }
.bs-cell.res { border-color: var(--warn); background: repeating-linear-gradient(135deg, var(--warn-bg) 0 6px, #fff 6px 12px); }
.bs-cell.res small { color: var(--warn); }
a.bs-cell.res:hover { background: var(--warn-bg); }
.bs-cell.sold { border-color: #C9D3D9; background: #E6EBEF; color: var(--faint); }
.bs-cell.sold small { color: var(--faint); }
a.bs-cell.sold:hover { background: #DDE3E8; color: var(--muted); }
.bs-cell.none { border: 1px dashed var(--rule); background: transparent; }
.bs-cell.hl { outline: 3px solid var(--mark); outline-offset: 1px; background: #FFF8E3; }
/* خط السطح وخط الأرض: يجعل الشبكة تُقرأ كواجهة مبنى */
.bs-roof { height: 8px; margin: 0 0 6px; margin-inline-start: 64px; border: 1.5px solid var(--ink); border-bottom: 0; min-width: calc(var(--n, 4) * 78px - 6px); }
.bs-ground { margin-top: 4px; border-top: 3px solid var(--ink); min-width: calc(58px + var(--n, 4) * 78px); }
.bs.compact .bs-cell { min-height: 30px; padding: 2px 6px; }
.bs.compact .bs-cell small, .bs.compact .bs-cell em { display: none; }
.bs.compact .bs-body { max-width: calc(56px + var(--n, 4) * 120px); }
.bs.compact .bs-floor { grid-template-columns: 50px repeat(var(--n, 4), minmax(44px, 1fr)); }
.bs.compact .bs-roof { margin-inline-start: 56px; min-width: 0; }
.bs.compact .bs-ground { min-width: 0; }
@media (max-width: 600px) {
    .bs-head { padding: 12px 14px; }
    .bs-grid { padding: 12px 8px 12px; }
    .bs-floor { grid-template-columns: 30px repeat(var(--n, 4), minmax(64px, 1fr)); gap: 3px; margin-bottom: 3px; }
    .bs-roof { margin-inline-start: 33px; }
    .bs-floor .lbl { font-size: .78rem; }
    .bs-cell { min-height: 48px; padding: 4px 4px; border-inline-start-width: 3px; column-gap: 0; }
    .bs-cell b { font-size: .86rem; }
    .bs-cell em { display: none; }
    .bs-cell small { font-size: .66rem; letter-spacing: -.01em; }
}
.dk-main .bs :is(.bs-cell, .lbl) { border-radius: 3px !important; }

/* مخطط الطابق جنب واجهة العمارة */
.bs-main.has-plan { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.bs-main.has-plan .bs-grid { border-inline-end: 1px solid var(--rule); }
/* جنب المخطط المساحة أضيق: نخفي مساحة الشقة من المربع (موجودة بالمخطط وصفحة الشقة) */
.bs-main.has-plan .bs-cell { padding-inline: 6px; }
.bs-main.has-plan .bs-cell em { display: none; }
.bs-main.has-plan .bs-floor { grid-template-columns: 46px repeat(var(--n, 4), minmax(64px, 1fr)); }
.bs-main.has-plan .bs-roof { margin-inline-start: 52px; }
.bs-plan { padding: 16px 18px 18px; min-width: 0; }
.bs-plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.bs-plan-head b { font-family: var(--f-head); font-weight: 700; font-size: 1rem; color: var(--ink); }
.bs-plan-cap { color: var(--muted); font-size: .85rem; }
.bs-plan-floors { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; width: 0; min-width: 100%; }
.bs-plan-floors button { flex: none; min-width: 40px; height: 36px; padding: 0 10px; border: 1px solid var(--rule); background: #fff; border-radius: 3px; font: inherit; font-weight: 600; font-size: .85rem; color: var(--ink); cursor: pointer; }
.bs-plan-floors button:hover { border-color: var(--ink); }
.bs-plan-floors button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.bs-plan-stage { position: relative; border: 1px solid var(--rule); border-radius: var(--r-sm); background: #F7F9FA; overflow: hidden; }
.bs-plan-stage img { display: block; width: 100%; height: auto; }
.bs-pin { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; min-width: 46px; padding: 3px 8px 2px; border-radius: 3px; background: #fff; border: 1.5px solid var(--ok); border-bottom-width: 4px; color: var(--ink); text-decoration: none; line-height: 1.25; box-shadow: 0 2px 6px rgba(16, 42, 67, .2); }
.bs-pin b { font-size: .84rem; font-weight: 700; direction: ltr; }
.bs-pin small { font-size: .68rem; font-weight: 600; color: var(--ok); white-space: nowrap; }
.bs-pin:hover { z-index: 3; background: var(--ok-bg); color: var(--ink); }
.bs-pin.reserved { border-color: var(--warn); }
.bs-pin.reserved small { color: var(--warn); }
.bs-pin.reserved:hover { background: var(--warn-bg); }
.bs-pin.sold, .bs-pin.cancelled, .bs-pin.blocked { border-color: #C9D3D9; background: #E6EBEF; color: var(--faint); }
.bs-pin.sold small, .bs-pin.cancelled small, .bs-pin.blocked small { color: var(--faint); }
.bs-pin.hl { z-index: 2; outline: 3px solid var(--mark); outline-offset: 2px; background: #FFF8E3; }
button.lbl { padding: 0; font: inherit; font-family: var(--f-head); cursor: pointer; }
button.lbl:hover { border-color: var(--ink); }
.bs-floor.on .lbl { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 980px) {
    .bs-main.has-plan { grid-template-columns: minmax(0, 1fr); }
    .bs-main.has-plan .bs-grid { border-inline-end: 0; border-bottom: 1px solid var(--rule); }
}
@media (max-width: 600px) {
    .bs-plan { padding: 12px 10px 14px; }
    .bs-pin { min-width: 34px; padding: 2px 5px 1px; }
    .bs-pin b { font-size: .76rem; }
    .bs-pin small { display: none; }
}
@media (max-width: 600px) {
    /* الواجهة المصغّرة بصفحة الشقة: ست شقق بالطابق تكفي بدون سحب */
    .bs.compact .bs-floor { grid-template-columns: 28px repeat(var(--n, 4), minmax(36px, 1fr)); gap: 3px; margin-bottom: 3px; }
    .bs.compact .bs-roof { margin-inline-start: 31px; }
    .bs.compact .bs-cell { padding: 2px; border-inline-start-width: 3px; }
    .bs.compact .bs-cell b { font-size: .74rem; text-align: center; }
}

/* التنقل بين العمارات */
.bt-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; width: 0; min-width: 100%; }
.bt-tabs button { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 52px; padding: 7px 16px; border: 1.5px solid var(--rule); border-bottom-width: 4px; background: #fff; border-radius: var(--r-sm); font: inherit; color: var(--ink); cursor: pointer; text-align: start; }
.bt-tabs button b { font-family: var(--f-head); font-weight: 700; font-size: .95rem; white-space: nowrap; }
.bt-tabs button small { font-size: .76rem; color: var(--ok); white-space: nowrap; }
.bt-tabs button:hover { border-color: var(--ink); }
.bt-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); border-bottom-color: var(--mark); color: #fff; }
.bt-tabs button[aria-selected="true"] small { color: #CFE3D6; }
.bt-panel[hidden] { display: none; }
@media (min-width: 981px) {
    /* العمارة العالية: المخطط يبقى ثابتاً والزبون ينزل بالطوابق */
    .bs-main.has-plan .bs-plan { position: sticky; top: 70px; }
}

/* ==========================================================================
   عدّة صفحات الإدارة: أدوات البحث، الترتيب والترقيم، النماذج، التفاصيل
   ========================================================================== */
/* شريط أدوات فوق الجدول: بحث، مرشحات، عدد الصفوف */
.dk-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--rule-2); }
.dk-toolbar .end { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dk-find { position: relative; flex: 1 1 240px; max-width: 420px; }
.dk-find i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: .85rem; pointer-events: none; }
.dk-find input { width: 100%; height: 38px; padding-inline: 34px 12px; border: 1px solid var(--rule); border-radius: var(--r-sm); font: inherit; font-size: .9rem; background: #fff; color: var(--text); }
.dk-find input:focus { outline: 2px solid var(--mark); outline-offset: 0; border-color: var(--ink); }
.dk-size { height: 38px; padding: 0 10px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: #fff; font: inherit; font-size: .85rem; color: var(--text); }
.dk-tabs button { cursor: pointer; font: inherit; font-size: .88rem; }

/* ترتيب الأعمدة بالضغط على العنوان */
.dk-table th[data-sort] { cursor: pointer; user-select: none; }
.dk-table th[data-sort]::after { content: "↕"; margin-inline-start: 6px; color: #B5C0C8; font-size: .72rem; }
.dk-table th[data-sort]:hover { color: var(--ink); }
.dk-table th[aria-sort="ascending"]::after { content: "↑"; color: var(--ink); }
.dk-table th[aria-sort="descending"]::after { content: "↓"; color: var(--ink); }
.dk-table th[data-sort]:focus-visible { outline: 2px solid var(--mark); outline-offset: -2px; }
.dk-table tr[hidden] { display: none; }
.dk-table tr[data-href] { cursor: pointer; }
.dk-table td.muted, .dk-table .sub { color: var(--muted); font-size: .8rem; }
.dk-table .money { font-weight: 600; color: var(--ink); white-space: nowrap; }
.dk-table .money.bad { color: var(--bad); }
.dk-table .money.ok { color: var(--ok); }

/* الترقيم */
.dk-pager { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--rule-2); font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.dk-pager .end { margin-inline-start: auto; display: flex; gap: 6px; }

/* شخص: حرف أول بإطار + الاسم */
.dk-person { display: flex; gap: 10px; align-items: center; min-width: 0; }
.dk-ini { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: var(--r-sm); background: #F3F6F8; color: var(--ink); font-family: var(--f-head); font-weight: 700; font-size: .82rem; }
.dk-ini.lg { width: 52px; height: 52px; font-size: 1.15rem; border-width: 1.5px; }
.dk-person b { display: block; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-person small { display: block; color: var(--muted); font-size: .8rem; direction: ltr; text-align: right; unicode-bidi: isolate; }

/* الأزرار: خطر */
.dk-btn.bad { background: var(--bad-bg); border-color: #E7C2BD; color: var(--bad); }
.dk-btn.bad:hover { border-color: var(--bad); color: var(--bad); }
.dk-btn.ghost { border-color: transparent; background: transparent; }
.dk-btn.ghost:hover { border-color: var(--rule); }
form.dk-inline { display: inline; margin: 0; }

/* النماذج */
.dk-form-sec { padding: 18px 18px 20px; border-bottom: 1px solid var(--rule-2); }
.dk-form-sec:last-of-type { border-bottom: 0; }
.dk-sec-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1rem; font-weight: 700; color: var(--ink); }
.dk-sec-h .n { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: var(--r-sm); font-size: .8rem; font-family: var(--f-head); }
.dk-sec-h small { font-family: var(--f-text); font-weight: 400; color: var(--muted); font-size: .82rem; }
.dk-fields { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; }
.dk-field { grid-column: span 6; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dk-field.s2 { grid-column: span 2; } .dk-field.s3 { grid-column: span 3; } .dk-field.s4 { grid-column: span 4; }
.dk-field.s5 { grid-column: span 5; } .dk-field.s8 { grid-column: span 8; } .dk-field.s12 { grid-column: span 12; }
.dk-field > label, .dk-field > .lbl { font-weight: 600; font-size: .88rem; color: var(--ink); }
.dk-field > label .opt, .dk-field > .lbl .opt { font-weight: 400; color: var(--faint); font-size: .78rem; margin-inline-start: 4px; }
.dk-field :is(.form-control, .form-select) { min-height: 42px; }
.dk-field textarea.form-control { min-height: 88px; }
.dk-hint { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.dk-field .field-validation-error, .dk-err { color: var(--bad); font-size: .8rem; font-weight: 500; }
.dk-main .input-validation-error { border-color: var(--bad) !important; }
.dk-main .validation-summary-errors ul { margin: 0; padding-inline-start: 18px; }
.validation-summary-valid { display: none !important; }
.dk-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: #fff; cursor: pointer; }
.dk-check input { margin-top: 4px; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.dk-check b { display: block; font-weight: 600; color: var(--ink); font-size: .9rem; }
.dk-check small { color: var(--muted); font-size: .8rem; }
.dk-check:has(input:checked) { border-color: var(--ink); background: #F5F8FA; }
.dk-form-foot { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--rule); background: #FAFBFC; flex-wrap: wrap; }
.dk-form-foot .note { color: var(--muted); font-size: .84rem; }
.dk-form-foot .end { margin-inline-start: auto; display: flex; gap: 8px; }
.dk-sticky-foot { position: sticky; bottom: 0; z-index: 5; }
.dk-money-in { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }

/* تفاصيل: صفوف مفتاح وقيمة */
.dk-kv { margin: 0; }
.dk-kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 9px 16px; border-bottom: 1px solid var(--rule-2); }
.dk-kv > div:last-child { border-bottom: 0; }
.dk-kv dt { color: var(--muted); font-weight: 500; font-size: .86rem; }
.dk-kv dd { margin: 0; font-weight: 600; color: var(--ink); text-align: end; min-width: 0; overflow-wrap: anywhere; }
.dk-kv dd.ltr { direction: ltr; unicode-bidi: isolate; }

/* شريط نسبة (سداد، إنجاز) */
.dk-bar { height: 8px; background: var(--rule-2); border-radius: 2px; overflow: hidden; min-width: 70px; }
.dk-bar > span { display: block; height: 100%; background: var(--ok); }
.dk-bar.ink > span { background: var(--ink); }
.dk-bar.warn > span { background: var(--mark); }
.dk-bar.bad > span { background: var(--bad); }

/* لوحات صغيرة متجاورة (عقود، مجموعات، قواعد) */
.dk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.dk-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); display: flex; flex-direction: column; min-width: 0; }
.dk-card-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule-2); }
.dk-card-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.dk-card-head .sub { color: var(--muted); font-size: .8rem; }
.dk-card-head > :last-child:not(:first-child) { margin-inline-start: auto; }
.dk-card-foot { margin-top: auto; display: flex; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--rule-2); flex-wrap: wrap; }

/* صفحة ما يملك المستخدم صلاحيتها */
.dk-locked { display: flex; gap: 12px; align-items: flex-start; padding: 18px; background: var(--warn-bg); border: 1px dashed #E2B868; border-radius: var(--r); color: #6E4306; }

/* شبكة صفحة التفاصيل: عمود معلومات + عمود محتوى */
.dk-side-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .dk-side-grid { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 760px) {
    .dk-fields { gap: 14px; }
    .dk-field, .dk-field[class*=" s"] { grid-column: span 12; }
    .dk-toolbar { padding: 10px 12px; }
    .dk-find { max-width: none; flex-basis: 100%; }
    .dk-form-sec { padding: 14px 12px 16px; }
    .dk-form-foot { padding: 10px 12px; }
    .dk-form-foot .end { width: 100%; }
    .dk-form-foot .end .dk-btn { flex: 1 1 auto; }
    .dk-kv > div { padding: 8px 12px; }
}

/* رفع ملف: مساحة للسحب والإفلات مع اسم الملف ومعاينة */
.dk-drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--rule); border-radius: var(--r); background: #FAFBFC; cursor: pointer; min-height: 76px; }
.dk-drop:hover, .dk-drop.drag { border-color: var(--ink); background: #F3F6F8; }
.dk-drop.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.dk-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dk-drop input[type=file]:focus-visible + .ic { outline: 2px solid var(--mark); }
.dk-drop .ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: var(--r-sm); color: var(--ink); background: #fff; }
.dk-drop b { display: block; color: var(--ink); font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.dk-drop small { color: var(--muted); font-size: .8rem; }
.dk-file-preview:empty { display: none; }
.dk-file-preview img { display: block; max-width: 100%; max-height: 260px; margin-top: 10px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: #fff; }

/* نافذة تأكيد */
dialog.dk-dialog { width: min(480px, calc(100vw - 28px)); padding: 0; border: 1.5px solid var(--ink); border-radius: var(--r); box-shadow: 0 30px 80px rgba(16,42,67,.35); color: var(--text); }
dialog.dk-dialog::backdrop { background: rgba(16,42,67,.5); }
.dk-dialog-head { padding: 14px 18px; border-bottom: 1px solid var(--rule-2); display: flex; gap: 10px; align-items: center; }
.dk-dialog-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.dk-dialog-body { padding: 14px 18px; }
.dk-dialog-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--rule-2); background: #FAFBFC; }

/* صف تفاصيل تحت صف الجدول */
.dk-table tr.dk-sub > td { background: #F7F9FA; padding: 12px 16px 14px; }
.dk-table tr.dk-sub[hidden] { display: none; }
.dk-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* معاينة عدة صور قبل الرفع (معرض) */
.dk-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 10px; }
.dk-thumb { position: relative; margin: 0; border: 1px solid var(--rule); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.dk-thumb img, .dk-thumb .doc { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.dk-thumb .doc { display: grid; place-items: center; color: var(--ink); font-size: 1.4rem; background: #F3F6F8; }
.dk-thumb figcaption { padding: 3px 8px; font-size: .72rem; color: var(--muted); direction: ltr; text-align: right; border-top: 1px solid var(--rule-2); }
.dk-thumb .x { position: absolute; top: 6px; inset-inline-end: 6px; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: var(--r-sm); background: rgba(255,255,255,.94); color: var(--bad); cursor: pointer; font-size: .8rem; }
.dk-thumb .x:hover { border-color: var(--bad); }
.dk-thumb .x:focus-visible { outline: 2px solid var(--mark); }

/* الملف المحفوظ حالياً (شعار، غلاف، مخطط) */
.dk-current { display: flex; gap: 12px; align-items: center; margin: 0 0 10px; padding: 8px; border: 1px solid var(--rule-2); border-radius: var(--r-sm); background: #FAFBFC; }
.dk-current img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--rule); border-radius: var(--r-sm); background: #fff; flex: none; }
.dk-current.wide { flex-direction: column; align-items: stretch; }
.dk-current.wide img { width: 100%; height: auto; max-height: 280px; object-fit: contain; }
.dk-current figcaption { font-size: .8rem; color: var(--muted); }
.dk-current figcaption b { display: block; color: var(--ink); font-weight: 600; font-size: .86rem; }

/* حذف: منطقة الخطر */
.dk-danger { border-color: #E7C2BD; }
.dk-danger .dk-sheet-head { background: var(--bad-bg); border-bottom-color: #E7C2BD; }
.dk-danger .dk-sheet-head h2 { color: var(--bad); }
.dk-impact { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; margin: 0; border-bottom: 1px solid var(--rule-2); }
.dk-impact > div { padding: 12px 16px; border-inline-end: 1px solid var(--rule-2); }
.dk-impact > div:last-child { border-inline-end: 0; }
.dk-impact dt { color: var(--muted); font-size: .8rem; }
.dk-impact dd { margin: 2px 0 0; font-family: var(--f-head); font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.dk-impact dd.bad { color: var(--bad); }
.dk-confirm-type { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }

/* معرض صور مرتب (ألبوم الوحدة/المشروع) */
.dk-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.dk-media figure { position: relative; margin: 0; border: 1px solid var(--rule); border-radius: var(--r); background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.dk-media figure > a, .dk-media figure > button.open { display: block; padding: 0; border: 0; background: #F3F6F8; cursor: zoom-in; }
.dk-media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.dk-media figcaption { display: flex; gap: 6px; align-items: center; padding: 8px 10px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--rule-2); }
.dk-media figcaption .end { margin-inline-start: auto; display: flex; gap: 4px; }

/* عارض صورة كبير */
dialog.dk-viewer { width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: var(--r); background: #0B1A28; color: #fff; }
dialog.dk-viewer::backdrop { background: rgba(8,18,28,.82); }
dialog.dk-viewer img { display: block; max-width: 100%; max-height: calc(100vh - 110px); margin: 0 auto; object-fit: contain; }
dialog.dk-viewer .bar { display: flex; gap: 8px; align-items: center; padding: 10px 14px; font-size: .85rem; color: #C8D4DD; }
dialog.dk-viewer .bar .end { margin-inline-start: auto; display: flex; gap: 6px; }
dialog.dk-viewer .dk-btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }

.dk-field.s6 { grid-column: span 6; } .dk-field.s7 { grid-column: span 7; } .dk-field.s9 { grid-column: span 9; }
@media (max-width: 760px) {
    .dk-impact > div { border-inline-end: 0; border-bottom: 1px solid var(--rule-2); }
    .dk-field.s6, .dk-field.s7, .dk-field.s9 { grid-column: span 12; }
}

/* محرر الغرف: اسم + مساحة + حذف */
.dk-rooms { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.dk-rooms-h, .dk-room { display: grid; grid-template-columns: minmax(0, 1fr) 140px 34px; gap: 8px; align-items: center; }
.dk-rooms-h { font-size: .8rem; color: var(--muted); font-weight: 600; }
.dk-rooms-h:only-child { display: none; }
.dk-room .form-control { min-height: 38px; }
.dk-room [data-room-del] { color: var(--bad); }
@media (max-width: 520px) { .dk-rooms-h, .dk-room { grid-template-columns: minmax(0, 1fr) 96px 34px; } }

/* طباعة الألبوم: عنوان + صور كبيرة صفّين */
.dk-print-head { display: none; }
.dk-tabs a { text-decoration: none; }
@media print {
    .no-print, .dk-alert, dialog { display: none !important; }
    .dk-print-head { display: block; margin-bottom: 10px; font-size: 13pt; }
    .dk-media { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dk-media figure { break-inside: avoid; }
    .dk-media img { aspect-ratio: auto; max-height: 120mm; object-fit: contain; }
    .dk-tb .dk-tb-cells, .dk-tb .dk-dim { display: none; }
}

/* شريط توزيع المراحل: كل مرحلة قطعة بعرض نسبتها */
.dk-stagebar { display: flex; height: 34px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: repeating-linear-gradient(135deg, #F5F7F8 0 6px, #EBEFF1 6px 12px); overflow: hidden; }
.dk-stagebar > span { display: grid; place-items: center; min-width: 0; background: var(--ink); color: #fff; font-size: .75rem; border-inline-end: 1px solid rgba(255,255,255,.35); }
.dk-stagebar > span:nth-child(even) { background: var(--ink-3); }
.dk-stagebar b { font-weight: 600; font-family: var(--f-head); }
.dk-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; max-width: 640px; }
.dk-field[hidden] { display: none; }

/* خط زمني لمراحل الوحدة */
.dk-steps { list-style: none; margin: 0; padding: 8px 16px 12px; }
.dk-steps li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 0; }
.dk-steps li + li { border-top: 1px solid var(--rule-2); }
.dk-steps li::before { content: ""; position: absolute; inset-inline-start: 16px; top: 46px; bottom: -12px; width: 2px; background: var(--rule-2); }
.dk-steps li:last-child::before { display: none; }
.dk-steps li.done::before { background: var(--ok); }
.dk-steps .dot { position: relative; z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid var(--rule); border-radius: 50%; background: #fff; font-family: var(--f-head); font-size: .82rem; color: var(--muted); }
.dk-steps .done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.dk-steps .next .dot { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 4px rgba(242,185,43,.45); }
.dk-steps .off > .dot, .dk-steps .off > .body { opacity: .55; }
.dk-steps .t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dk-steps .t b { font-weight: 600; color: var(--ink); }
.dk-steps .m { display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.dk-steps .note { margin-top: 6px; font-size: .82rem; color: var(--text); background: #F7F9FA; border: 1px solid var(--rule-2); border-radius: var(--r-sm); padding: 6px 10px; }
@media (max-width: 600px) { .dk-steps li { grid-template-columns: 34px minmax(0, 1fr); } .dk-steps .act { grid-column: 2; } }

/* اختيار متعدد بمربعات (مجموعات، صلاحيات) */
.dk-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.dk-pick .dk-check[hidden] { display: none; }
.dk-pass { position: relative; }
.dk-pass .form-control { padding-inline-start: 44px; }
.dk-pass [data-pass-toggle] { position: absolute; inset-inline-start: 4px; top: 50%; transform: translateY(-50%); }

/* محرر صلاحيات المجموعة: قسم لكل فئة */
.dk-perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.dk-perm { margin: 0; padding: 0 0 6px; border: 1px solid var(--rule); border-radius: var(--r); background: #fff; min-width: 0; }
.dk-perm[hidden] { display: none; }
.dk-perm legend { float: none; width: 100%; display: flex; align-items: center; gap: 8px; margin: 0 0 4px; padding: 10px 12px; border-bottom: 1px solid var(--rule-2); background: #F7F9FA; border-radius: var(--r) var(--r) 0 0; font-size: .92rem; font-weight: 700; color: var(--ink); }
.dk-perm legend small { color: var(--muted); font-weight: 500; font-size: .78rem; }
.dk-perm-all { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 500; color: var(--muted); cursor: pointer; }
.dk-perm-item { display: flex; gap: 10px; align-items: center; padding: 6px 12px; cursor: pointer; font-size: .88rem; }
.dk-perm-item:hover { background: #F7F9FA; }
.dk-perm-item[hidden] { display: none; }
.dk-perm input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ink); flex: none; }

/* فاصل يوم داخل جدول السجل */
.dk-table tr.dk-day > th { background: #F3F6F8; color: var(--ink); font-weight: 600; font-size: .84rem; padding: 7px 16px; border-top: 1px solid var(--rule); text-align: start; }

/* صفحات مستقلة بدون القائمة (البوابة، ممنوع، خطأ) */
.dk-solo { min-height: 100vh; display: flex; flex-direction: column; }
.dk-solo-top { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--ink); color: #fff; }
.dk-solo-top .brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.dk-solo-top .brand svg { width: 34px; height: 34px; }
.dk-solo-top .brand b { font-family: var(--f-head); font-size: 1.2rem; }
.dk-solo-top .end { margin-inline-start: auto; display: flex; gap: 8px; }
.dk-solo-top .dk-btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.dk-solo-top .dk-btn:hover { border-color: #fff; color: #fff; }
.dk-solo-main { flex: 1; display: grid; place-items: center; padding: 40px 20px; }
.dk-solo-box { width: min(560px, 100%); }
.dk-solo-box .code { font-family: var(--f-head); font-size: 4.5rem; line-height: 1; color: var(--ink); font-weight: 800; letter-spacing: .02em; }
.dk-solo-box .code small { display: block; font-size: .9rem; font-family: var(--f-text); color: var(--muted); font-weight: 500; letter-spacing: 0; margin-top: 8px; }
.dk-solo-box h1 { font-size: 1.6rem; margin: 18px 0 6px; }
.dk-solo-box p { color: var(--muted); margin: 0 0 18px; }
.dk-solo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dk-solo-foot { padding: 14px 28px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--rule); background: var(--sheet); }
.dk-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; width: min(980px, 100%); }
.dk-path { display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; color: inherit; text-decoration: none; }
.dk-path:hover { border-color: var(--ink); }
.dk-path .pic { aspect-ratio: 16 / 8; background: var(--ink) center / cover no-repeat; border-bottom: 1px solid var(--rule); }
.dk-path .in { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dk-path h2 { margin: 0; font-size: 1.3rem; }
.dk-path p { margin: 0; color: var(--muted); }
.dk-path .go { margin-top: auto; padding-top: 10px; }
.dk-path.locked { opacity: .7; }
@media (max-width: 760px) { .dk-paths { grid-template-columns: minmax(0, 1fr); } .dk-solo-top, .dk-solo-foot { padding-inline: 16px; } }

/* ✅ NEW (الإيجارات): أزرار اختيار بشكل تبويبات (دورة الدفع) */
.dk-tabs label { color: var(--muted); font-size: .88rem; font-weight: 500; white-space: nowrap; }
.dk-tabs label + label { border-inline-start: 1px solid var(--rule-2); }
.dk-tabs label.on { background: var(--ink); color: #fff; }
.dk-tabs label:has(input:focus-visible) { outline: 2px solid var(--mark); outline-offset: -2px; }
