/* ═══ خط القاهرة — مستضاف عندنا (بلا تبعية جوجل: أسرع بالعراق وما ينكسر لو انحجب) ═══
   وزنان بس (٦٠٠ للنص و٧٠٠ للعناوين) — وهذا نفسه الي يعطي «أسود غامق» الي طلبه حسنين.
   المقاطع مفصولة عربي/لاتيني بـunicode-range: المتصفّح ينزّل اللاتيني بس لمّا يحتاجه. */
@font-face{font-family:Cairo;font-style:normal;font-weight:600;font-display:swap;
  src:url(/fonts/cairo-arabic-600.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF;}
@font-face{font-family:Cairo;font-style:normal;font-weight:600;font-display:swap;
  src:url(/fonts/cairo-latin-600.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+2010-2011,U+2018-201D,U+2022,U+2026,U+2190-2193,U+00D7,U+00B7;}
@font-face{font-family:Cairo;font-style:normal;font-weight:700;font-display:swap;
  src:url(/fonts/cairo-arabic-700.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF;}
@font-face{font-family:Cairo;font-style:normal;font-weight:700;font-display:swap;
  src:url(/fonts/cairo-latin-700.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+2010-2011,U+2018-201D,U+2022,U+2026,U+2190-2193,U+00D7,U+00B7;}

/* ═══ BAZOKA — واجهة الإدارة والمخزن ═══
   قواعد الكسل: أزرار كبيرة، فعل أخضر واحد بكل شاشة، أرقام كبيرة، تباين عالي */
:root{
  --brand:#0E7D75;
  --brand-d:#0A625C;
  --brand-l:#E3F2F0;
  --ink:#12202270;
  --ink:#0B1618;
  --ink2:#233335;
  --muted:#536567;
  --line:#DCE4E3;
  --bg:#F2F5F4;
  --card:#FFFFFF;
  --ok:#1F7A4D; --ok-l:#E2F2E9;
  --warn:#9C5D0B; --warn-l:#FBF0DE;
  --bad:#A93226; --bad-l:#FAE6E3;
  --r:12px;
  --shadow:0 1px 2px rgba(18,32,34,.06), 0 10px 24px -18px rgba(18,32,34,.35);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg);color:var(--ink);direction:rtl;
  font-family:Cairo,"Segoe UI",system-ui,"Noto Naskh Arabic",Tahoma,sans-serif;
  font-size:16px;line-height:1.6;font-weight:600;-webkit-text-size-adjust:100%;
}
button,input,select,textarea{font-family:inherit;font-size:16px}
.num{font-variant-numeric:tabular-nums}
.hidden{display:none !important}

/* ── شريط علوي ── */
header.top{
  position:sticky;top:0;z-index:40;background:var(--brand);color:#fff;
  display:flex;align-items:center;gap:12px;padding:10px 14px;box-shadow:0 2px 10px rgba(0,0,0,.12);
}
header.top .logo{font-weight:700;font-size:19px;letter-spacing:-.3px}
header.top .sp{flex:1}
header.top .who{font-size:13px;opacity:.9}
header.top button{
  background:rgba(255,255,255,.16);color:#fff;border:0;border-radius:8px;padding:7px 12px;cursor:pointer;font-size:14px;
}
header.top button:hover{background:rgba(255,255,255,.26)}

/* ── تنقل ── */
nav.tabs{
  display:flex;gap:6px;overflow-x:auto;background:var(--card);border-bottom:1px solid var(--line);
  padding:8px 12px;position:sticky;top:52px;z-index:35;scrollbar-width:thin;
}
nav.tabs a{
  color:var(--ink2);text-decoration:none;padding:7px 13px;border-radius:999px;white-space:nowrap;font-size:14.5px;font-weight:700;
}
nav.tabs a.on{background:var(--brand);color:#fff}
nav.tabs a:hover:not(.on){background:var(--brand-l)}

main{max-width:1180px;margin:0 auto;padding:12px 12px 80px}

/* ── بطاقات وشبكات ── */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:13px 14px;box-shadow:var(--shadow)}
.card+.card{margin-top:10px}
.grid{display:grid;gap:10px}
.g2{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.g3{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.g4{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
/* ★ صف الأعلى: الصنف · الماركة · اسم المادة — بترتيبهم الطبيعي وبسطر واحد لمّا يسع.
   نقاط قطع صريحة (مو auto-fit) حتى نضمن السلوك بالتابلت الواقف ٧٦٨px. */
.gtop{grid-template-columns:1fr}
@media(min-width:520px){.gtop{grid-template-columns:1fr 1fr}
  .gtop>label.f:nth-child(3){grid-column:1 / -1}}   /* الاسم ياخذ السطر كامل بوضع العمودين */
@media(min-width:740px){.gtop{grid-template-columns:.8fr 1fr 1.35fr}
  .gtop>label.f:nth-child(3){grid-column:auto}}
/* ★ شبكة الحقول الرقمية القصيرة: تكعد اثنتين بالموبايل بدل صفّين (لملمة حسنين) */
.gnum{grid-template-columns:repeat(auto-fit,minmax(132px,1fr))}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.row.tight{gap:6px}
.spacer{flex:1}

h1{font-size:21px;margin:0 0 3px;font-weight:700;letter-spacing:-.2px}
h2{font-size:17px;margin:0 0 8px;font-weight:700}
h3{font-size:15px;margin:0 0 6px;color:var(--ink2);font-weight:700}
.sub{color:var(--muted);font-size:13.5px;margin:0 0 10px}

/* ── أرقام كبيرة ── */
.kpi{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;box-shadow:var(--shadow)}
.kpi .lbl{color:var(--muted);font-size:13px;margin-bottom:2px}
.kpi .val{font-size:26px;font-weight:700;line-height:1.25;font-variant-numeric:tabular-nums}
.kpi .val small{font-size:14px;font-weight:500;color:var(--muted)}
.kpi.brand{background:var(--brand);border-color:var(--brand);color:#fff}
.kpi.brand .lbl{color:rgba(255,255,255,.8)}

/* ── أزرار ── */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:10px;
  padding:9px 14px;min-height:42px;cursor:pointer;font-weight:700;font-size:15px;
}
.btn:hover{border-color:var(--brand);color:var(--brand)}
.btn.go{background:var(--brand);border-color:var(--brand);color:#fff}
.btn.go:hover{background:var(--brand-d);color:#fff}
.btn.big{width:100%;min-height:56px;font-size:18px}
.btn.sm{min-height:36px;padding:6px 11px;font-size:14px;border-radius:8px}
.btn.danger{color:var(--bad);border-color:#EFC9C4}
.btn.danger:hover{background:var(--bad-l)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.ghost{background:transparent;border-style:dashed}

/* ── حقول ── */
label.f{display:block;margin-bottom:8px}
label.f>span{display:block;font-size:13px;color:var(--ink2);font-weight:600;margin-bottom:3px}
input,select,textarea{
  width:100%;padding:8px 11px;min-height:42px;border:1px solid var(--line);border-radius:9px;
  background:#fff;color:var(--ink);font-weight:600;
}
input:focus,select:focus,textarea:focus{outline:2px solid var(--brand);outline-offset:1px;border-color:var(--brand)}
input[type=checkbox]{width:22px;height:22px;min-height:0;vertical-align:middle}
.chk{display:flex;align-items:center;gap:8px;padding:5px 0}
.hint{font-size:12.5px;color:var(--muted);margin-top:2px;line-height:1.45}

/* ── جداول ── */
.tw{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r);background:var(--card)}
table{border-collapse:collapse;width:100%;min-width:560px;font-size:14.5px}
th,td{text-align:right;padding:8px 11px;border-bottom:1px solid var(--line);vertical-align:middle}
th{background:#EEF5F4;font-size:12.5px;color:var(--ink2);font-weight:700;position:sticky;top:0;z-index:1}
tr:last-child td{border-bottom:0}
tbody tr:hover{background:#FAFCFC}
td.n,th.n{font-variant-numeric:tabular-nums;white-space:nowrap}
td input{min-height:38px;padding:6px 8px}

/* ── شارات ── */
.tag{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.tag.ok{background:var(--ok-l);color:var(--ok)}
.tag.warn{background:var(--warn-l);color:var(--warn)}
.tag.bad{background:var(--bad-l);color:var(--bad)}
.tag.i{background:var(--brand-l);color:var(--brand-d)}

/* ── قائمة عناصر ── */
.item{
  display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--card);
  border:1px solid var(--line);border-radius:var(--r);cursor:pointer;
}
.item:hover{border-color:var(--brand)}
.item .t{flex:1;min-width:0}
.item .t b{display:block;font-size:15.5px;font-weight:600}
.item .t span{display:block;font-size:13px;color:var(--muted)}
.item .q{text-align:left;font-variant-numeric:tabular-nums}
.item .q b{font-size:17px;display:block}
.item .q span{font-size:12px;color:var(--muted)}
.list{display:grid;gap:8px}

/* ── رقاقات ── */
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{
  background:var(--brand-l);color:var(--brand-d);border:1px solid #C9E3E0;border-radius:999px;
  padding:5px 12px;font-size:14px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;
}
.chip.off{background:#fff;color:var(--muted);border-color:var(--line)}
.chip x{color:var(--bad);font-weight:700;cursor:pointer;font-style:normal}

/* ── نافذة ── */
.modal{position:fixed;inset:0;background:rgba(10,20,22,.5);display:grid;place-items:center;z-index:80;padding:14px}
.modal .box{background:var(--card);border-radius:16px;padding:18px;max-width:620px;width:100%;max-height:88vh;overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.modal h2{margin-top:0}
/* 🧾 ورقة الشراء (حسنين 2026-10-06): الزر ثابت بأسفل النافذة مهما طالت النكهات + عمود سعر البيع */
.pb-foot{position:sticky;bottom:-18px;margin:12px -18px -18px;padding:10px 18px 14px;background:var(--card);border-top:1px solid var(--line);z-index:2}
.pb-grid th{vertical-align:bottom}
.pb-gen td,.item.pb-gen{background:var(--sunk,#f3f6f5)}
.pbp.own{font-weight:700;border-color:var(--brand,#1F6F5F)}

/* ── تنبيه ── */
.toast{
  position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:90;
  background:var(--ink);color:#fff;padding:12px 20px;border-radius:999px;font-weight:600;
  box-shadow:0 10px 30px rgba(0,0,0,.3);max-width:90vw;text-align:center;
}
.toast.bad{background:var(--bad)}
.toast.ok{background:var(--ok)}
.toast.warn{background:var(--warn,#b45309)}

/* ── تنبيهات تطالب بفعل ── */
.alert{display:flex;gap:12px;align-items:center;padding:12px 14px;border-radius:10px;border:1px solid;margin-bottom:8px}
.alert.warn{background:var(--warn-l);border-color:#EBD7B4;color:#6A4208}
.alert.bad{background:var(--bad-l);border-color:#EFC9C4;color:#7A241B}
.alert .a-t{flex:1;font-size:14.5px}
.alert .a-s{font-size:13px;opacity:.85;margin-top:3px}
.alert b{font-weight:700}

/* ── شاشة الدخول ── */
.login{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(160deg,#0E7D75,#0A4F4A)}
.login .box{background:#fff;border-radius:18px;padding:28px 24px;width:100%;max-width:380px;box-shadow:0 24px 60px rgba(0,0,0,.28)}
.login h1{text-align:center;color:var(--brand);font-size:30px;margin-bottom:2px}
.login p{text-align:center;color:var(--muted);margin:0 0 20px;font-size:14px}

/* ── ماسح ── */
#scanBox{position:fixed;inset:0;background:#000;z-index:85;display:flex;flex-direction:column}
#scanBox video{flex:1;object-fit:cover;width:100%}
#scanBox .bar{padding:12px;background:#111;color:#fff;display:flex;gap:10px;align-items:center}
#scanBox .bar input{background:#222;color:#fff;border-color:#333}

.empty{text-align:center;color:var(--muted);padding:34px 12px}
.empty b{display:block;font-size:17px;color:var(--ink2);margin-bottom:4px}

@media(max-width:640px){
  main{padding:12px 10px 90px}
  .kpi .val{font-size:22px}
  header.top .who{display:none}
}

/* ★ باقة أ: التوسّع */
.alert.ok{background:var(--ok-l);border:1px solid #BBDFC4;color:#1E5B33;border-radius:10px;padding:10px 12px}
.btn.bad{background:var(--bad);color:#fff}

/* ★ باقة ج: الدردشة */
.avatar{width:42px;height:42px;border-radius:50%;background:var(--brand-l);color:var(--brand-d);display:flex;align-items:center;justify-content:center;font-weight:800;flex-shrink:0;font-size:14px}
.navdot{background:#D9432F;color:#fff;border-radius:999px;padding:1px 7px;font-size:11.5px;font-weight:700;display:inline-block;min-width:18px;text-align:center}
.chatwrap{display:flex;flex-direction:column;height:calc(100dvh - 150px);min-height:340px}
.chathead{display:flex;align-items:center;gap:8px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:8px 12px;margin-bottom:8px}
.chatmsgs{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:6px;padding:6px 2px}
.bubble{max-width:78%;padding:8px 12px;border-radius:14px;background:var(--card);border:1px solid var(--line);align-self:flex-start;word-break:break-word}
.bubble.mine{background:var(--brand-l);border-color:transparent;align-self:flex-end}
.bubble .who{font-size:12px;font-weight:700;color:var(--brand-d);margin-bottom:2px}
.bubble .when{font-size:10.5px;color:var(--muted);margin-top:3px;text-align:left}
.bubble img{max-width:240px;max-height:280px;border-radius:10px;display:block;cursor:zoom-in}
.bubble video{max-width:280px;width:100%;border-radius:10px;display:block}
.chatbar{display:flex;gap:8px;margin-top:8px;align-items:center}
.chatbar #chatText{flex:1;min-width:0}

/* ★ باقة د: رابط تطبيق أندرويد بشاشة الدخول */
.applink{display:block;text-align:center;margin-top:14px;color:var(--brand-d);text-decoration:none;font-size:13.5px;opacity:.85}
.applink:hover{opacity:1;text-decoration:underline}

/* ★ بطاقة الموظف 🪪 */
.idcard{width:340px;max-width:100%;margin:0 auto;border-radius:16px;overflow:hidden;background:#fff;color:#1c2833;box-shadow:0 6px 24px rgba(0,0,0,.18);border:1px solid var(--line)}
.idcard .ic-head{background:linear-gradient(135deg,var(--cb),color-mix(in srgb,var(--cb) 65%,#000));color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px;font-size:18px}
.idcard .ic-head img{height:34px;border-radius:6px;background:#fff;padding:2px}
.idcard .ic-body{padding:14px 16px 6px;text-align:center}
.idcard .ic-name{font-size:22px;font-weight:800}
.idcard .ic-meta{color:#5d6d7e;margin-top:2px}
.idcard .ic-cred{margin-top:10px;font-size:16px;background:#f4f6f7;border-radius:10px;padding:8px;line-height:1.9}
.idcard .ic-qr{text-align:center;padding:10px}
.idcard .ic-qr img{width:120px;height:120px}
.idcard .ic-qr span{display:block;font-size:12px;color:#5d6d7e}
.idcard .ic-foot{background:#f4f6f7;text-align:center;padding:7px;font-size:12.5px;color:#34495e;letter-spacing:.4px}
.modal .box.stmt-box{max-width:860px}
.stmt-title{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin:6px 0 10px}
.stmt-kpis{margin-bottom:10px}
.stmt-open td,.stmt-close td{background:var(--sunk,#f3f6f5)}
/* 🖨 رأس طباعة التقارير (حسنين 2026-09-28) — يظهر بالطباعة فقط */
.print-head{display:none}
/* 🖨 طباعة سند واحد (حسنين 2026-09-29) — الحاوية #vprint مخفية دائماً، ووقت الطباعة تُخفى كل الصفحة غيرها (بلا صفحات فارغة) */
#vprint{display:none}
@media print{
  body.print-vch>*:not(#vprint){display:none!important}
  body.print-vch #vprint{display:block;padding:10px}
  .vch{max-width:720px;margin:0 auto;border:2px solid #111;border-radius:10px;padding:18px 22px;font-size:15px;position:relative;background:#fff;color:#111}
  .vch-h{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:2px solid #111;padding-bottom:10px;margin-bottom:12px}
  .vch-co{font-size:22px;font-weight:900}.vch-sub{font-size:12px;color:#444;font-weight:400}
  .vch-t{text-align:left}.vch-title{font-size:20px;font-weight:900}.vch-no{font-size:13px;margin-top:2px}
  .vch-tbl{width:100%;border-collapse:collapse}.vch-tbl th,.vch-tbl td{border:1px solid #333;padding:8px 10px;text-align:right;vertical-align:top}
  .vch-tbl th{width:26%;background:#f2f2f2;font-weight:700}.vch-amt{font-size:20px;font-weight:900}
  .vch-sig{display:flex;justify-content:space-between;margin-top:46px}.vch-sig div{width:30%;border-top:1px solid #111;padding-top:6px;text-align:center;font-size:13px}
  .vch-foot{margin-top:14px;font-size:11px;color:#555;text-align:center}
  .vch.void .vch-void{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:90px;font-weight:900;color:rgba(200,0,0,.25);transform:rotate(-20deg);pointer-events:none}
}
@media print{
  body.print-rep *{visibility:hidden}
  body.print-rep .lpanel.printing, body.print-rep .lpanel.printing *{visibility:visible}
  body.print-rep .lpanel.printing{position:absolute;top:0;right:0;left:0;width:100%;margin:0;padding:0;box-shadow:none;border:none;background:#fff}
  body.print-rep .lpanel.printing .noprint, body.print-rep .lpanel.printing .btn, body.print-rep .lpanel.printing .chips,
  body.print-rep .lpanel.printing input, body.print-rep .lpanel.printing select, body.print-rep .lpanel.printing label.f{display:none!important}
  body.print-rep .lpanel.printing .print-head{display:block;border-bottom:2px solid #111;margin-bottom:10px;padding-bottom:6px}
  body.print-rep .print-head .ph-co{font-size:20px;font-weight:900}
  body.print-rep .print-head .ph-t{font-size:16px;font-weight:700;margin-top:2px}
  body.print-rep .print-head .ph-m{font-size:12px;color:#444;margin-top:2px}
  body.print-rep .lpanel.printing .tw{overflow:visible}
  body.print-rep .lpanel.printing table{font-size:12px}
  body.print-rep .lpanel.printing td, body.print-rep .lpanel.printing th{padding:4px 6px}
  body.print-stmt *{visibility:hidden}
  body.print-stmt #modal,body.print-stmt #modal .box{position:static;background:#fff;box-shadow:none;max-height:none;overflow:visible;max-width:none;padding:0;display:block}
  body.print-stmt #modal .box,body.print-stmt #modal .box *{visibility:visible}
  body.print-stmt .stmt-head .btn,body.print-stmt .stmt-range{display:none!important}
  body.print-card *{visibility:hidden}
  body.print-card .idcard, body.print-card .idcard *{visibility:visible}
  body.print-card .idcard{position:fixed;top:20px;right:20px;box-shadow:none}
}

/* ── بوابة شروط الاستخدام (ط٢) ── */
#terms .box{max-width:520px}
.tbody{background:var(--sunk,#f3f6f5);border:1px solid var(--line,#dfe6e4);border-radius:10px;
  padding:14px 16px;margin:12px 0 10px;line-height:2;font-size:15px;max-height:42vh;overflow:auto}
.tbody div{padding:3px 0}
#tMore{margin-bottom:12px}
#tMore summary{cursor:pointer;font-size:13.5px;color:var(--muted,#5c6e6a);padding:4px 0}
.tfull{margin-top:8px;padding:12px 14px;background:var(--sunk,#f3f6f5);border-radius:8px;
  font-size:13.5px;line-height:1.9;white-space:pre-wrap;max-height:34vh;overflow:auto}
.tchk{display:flex;align-items:center;gap:9px;font-size:14.5px;margin:4px 0 14px;cursor:pointer}
.tchk input{width:18px;height:18px;accent-color:#0E7D75;cursor:pointer}
#tGo:disabled{opacity:.45;cursor:not-allowed}

/* 🧪 موجة الكتالوج (توجيه حسنين 2026-09-06): يدوي يتثبّت، مولَّد باهت */
.lp.manual{font-weight:700;border-color:var(--brand-d)}
.lp.gen{color:var(--muted)}
#comboGrid td, #comboGrid th{text-align:center}
#comboGrid input[type=checkbox]{width:18px;height:18px;accent-color:var(--brand-d)}

/* 🧪 الجلسة التجريبية — شريط صارخ ثابت فوق كلشي (قرار حسنين: التجريبي مميّز عن الحقيقي) */
#demoBar{position:sticky;top:0;z-index:120;background:repeating-linear-gradient(45deg,#B45309,#B45309 14px,#92400E 14px,#92400E 28px);
  color:#fff;text-align:center;padding:8px 12px;font-size:15px;letter-spacing:.3px;box-shadow:0 2px 10px rgba(0,0,0,.25)}
body.demo-on #app{outline:3px dashed #B45309;outline-offset:-3px}

/* 📦 عمود الكارتون = مصدر التسعير (توجيه حسنين) */
.lp.carton{background:#FFF7ED;border-color:#B45309;font-weight:600}

/* حقل مقفول بالتعديل */
.ro{background:#f1f1f1;color:var(--muted)}

/* ═══ 📊 الداشبورد ═══ */
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.dash-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;flex-wrap:wrap;
  background:linear-gradient(135deg,var(--brand) 0%,var(--brand-d) 100%);color:#fff;border-radius:16px;
  padding:18px 20px;margin-bottom:12px;box-shadow:0 8px 24px rgba(14,125,117,.28);animation:rise .4s ease}
.dash-hero .dh-hi{font-size:22px;font-weight:700}
.dash-hero .dh-sub{opacity:.85;font-size:13px;margin-top:2px}
.dash-hero .dh-big .lbl{font-size:13px;opacity:.85}
.dash-hero .dh-big .val{font-size:34px;font-weight:800;line-height:1.15;font-variant-numeric:tabular-nums;letter-spacing:-.5px}
.dash-hero .dh-mini,.kpi .dh-mini{font-size:12px;opacity:.8;margin-top:2px}
.dash-kpis .kpi{position:relative;overflow:hidden;animation:rise .45s ease}
.dash-kpis .kpi:nth-child(2){animation-delay:.05s}.dash-kpis .kpi:nth-child(3){animation-delay:.1s}.dash-kpis .kpi:nth-child(4){animation-delay:.15s}
.kpi.acc-green,.kpi.acc-red,.kpi.acc-blue,.kpi.acc-amber{border-right:4px solid}
.kpi.acc-green{border-right-color:#1E9E5A}.kpi.acc-red{border-right-color:#D9463B}
.kpi.acc-blue{border-right-color:#2F6FD6}.kpi.acc-amber{border-right-color:#C77700}
.dash-chart{margin-top:12px;animation:rise .5s ease}
.dash-svg{width:100%;height:170px;display:block;margin-top:6px}
.dash-svg rect{fill:var(--brand-l);stroke:var(--brand);stroke-width:1;transition:fill .2s}
.dash-svg g.today rect{fill:var(--brand)}
.dash-svg g:hover rect{fill:var(--brand-d)}
.dash-svg .bv{font-size:11px;fill:var(--muted);font-weight:600}
.dash-svg .bl{font-size:10px;fill:var(--muted)}
.dash-two{margin-top:12px}
.rank .rk{padding:7px 0;border-bottom:1px dashed var(--line)}.rank .rk:last-child{border-bottom:0}
.rank .rk-t{display:flex;justify-content:space-between;gap:8px;font-size:14px}
.rank .rk-t span{color:var(--muted);font-size:12.5px;white-space:nowrap}
.bar{height:7px;background:var(--brand-l);border-radius:6px;margin-top:5px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--brand);border-radius:6px;transition:width .6s ease}
.bar.red{background:#FBE3E1}.bar.red i{background:#D9463B}
.grid.g3{grid-template-columns:repeat(3,1fr)}
@media(max-width:700px){.dash-hero .dh-big .val{font-size:28px}.grid.g3{grid-template-columns:1fr}}

/* ═══ 🔲 الأزرار الكبيرة (نمط جملتي) ═══ */
.launch{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin:12px 0}
.launch .lc{position:relative;background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);
  min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;cursor:pointer;
  transition:transform .12s,box-shadow .12s,border-color .12s;user-select:none;padding:12px}
.launch .lc:hover{transform:translateY(-2px);border-color:var(--brand);box-shadow:0 8px 20px rgba(14,125,117,.18)}
.launch .lc:active{transform:scale(.98)}
.launch .lc-i{font-size:38px;line-height:1}
.launch .lc-t{font-size:17px;font-weight:700;text-align:center}
.launch .lc-b{position:absolute;top:10px;right:10px}
.launch .lc.locked{opacity:.75}
.launch-primary{width:100%;font-size:22px;font-weight:800;padding:22px 16px;border-radius:16px;margin:8px 0 12px;
  box-shadow:0 8px 24px rgba(14,125,117,.28)}
/* وضع الأزرار: بلا شريط قوائم — الرئيسية هي التنقل، وشريط 🏠 صغير فوق كل شاشة */
body.nav-buttons nav.tabs{display:none}
.homebar{display:flex;align-items:center;gap:10px;padding:10px 14px 0;max-width:1100px;margin:0 auto}
.homebar b{font-size:16px}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--card)}
.seg button{border:0;background:transparent;padding:7px 12px;font:inherit;font-size:13px;cursor:pointer;color:var(--muted)}
.seg button.on{background:var(--brand);color:#fff}
@media(max-width:700px){.launch{grid-template-columns:repeat(2,1fr);gap:10px}.launch .lc{min-height:118px}.launch .lc-i{font-size:34px}.launch-primary{font-size:20px;padding:20px 12px}}
/* 🍎 تلميح الآيفون بصفحة الدخول */
.ioshint{line-height:1.9;background:var(--sunk,#f3f6f5);border:1px solid var(--line,#dfe6e4);border-radius:10px;padding:8px 10px}
.ios-share{display:inline-block;border:1.5px solid currentColor;border-radius:4px;padding:0 5px;font-size:12px;line-height:1.4}
.stmt-range .f{flex:1 1 130px}
.stmt-range .f input{width:100%}

/* 📱 السلة بالموبايل (حسنين 2026-09-16): الجدول چان ينقص السعر والمجموع والحذف عن الشاشة —
   يصير كل سطر بطاقة: الاسم فوق، وتحته الكمية والسعر والمجموع والحذف بصف واحد */
@media(max-width:640px){
  .tw:has(> .cart-t){overflow:visible}
  .cart-t{min-width:0;display:block}
  .cart-t thead{display:none}
  .cart-t tbody{display:block}
  .cart-t tr{display:grid;grid-template-columns:1fr 1fr 1.1fr auto;gap:8px;align-items:end;padding:10px 10px;border-bottom:1px solid var(--line)}
  .cart-t tr:last-child{border-bottom:0}
  .cart-t td{display:block;border:0;padding:0;text-align:right}
  .cart-t td:first-child{grid-column:1/-1}
  .cart-t td[data-l]::before{content:attr(data-l);display:block;font-size:11.5px;color:var(--muted);margin-bottom:2px}
  .cart-t td.n{text-align:center}
  .cart-t td.n input{width:100%!important;max-width:none}
  .cart-t td.del{white-space:nowrap}
}

/* 📱 قوائم البطاقات بالموبايل (m-cards): الزبائن والديون والمجهزون — كل صف بطاقة:
   الاسم فوق، القيم بشبكة عمودين مع تسميتها، والأزرار صف كامل تحت */
@media(max-width:640px){
  .tw:has(> .m-cards){overflow:visible;border:0;background:transparent}
  .m-cards{min-width:0;display:block}
  .m-cards thead{display:none}
  .m-cards tbody{display:grid;gap:10px}
  .m-cards tr{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;padding:12px;background:var(--card);border:1px solid var(--line);border-radius:var(--r)}
  .m-cards td{display:block;border:0;padding:0;text-align:right;font-size:14px}
  .m-cards td:first-child{grid-column:1/-1;font-size:15.5px;padding-bottom:4px;border-bottom:1px dashed var(--line)}
  .m-cards td[data-l]::before{content:attr(data-l) ": ";color:var(--muted);font-size:12px}
  .m-cards td.n{text-align:right}
  .m-cards td.acts{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;padding-top:6px;white-space:normal!important}
  .m-cards td.acts .btn{flex:1 1 auto;text-align:center}
}
/* 📱 جداول قصيرة تنضغط بدل ما تتمرّر (المواد: صورة · اسم · صنف · ماركة) */
@media(max-width:640px){table.fit{min-width:0}table.fit td,table.fit th{padding:8px 6px;font-size:13.5px}}
/* 🐞 التلميح چان يبين للكل: .applink{display:block} تغلب سمة hidden — نصرّح بالإخفاء */
.applink[hidden]{display:none}

/* 📄 صفحة المواد: شريط الفلاتر + لستة/بطاقات + الصفحات (2026-10-02) */
.pl-bar{gap:8px;flex-wrap:wrap;margin-bottom:10px}
.pl-bar select{max-width:180px;min-height:36px;font-size:14px}
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.pcard{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:8px;display:flex;flex-direction:column;gap:6px;cursor:pointer}
.pcard.off{opacity:.6}
.pcard .pc-img{height:110px;border-radius:8px;background:var(--bg);display:flex;align-items:center;justify-content:center;font-size:30px;overflow:hidden}
.pcard .pc-img img{width:100%;height:100%;object-fit:cover}
.pcard .pc-n{font-size:14px;line-height:1.35;color:var(--ink)}
.pcard .pc-s{font-size:12px;color:var(--muted)}
.pager{justify-content:center;gap:12px;margin-top:12px}
.pager .btn[disabled]{opacity:.45;cursor:default}

/* 🗂️ منتقي المادة: أزرار الأصناف + نتائج بسقف ارتفاع + بطاقات أصغر (2026-10-02) */
.ip-cats{margin-top:8px;max-height:84px;overflow:auto}
.ip-cats .chip{cursor:pointer}
.ip-res{margin-top:8px;max-height:52vh;overflow:auto}
.ip-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
.ip-grid .pcard .pc-img{height:84px;font-size:26px}
.ip-grid .pcard .pc-n{font-size:13px}

/* 🎫 بطاقتا باركود الحضور والانصراف — المفتوحة بإطار أخضر، والمقفلة باهتة */
.att-code{flex:1;min-width:250px;border:1.5px solid var(--line);border-radius:14px;padding:12px;text-align:center;background:var(--card)}
.att-code.open{border-color:#2e7d32;box-shadow:0 0 0 3px rgba(46,125,50,.12)}
.att-code.closed{opacity:.72;background:var(--bg)}

/* 🔀 وضع ترتيب الأزرار: تنسحب بدل ما تنفتح — المسحوب يكبر شوي ويتلوّن */
.launch.edit .lc{touch-action:none;cursor:grab;border-style:dashed;border-width:2px}
.launch.edit .lc:hover{transform:none}
.launch.edit .lc.dragging{cursor:grabbing;border-color:var(--brand);border-style:solid;background:#E6F4F2;transform:scale(1.04);
  box-shadow:0 12px 28px rgba(14,125,117,.28);z-index:2}
.launch .lc-grip{position:absolute;top:8px;inset-inline-start:10px;font-size:18px;color:var(--muted,#5C6E6A);opacity:.7}

/* 🏷️ خانة الكمية للمادة الي بلا نكهات: عنوان واضح + الموجود بالمخزن + خانة كبيرة (بدل جدول بشرطات) */
.oneq{border:1.5px solid var(--line);border-radius:14px;padding:12px;margin:8px 0;background:var(--card)}
.oneq-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px;font-size:16px}
.oneq-h .spacer{flex:1}
.oneq-in{width:100%;font-size:22px;font-weight:800;text-align:center;padding:12px;border-radius:12px}

/* ⌨️ منتقي «ضيف مادة» بالكيبورد: المادة المؤشَّرة (تبين بس بعد أول ضغطة كيبورد) + تلميح الأزرار لأجهزة الماوس/الكيبورد فقط */
.ip-res.kb .kb-on{border-color:var(--brand);box-shadow:0 0 0 3px rgba(14,125,117,.28);background:#E6F4F2}
.ip-kbhint{margin-top:4px;font-size:12px}
@media (hover:none){.ip-kbhint{display:none}}

/* 🧾 مستند مطبوع (فاتورة بيع / قائمة شراء) — تصميم ٢، حسنين 2026-10-04: «رتّب الطباعة ما عاجبتني».
   ينبني بـ#vprint (مخفية بالشاشة) وينطبع وحده على A4/A5/Letter. الألوان مو شرط: يقرا صح حتى لو «الخلفيات» مطفية بالطابعة. */
.inv{max-width:190mm;margin:0 auto;font-size:13px;color:#111;background:#fff;position:relative;line-height:1.45;page:inv;
  -webkit-print-color-adjust:exact;print-color-adjust:exact}
.inv table{min-width:0;font-size:inherit}     /* ★ القاعدة العامة table{min-width:560px} چانت تمدّد جدول المجاميع لثلاثة أرباع الورقة */
.inv-h{display:flex;justify-content:space-between;align-items:stretch;gap:14px;margin-bottom:10px}
.inv-co{display:flex;gap:12px;align-items:center;flex:1 1 0;min-width:0}
.inv-co img{max-height:64px;max-width:130px;object-fit:contain}
.inv-name{font-size:24px;font-weight:900;line-height:1.25}
.inv-sub{font-size:11.5px;color:#333;font-weight:400;margin-top:2px}
.inv-t{flex:0 0 auto;min-width:210px;border:2px solid #111;border-radius:10px;overflow:hidden}
.inv-title{font-size:19px;font-weight:900;text-align:center;padding:4px 14px;border-bottom:2px solid #111;background:#eee}
.inv-id{width:100%;border-collapse:collapse}
.inv-id td{padding:4px 10px;border:0;border-top:1px solid #bbb}
.inv-id tr:first-child td{border-top:0}
.inv-id td:first-child{color:#444;white-space:nowrap;width:1%;font-size:12px}
.inv-id td:last-child{font-weight:800;text-align:left;white-space:nowrap}
.inv-info{width:100%;border-collapse:separate;border-spacing:0;border:1.5px solid #111;border-radius:10px;margin-bottom:10px}
.inv-info td{padding:5px 12px;border:0;border-inline-start:1px solid #999;vertical-align:top;white-space:nowrap;width:1%}
.inv-info td:first-child{border-inline-start:0;white-space:normal;width:auto}
.inv-info span{display:block;color:#555;font-size:11px;line-height:1.3}
.inv-info b{font-size:13.5px;font-weight:800}
.inv-tbl{width:100%;border-collapse:collapse}
.inv-tbl th,.inv-tbl td{border:1px solid #333;padding:6px 8px;text-align:right;vertical-align:top}
.inv-tbl th{background:#eee;font-weight:900;font-size:12.5px;border-bottom:2px solid #111}
.inv-tbl td.n,.inv-tbl th.n{text-align:center;white-space:nowrap}
.inv-tbl td:first-child,.inv-tbl th:first-child{width:34px}
.inv-tbl thead{display:table-header-group}
.inv-tbl tr{break-inside:avoid;page-break-inside:avoid}
.inv-words{margin-top:8px;border:1px solid #333;border-radius:8px;padding:6px 12px;break-inside:avoid;page-break-inside:avoid}
.inv-words span{color:#555;font-size:11.5px;margin-inline-end:8px}
.inv-end{display:flex;justify-content:space-between;gap:14px;margin-top:10px;align-items:flex-start;break-inside:avoid;page-break-inside:avoid}
.inv-side{flex:1 1 0;min-width:0}
.inv-acc{width:100%;border-collapse:collapse}
.inv-acc th{border:1px solid #333;border-bottom:2px solid #111;background:#eee;padding:5px 10px;text-align:right;font-size:12px;font-weight:900}
.inv-acc td{border:1px solid #333;padding:6px 10px}
.inv-acc td:first-child{width:38%;color:#333}
.inv-acc td:last-child{font-weight:800;text-align:left;white-space:nowrap}
.inv-note{margin-top:8px;font-size:12.5px}
.inv-sum{flex:0 0 44%;width:44%;border-collapse:collapse}
.inv-sum td{border:1px solid #333;padding:6px 10px}
.inv-sum td:first-child{color:#333}
.inv-sum td:last-child{text-align:left;white-space:nowrap;font-weight:800}
.inv-sum tr.big td{font-size:16px;font-weight:900;border-top:2px solid #111;border-bottom:2px solid #111;background:#eee;color:#111}
.inv-sig{display:flex;justify-content:space-between;margin-top:46px;break-inside:avoid;page-break-inside:avoid}
.inv-sig div{width:28%;border-top:1px solid #111;padding-top:6px;text-align:center;font-size:12.5px}
.inv-foot{margin-top:14px;font-size:10.5px;color:#555;text-align:center}
/* 🖨 كشف الحساب المطبوع (stmt-doc داخل .inv): جداول بحدود كاملة، بلا أزرار ولا شارات ملوّنة */
.stmt-doc .stmt-title{margin:10px 0 8px;font-size:14px}
.stmt-doc .tw{overflow:visible;border:0;box-shadow:none;border-radius:0;margin:0 0 10px}
.stmt-doc table{width:100%;border-collapse:collapse;border:0;border-radius:0}
.stmt-doc .stmt-led th,.stmt-doc .stmt-led td,.stmt-doc .stmt-t th,.stmt-doc .stmt-t td{border:1px solid #333;padding:4px 7px;background:none}
.stmt-doc .stmt-led th,.stmt-doc .stmt-t th,.stmt-doc .stmt-open td,.stmt-doc .stmt-close td{background:#f2f2f2;font-weight:700}
.inv .stmt-led tr:last-child td,.inv .stmt-t tr:last-child td{border-bottom:1px solid #333}
.stmt-doc .btn{display:none!important}
.stmt-doc .tag{background:none;border:0;padding:0;color:#111;font-weight:700;font-size:inherit}
.stmt-doc .hint{color:#444;font-size:11px}
.stmt-doc .stmt-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:0 0 10px}
.stmt-doc .kpi{border:1px solid #333;border-radius:0;box-shadow:none;padding:6px 8px;background:none}
.stmt-doc .kpi .val{font-size:15px}
.stmt-doc tr{break-inside:avoid}
.inv.void::after{content:"ملغاة";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:110px;font-weight:900;color:rgba(200,0,0,.2);transform:rotate(-20deg);pointer-events:none}
/* ★ القاعدة العامة tr:last-child td{border-bottom:0} چانت تشيل الخط السفلي من جداول المستند */
.inv .inv-tbl tr:last-child td,.inv .inv-acc tr:last-child td,.inv .inv-sum tr:last-child td{border-bottom:1px solid #333}
.inv .amt{unicode-bidi:isolate;white-space:nowrap}
/* 💱 دفتران بلا تحويل (2026-10-04): المبلغ معزول الاتجاه وما ينكسر بين الرقم ورمز عملته؛ بطاقة بعملتين = سطر لكل عملة بخط أصغر */
.amt{unicode-bidi:isolate;white-space:nowrap}
.kpi .val.two{font-size:19px;line-height:1.5}
.dash-hero .dh-big .val.two{font-size:24px;line-height:1.3}
.stmt-led{margin-bottom:10px}
@page inv{margin:9mm 8mm}
@media print{body.print-vch{background:#fff!important}}
/* مجاميع الفاتورة بنافذة التفاصيل (الشاشة) */
.sale-sum{margin:8px 0 0;margin-inline-start:auto;max-width:320px;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.sale-sum div{display:flex;justify-content:space-between;gap:12px;padding:6px 12px;border-bottom:1px solid var(--line)}
.sale-sum div:last-child{border-bottom:0}
.sale-sum .big{background:var(--bg);font-size:16px}

/* 🙈 (حسنين 2026-10-03: «بحث ديون الزبائن ما يشتغل بالموبايل») خاصية hidden ترجع لقاعدة المتصفح الضعيفة display:none،
   وأي قاعدة display عندنا تغلبها بصمت (صفوف m-cards بالموبايل display:grid) فالصف «المخفي» يبقى ظاهراً والبحث كأنه ما يشتغل.
   قاعدة عامة تحسم الصنف كله: المخفي مخفي مهما كان عرضه. */
[hidden]{display:none!important}

/* ⏳ قائمة انتظار الزبون (2026-10-06) */
.wl-cell{background:var(--warn-l);border-radius:10px;padding:6px 4px}
.wl-hint{color:var(--warn);font-weight:700}
.wl-cart{border-top:1px solid #EBD7B4;padding-top:10px}
.wl-banner{border-color:#EBD7B4;background:#FFFDF8}
.wl-chip{cursor:pointer}
.wl-done{opacity:.6}
/* صف المنتظر (منو ينتظر / قائمة الزبون): ٣ أزرار بالموبايل تعصر الاسم كلمة كلمة → الأزرار تنزل سطراً تحت الاسم */
.wl-row{flex-wrap:wrap}
.wl-row .t{flex:1 1 170px}
.wl-row .q{flex:0 0 auto;margin-inline-start:auto}
/* جدول المرتجع ٣ أعمدة بس — القاعدة العامة table{min-width:560px} چانت تخليه ينزلق أفقياً داخل النافذة بالموبايل */
.rt-t{min-width:0}

/* ═══════════════════════════════════════════════════════════════════════
   🏺 هوية المذخر (٩ تشرين الأول ٢٠٢٦): لازورد بوابة عشتار + ذهب مزجّج على خزف بارد.
   الجرأة بمكان واحد: «البلاطة المزجّجة» (الدخول والرقم الكبير بالرئيسية). الباقي هادئ.
   طبقة فوگ تصميم بازوكا: تبدّل التوكنز والخطوط بس، ما تمس التخطيط.
   الصورة المعتمدة للاتجاه: https://claude.ai/artifact/BLWeCWCaL5e61TtdZHmaZm
   ═══════════════════════════════════════════════════════════════════════ */
@font-face{font-family:Alexandria;font-style:normal;font-weight:300 700;font-display:swap;
  src:url(/fonts/alexandria-arabic.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF;}
@font-face{font-family:Alexandria;font-style:normal;font-weight:300 700;font-display:swap;
  src:url(/fonts/alexandria-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+2010-2011,U+2018-201D,U+2022,U+2026,U+2190-2193,U+00D7,U+00B7;}
@font-face{font-family:Messiri;font-style:normal;font-weight:700;font-display:swap;
  src:url(/fonts/elmessiri-arabic-700.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF;}
@font-face{font-family:Messiri;font-style:normal;font-weight:700;font-display:swap;
  src:url(/fonts/elmessiri-latin-700.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+2010-2011,U+2018-201D,U+2022,U+2026,U+2190-2193,U+00D7,U+00B7;}

:root{
  --brand:#1d3b8f; --brand-d:#13285f; --brand-l:#e6ecf8;
  --gold:#c8a04a; --gold-l:#f6edd6; --glaze:#2f6fd0;
  --ink:#18213d; --ink2:#2b3658; --muted:#626d8c;
  --line:#dbe0ec; --bg:#eef1f6; --card:#ffffff;
  --ok:#1d7a57; --ok-l:#e2f3ec; --warn:#a8641b; --warn-l:#fbeedb; --bad:#b0303a; --bad-l:#fbe5e7;
  --r:14px;
  --shadow:0 1px 2px rgba(19,40,95,.06), 0 12px 28px -20px rgba(19,40,95,.45);
  --show:Messiri,Alexandria,serif;
  /* البلاطة: نقش البوابة بخطوط ذهبية مدرّجة، بلا صور */
  --tile:linear-gradient(160deg,rgba(255,255,255,.10),rgba(255,255,255,0) 40%),
         repeating-linear-gradient(90deg,rgba(200,160,74,0) 0 46px,rgba(200,160,74,.20) 46px 48px),
         radial-gradient(120% 140% at 100% 0%,#3157b8 0%,#1d3b8f 45%,#13285f 100%);
  --frieze:repeating-linear-gradient(90deg,var(--gold) 0 14px,transparent 14px 18px,var(--gold) 18px 22px,transparent 22px 36px);
}
body{font-family:Alexandria,"Segoe UI",system-ui,Tahoma,sans-serif;font-weight:500;letter-spacing:0}
h1{font-family:var(--show);font-size:24px;letter-spacing:0;color:var(--brand-d)}
h2{font-weight:600}

/* الشريط العلوي: لازورد غامق وحافة ذهبية */
header.top{background:var(--brand-d);box-shadow:0 2px 0 var(--gold),0 8px 20px -12px rgba(19,40,95,.6)}
header.top .logo{font-family:var(--show);font-size:22px;letter-spacing:0;display:flex;align-items:center;gap:9px}
header.top .logo::before{content:"";width:28px;height:28px;border-radius:8px;flex:none;
  background:var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3.5a5 5 0 0 1 7 7l-7 7a5 5 0 0 1-7-7zM7 7l7 7' fill='none' stroke='%2313285f' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/18px no-repeat}
nav.tabs{top:54px;background:rgba(255,255,255,.92);backdrop-filter:saturate(1.4) blur(8px);-webkit-backdrop-filter:saturate(1.4) blur(8px)}
nav.tabs a{font-weight:600;color:var(--ink2)}
nav.tabs a.on{background:var(--brand);box-shadow:inset 0 -3px 0 var(--gold)}

/* الدخول: البلاطة المزجّجة بالخلفية وبطاقة بيضة نظيفة */
.login{background:var(--tile);position:relative}
.login::after{content:"";position:absolute;inset:auto 0 0 0;height:16px;background:var(--frieze);opacity:.85}
.login .box{border-radius:22px;padding:30px 24px 24px;box-shadow:0 30px 70px -20px rgba(8,18,48,.6);position:relative;z-index:1}
.login h1{font-family:var(--show);font-size:34px;color:var(--brand-d);display:flex;flex-direction:column;align-items:center;gap:10px}
.login #loginTitle::before{content:"";width:58px;height:58px;border-radius:16px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3.5a5 5 0 0 1 7 7l-7 7a5 5 0 0 1-7-7zM7 7l7 7' fill='none' stroke='%23c8a04a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/30px no-repeat,var(--tile);
  box-shadow:inset 0 0 0 2px var(--gold),0 10px 24px -10px rgba(19,40,95,.7)}
#lApk{display:none}

/* الرئيسية: الرقم الكبير على البلاطة */
.dash-hero{background:var(--tile);border-radius:20px;padding:22px 24px 34px;position:relative;overflow:hidden;
  box-shadow:0 18px 40px -24px rgba(19,40,95,.8)}
.dash-hero::after{content:"";position:absolute;inset:auto 0 0 0;height:12px;background:var(--frieze);opacity:.85}
.dash-hero .dh-hi{font-family:var(--show);font-size:26px}
.dash-hero .dh-big .val{font-family:var(--show);font-size:44px;font-weight:700;letter-spacing:0}
@media(max-width:700px){.dash-hero .dh-big .val{font-size:34px}}
.kpi .val{font-weight:600}
.kpi.acc-green{border-right-color:var(--ok)}.kpi.acc-red{border-right-color:var(--bad)}
.kpi.acc-blue{border-right-color:var(--glaze)}.kpi.acc-amber{border-right-color:var(--gold)}
.kpi.brand{background:var(--tile);border-color:var(--brand-d)}
.dash-hero,.kpi.brand{box-shadow:0 18px 40px -24px rgba(19,40,95,.8)}

/* الجداول والقوائم */
th{background:#eef2fa;color:var(--ink2);font-weight:600}
tbody tr:hover{background:#f7f9fd}
.item{border-radius:12px}
.btn{font-weight:600;border-radius:12px}
.btn.go{box-shadow:0 8px 18px -10px rgba(29,59,143,.8)}
input,select,textarea{font-weight:500;border-radius:10px}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--glaze);box-shadow:0 0 0 4px rgba(47,111,208,.16)}
:focus-visible{outline:2px solid var(--glaze);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* المذخر: ظلال بازوكا التركوازية المكتوبة باليد */
.launch .lc:hover{box-shadow:0 10px 24px -8px rgba(19,40,95,.28);border-color:var(--glaze)}
.tchk input{accent-color:var(--brand)}
.ip-res.kb .kb-on{box-shadow:0 0 0 3px rgba(47,111,208,.28);background:#e9effb}

/* ═══ واجهة ما قبل الدخول (٩ ت١): البلاطة فوگ، ودفتر الوجبات هو الشي اللي ينذكر؛ الباقي هادئ ═══ */
.login.land{display:block;padding:0;min-height:100vh;background:var(--bg)}
.login.land::after{display:none}
.ln-hero{background:var(--tile);color:#fff;position:relative;padding:0 20px 64px}
.ln-hero::after{content:"";position:absolute;inset:auto 0 0 0;height:14px;background:var(--frieze);opacity:.85}
.ln-bar{max-width:1120px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:18px 0}
.ln-logo{font-family:var(--show);font-size:24px;display:flex;align-items:center;gap:10px}
.ln-logo::before{content:"";width:34px;height:34px;border-radius:10px;flex:none;
  background:var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3.5a5 5 0 0 1 7 7l-7 7a5 5 0 0 1-7-7zM7 7l7 7' fill='none' stroke='%2313285f' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/22px no-repeat}
.ln-go{color:#fff;text-decoration:none;font-weight:600;font-size:14px;padding:8px 16px;border-radius:999px;box-shadow:inset 0 0 0 1.5px rgba(200,160,74,.8)}
.ln-go:hover,.ln-go:focus-visible{background:rgba(200,160,74,.18)}
.ln-grid{max-width:1120px;margin:0 auto;display:grid;gap:28px 48px;align-items:start;
  grid-template-columns:minmax(0,1fr) 380px;grid-template-areas:"copy form" "ledger form";padding-top:28px}
.ln-copy{grid-area:copy}
.login.land .ln-h{font-family:var(--show);font-weight:700;color:#fff;font-size:clamp(34px,5vw,58px);line-height:1.25;margin:0;max-width:16ch}
.login.land .ln-sub{text-align:start;color:rgba(255,255,255,.82);font-size:17px;line-height:1.9;margin:18px 0 0;max-width:52ch}
.login.land #loginForm{grid-area:form;max-width:none;margin:0;position:sticky;top:20px}
.login.land #loginForm h1{font-size:28px}
.ln-ledger{grid-area:ledger;background:rgba(255,255,255,.97);color:var(--ink);border-radius:18px;padding:6px 18px 4px;
  box-shadow:0 30px 60px -28px rgba(5,12,35,.75),inset 0 3px 0 var(--gold);max-width:620px}
.ld-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:14px 0 12px;border-bottom:1px solid var(--line)}
.ld-head b{font-family:var(--show);font-size:19px;color:var(--brand-d)}
.ld-head span{color:var(--muted);font-size:13px}
.ld-row{display:grid;grid-template-columns:minmax(0,1fr) auto 150px;gap:14px;align-items:center;padding:13px 0;border-bottom:1px dashed var(--line);
  animation:ldIn .55s cubic-bezier(.2,.7,.2,1) both}
.ld-row:nth-child(2){animation-delay:.15s}.ld-row:nth-child(3){animation-delay:.3s}.ld-row:nth-child(4){animation-delay:.45s}.ld-row:nth-child(5){animation-delay:.6s}
.ld-n{font-weight:600;font-size:15px;min-width:0}
.ld-n small,.ld-e small{display:block;color:var(--muted);font-weight:500;font-size:12px;margin-top:2px}
.ld-q{font-family:var(--show);font-size:20px;color:var(--brand-d);text-align:center;line-height:1.2}
.ld-q i{display:block;font-style:normal;font-family:Alexandria,sans-serif;font-size:11px;font-weight:600;color:var(--ok);background:var(--ok-l);border-radius:999px;padding:1px 8px;margin-top:3px}
.ld-e span{display:block;height:7px;border-radius:7px;background:var(--line);position:relative;overflow:hidden}
.ld-e span::before{content:"";position:absolute;inset:0 0 0 auto;width:var(--w);border-radius:inherit;background:var(--ok);animation:ldBar 1.1s .7s cubic-bezier(.2,.7,.2,1) both}
.ld-e.warn span::before{background:var(--warn)}.ld-e.bad span::before{background:var(--bad)}
.ld-e.bad small{color:var(--bad);font-weight:600}
.ld-foot{display:flex;justify-content:space-between;gap:10px;padding:14px 0;font-size:13px;color:var(--muted)}
.ld-foot b{color:var(--ink);font-size:15px}
@keyframes ldIn{from{opacity:0;transform:translateY(10px)}}
@keyframes ldBar{from{width:0}}
.ln-feats{max-width:1120px;margin:0 auto;padding:44px 20px 20px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
.login.land .ln-f h3{font-family:var(--show);font-size:21px;color:var(--brand-d);margin:0 0 6px;padding-top:14px;border-top:3px solid var(--gold);display:inline-block}
.login.land .ln-f p{text-align:start;margin:0;color:var(--ink2);font-size:15px;line-height:1.85}
.ln-foot{text-align:center;color:var(--muted);font-size:13px;padding:24px 20px 32px}
@media (max-width:860px){
  .ln-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"copy" "form" "ledger";padding-top:8px}
  .login.land #loginForm{position:static}
  .ln-feats{grid-template-columns:minmax(0,1fr);gap:18px;padding-top:32px}
  .login.land .ln-sub{font-size:15px}
}
@media (max-width:480px){
  .ln-hero{padding:0 16px 52px}
  .ld-row{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}
  .ld-e{grid-column:1 / -1}
  .ld-e small{display:inline}
  .ln-feats{padding-inline:16px}
}
@media (prefers-reduced-motion:reduce){.ld-row,.ld-e span::before{animation:none}}
