/* =====================================================================
   واجهة الكمبيوتر (الشاشات من 1100px فأكثر، html.dk)
   الهدف: موقع حاسوب متكامل بدل شكل تطبيق الجوال، ونصوص حادة وواضحة.
   كل القواعد هنا محصورة بـ html.dk، فلا يتغير شيء على الجوال.
   ===================================================================== */

/* ---------- 1) الخط على الكمبيوتر ----------
   نفس خط الموقع (Graphology) لكن بأوزان أخف: كل وزن ينزل درجة
   (العريض ← نصف عريض، نصف العريض ← متوسط، المتوسط ← عادي)، فيصير النص أنحف وأوضح على الشاشات الكبيرة. */
@font-face{font-family:'GraphologyDk';src:url('../fonts/Graphology-Light.otf') format('opentype');font-weight:100 349;font-display:swap}
@font-face{font-family:'GraphologyDk';src:url('../fonts/Graphology-Regular.otf') format('opentype');font-weight:350 549;font-display:swap}
@font-face{font-family:'GraphologyDk';src:url('../fonts/Graphology-Medium.otf') format('opentype');font-weight:550 649;font-display:swap}
@font-face{font-family:'GraphologyDk';src:url('../fonts/Graphology-SemiBold.otf') format('opentype');font-weight:650 950;font-display:swap}
@font-face{font-family:'SSNumDk';src:url('../fonts/SSNum-Medium.woff') format('woff');font-weight:100 749;font-display:swap;unicode-range:U+0030-0039,U+002C,U+002E,U+0025,U+002B,U+002D,U+002F,U+003A,U+0024,U+20AA}
@font-face{font-family:'SSNumDk';src:url('../fonts/SSNum-Bold.woff') format('woff');font-weight:750 950;font-display:swap;unicode-range:U+0030-0039,U+002C,U+002E,U+0025,U+002B,U+002D,U+002F,U+003A,U+0024,U+20AA}
html.dk body,html.dk body button,html.dk body input,html.dk body select,html.dk body textarea{
  font-family:'SSNumDk','GraphologyDk',"Segoe UI",system-ui,-apple-system,Tahoma,Arial,sans-serif!important;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;letter-spacing:0}
html.dk body{font-size:15px;line-height:1.6}
/* التأثيرات الزجاجية (blur) تجعل المتصفح يرسم النص كصورة فيظهر مموّهًا */
html.dk *,html.dk *::before,html.dk *::after{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html.dk .nav-drawer .nd-sec{font-size:12px!important;letter-spacing:0}
/* النص الثانوي أغمق قليلًا ليُقرأ بسهولة */
html.dk[data-theme="white"] body:not(.dark-mode){--w-muted:#5f5f66}
html.dk[data-theme="white"] body.dark-mode{--w-muted:#b0b0b6}

/* ---------- 2) الشريط العلوي: عنوان الصفحة + البحث + الأدوات في صف واحد ---------- */
html.dk header.top{position:sticky!important;top:0;z-index:800;display:flex!important;align-items:center;gap:20px;
  height:64px;min-height:64px;padding:0 28px!important;margin:0!important;border-radius:0!important;
  background:var(--w-bg,#fff)!important;border-bottom:1px solid var(--w-line,#e5e5ea)!important;box-shadow:none!important}
html.dk header.top .brand{display:none!important}
html.dk header.top .dk-title{order:1;flex:1 1 0;min-width:0;display:flex;flex-direction:column;justify-content:center;line-height:1.25}
html.dk header.top .dk-title b{font-size:19px;font-weight:800;color:var(--w-text,#000);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.dk header.top .dk-title small{font-size:12.5px;color:var(--w-muted,#6e6e73);font-weight:500}
html.dk header.top #gsBar{order:2;flex:0 1 520px;min-width:280px;position:relative!important;top:auto!important;inset:auto!important;
  margin:0!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;height:auto!important}
html.dk header.top #gsBar .gs-wrap{max-width:none!important;margin:0!important}
html.dk header.top #gsBar input{height:40px!important;min-height:40px!important;font-size:14.5px!important;border-radius:10px!important}
html.dk header.top #gsBar .gs-results{position:absolute!important;top:calc(100% + 6px)!important;inset-inline:0!important;max-height:70vh;overflow:auto;z-index:850;
  border-radius:12px;box-shadow:0 18px 50px rgba(0,0,0,.18)!important}
html.dk header.top .top-right{order:3;flex:1 1 0;display:flex!important;justify-content:flex-end;align-items:center;gap:6px;position:static!important}
html.dk header.top .top-left{order:4;flex:none;display:flex!important;align-items:center;gap:6px;position:static!important}
html.dk body header.top .top-right .header-icon:not(.nd-burger):not(.op-home){display:inline-flex!important;align-items:center;justify-content:center}
html.dk body header.top .top-right .header-icon.nd-burger,html.dk body header.top .top-right .header-icon.op-home{display:none!important}
html.dk body header.top .header-icon{color:var(--w-text,#000)!important;background:transparent!important;border:1px solid var(--w-line,#e5e5ea)!important}
html.dk header.top .header-icon{width:38px!important;height:38px!important;min-width:38px;border-radius:10px!important;transition:background .15s}
html.dk header.top .header-icon:hover{background:var(--w-fill,#f2f2f7)!important}
html.dk header.top .header-icon:focus-visible{outline:2px solid #0a84ff;outline-offset:2px}
/* لو بقي شريط البحث خارج الشريط العلوي (قبل التحميل) */
html.dk body > #appShell > #gsBar{display:none}

/* ---------- 3) القائمة الجانبية ---------- */
html.dk .nav-drawer .nd-panel{background:var(--w-bg,#fff)!important;border-left:1px solid var(--w-line,#e5e5ea)!important;padding-bottom:24px}
html.dk .nav-drawer .nd-item{min-height:40px;padding-block:8px!important;font-size:14.5px!important;font-weight:600}
html.dk .nav-drawer .nd-item:hover{background:var(--w-fill,#f2f2f7)!important}
html.dk .nav-drawer .nd-item.nd-active{background:var(--w-on,#e5e5ea)!important;color:var(--w-text,#000)!important;font-weight:800}
html.dk .nav-drawer .nd-item:focus-visible{outline:2px solid #0a84ff;outline-offset:-2px}

/* ---------- 4) مساحة المحتوى ---------- */
html.dk main.wrap{max-width:1280px!important;padding:24px 32px 72px!important;margin:0 auto!important}
/* زر «الرئيسية» داخل الصفحات غير لازم: القائمة الجانبية ظاهرة دائمًا */
html.dk main.wrap > section .section-title > .btn[data-action="goHome"]{display:none!important}
html.dk main.wrap > section{border-radius:16px!important}
html.dk main.wrap > section .section-title h2{font-size:20px!important}
/* البطاقات: ظل خفيف بدل الظلال الثقيلة الخاصة بالجوال */
html.dk .panel,html.dk .card,html.dk .wk-card,html.dk .op-alert{box-shadow:0 1px 2px rgba(0,0,0,.04)!important}

/* ---------- 5) الرئيسية ---------- */
html.dk #hiBar{margin:0 0 4px!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;min-height:0!important}
html.dk #hiBar b{font-size:24px!important}
html.dk #hiBar small{font-size:14px!important}
html.dk .dashboard-copy{margin:0 0 16px!important}
html.dk .dashboard-copy .ss-banner{padding:10px 18px!important;min-height:0!important;border-radius:12px!important;display:flex!important;align-items:center;gap:16px;box-shadow:none!important;border:1px solid var(--w-line,#e5e5ea)!important}
html.dk .dashboard-copy .ss-banner-brand{flex:none;margin:0!important}
html.dk .dashboard-copy .ss-banner-track{flex:1;min-width:0}
/* أزرار الوصول السريع: صف أفقي مدمج (أيقونة بجانب النص) */
html.dk body.pg-home main.wrap .quick-grid.home-quick{gap:12px!important;margin:14px 0!important}
html.dk body.pg-home main.wrap .quick-grid.home-quick .quick-action{display:grid!important;grid-template-columns:40px 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;justify-items:start;
  text-align:right;min-height:68px!important;padding:12px 16px!important;font-size:15px!important;cursor:pointer;transition:border-color .15s,background .15s}
html.dk body.pg-home main.wrap .quick-grid.home-quick .quick-action > .ai-ic{grid-row:1/3;margin:0!important;width:40px!important;height:40px!important}
html.dk body.pg-home main.wrap .quick-grid.home-quick .quick-action small{display:block!important;font-size:12.5px!important;font-weight:500;color:var(--w-muted,#6e6e73)}
html.dk body.pg-home main.wrap .quick-grid.home-quick .quick-action:hover{border-color:var(--w-line2,#d1d1d6)!important;background:var(--w-surf2,#f2f2f7)!important}
html.dk .dashboard-head{margin:0 0 14px!important}
html.dk .dk-home{grid-template-columns:minmax(0,1.6fr) minmax(340px,1fr)!important;gap:20px!important;margin-top:0!important}
html.dk .dk-home .dk-col{display:flex;flex-direction:column;gap:16px;min-width:0}
html.dk .dk-home .dk-col > *{margin:0!important}
/* حركة الظهور عند التمرير تُحسب قبل نقل العناصر للعمودين، فتبقى بعض اللوحات مخفية؛ نُظهرها مباشرة */
html.dk .dk-home .dk-col > *{opacity:1!important;transform:none!important;visibility:visible!important}
html.dk .dk-home .op-alert .oa-row{padding-block:8px!important}

/* ---------- 6) القوائم والشبكات ---------- */
/* بطاقات الشرائح: 3 أعمدة على الشاشات الواسعة */
@media(min-width:1560px){html.dk #sims #simTable{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
html.dk #sims #simTable{gap:16px!important;align-items:start}
/* العمليات: بطاقتان في كل صف، وعنوان كل يوم بعرض كامل */
html.dk #dailyTab #opList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
html.dk #dailyTab #opList > :not(.op-card){grid-column:1/-1}
html.dk #dailyTab #opList > .op-card{margin:0!important}
/* الجداول: صفوف أوضح مع تمرير الفأرة */
html.dk table tbody tr:hover td{background:var(--w-surf2,#f2f2f7)}
html.dk table th{font-weight:700}
/* الرسوم البيانية: أعمدة بعرض معقول بدل عمود عريض جدًا */
html.dk #reports .barv,html.dk #reports .bar{max-width:120px;margin-inline:auto}

/* ---------- 7) النماذج والإعدادات ---------- */
html.dk #settings .panel{max-width:1040px;margin-inline:auto}
html.dk input:not([type=checkbox]):not([type=radio]),html.dk select,html.dk textarea{font-size:15px}
html.dk input:focus-visible,html.dk select:focus-visible,html.dk textarea:focus-visible{outline:2px solid #0a84ff;outline-offset:1px}
html.dk .btn{cursor:pointer}

/* ---------- 8) النوافذ: في منتصف الشاشة بعرض مناسب بدل لوح سفلي ---------- */
html.dk .debt-entry-overlay-v2,html.dk .v62-overlay,html.dk .dsm-back{align-items:center!important;justify-content:center!important;background:rgba(0,0,0,.38)!important}
html.dk .debt-entry-card-v2,html.dk .v62-sheet,html.dk .dsm-sheet{width:min(640px,92vw)!important;max-width:640px!important;border-radius:18px!important;max-height:86vh!important;overflow:auto!important;
  margin:0 auto!important;box-shadow:0 24px 70px rgba(0,0,0,.25)!important}
html.dk .debt-entry-card-v2.mx-card{width:min(760px,92vw)!important;max-width:760px!important}
html.dk .dk-home .dk-col > :empty{display:none!important}

/* عنصر «المصاريف الشخصية» في القائمة: الوصف تحت العنوان بدل كسر السطر */
html.dk .nav-drawer .nd-item.nd-pe{flex-wrap:wrap}
html.dk .nav-drawer .nd-item > em{font-style:normal;white-space:nowrap}
html.dk body header.top .top-side .header-icon,html.dk body header.top #gsBar input,html.dk body main.wrap .dashboard-copy .ss-banner{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html.dk header.top .dk-title small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* أوزان موحّدة للقائمة الجانبية: عادي للعناصر، ونصف عريض للعنصر النشط */
html.dk body .nav-drawer .nd-item{font-weight:500!important}
html.dk body .nav-drawer .nd-item.nd-active{font-weight:700!important}
html.dk body .nav-drawer .nd-sec{font-weight:600!important}
