:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  /* ألوان الهوية: تُضبط من الإعدادات العامة، وباقي الدرجات مشتقة منها */
  --brand: #9b1c1c;
  --brand-2: color-mix(in srgb, var(--brand) 80%, #ffffff);
  --brand-soft: color-mix(in srgb, var(--brand) 7%, #ffffff);
  --brand-ring: color-mix(in srgb, var(--brand) 45%, #ffffff);
  --navy: #1e293b;
  --ok: #047857;
  --ok-soft: #e7f6ef;
  --warn: #b45309;
  --warn-soft: #fef5e6;
  --bad: #b91c1c;
  --bad-soft: #fdecec;
  --info: #1d4ed8;
  --info-soft: #eaf0fd;
  --radius: 12px;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Tajawal', Tahoma, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: var(--info); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
.boot { padding: 60px; text-align: center; color: var(--muted); }

/* ---------- الهيكل ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #cbd5e1; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { padding: 4px 10px 18px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 12px; }
.brand b { display: block; color: #fff; font-size: 17px; font-weight: 800; }
.brand small { color: #94a3b8; }
.nav a { display: flex; align-items: center; gap: 10px; color: #cbd5e1; padding: 10px 12px; border-radius: 9px; margin-bottom: 2px; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: var(--brand); color: #fff; }
.nav .ico { width: 20px; text-align: center; }
.nav .badge { margin-inline-start: auto; background: #f59e0b; color: #1e293b; border-radius: 99px; font-size: 12px; font-weight: 800; padding: 1px 8px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding: 12px 10px 0; font-size: 13px; }
.side-foot b { color: #fff; display: block; }
.side-foot button { margin-top: 10px; width: 100%; background: transparent; border: 1px solid rgba(255,255,255,.2); color: #e2e8f0; padding: 8px; border-radius: 8px; cursor: pointer; }
.main { padding: 26px 30px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 23px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.mobile-bar { display: none; }

/* ---------- عناصر عامة ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.card h3 { margin: 0 0 12px; font-size: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 9px; padding: 9px 16px; font-weight: 700; cursor: pointer; background: var(--surface-2); color: var(--text); border-color: var(--border); white-space: nowrap; }
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.bad { background: var(--surface); color: var(--bad); border-color: #f3c4c4; }
.btn.warn { background: var(--surface); color: var(--warn); border-color: #f3d9b0; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: transparent; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 5px; }
.field .req { color: var(--bad); margin-inline-start: 3px; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 3px; }
.field.full { grid-column: 1 / -1; }
.in { width: 100%; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--text); }
.in:focus { outline: 2px solid var(--brand-ring); border-color: var(--brand-2); }
textarea.in { resize: vertical; min-height: 70px; }
.err { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: 8px; font-weight: 500; margin: 10px 0; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }

/* الحالات */
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.chip.pending { background: var(--warn-soft); color: var(--warn); }
.chip.approved { background: var(--ok-soft); color: var(--ok); }
.chip.rejected { background: var(--bad-soft); color: var(--bad); }
.chip.returned { background: var(--info-soft); color: var(--info); }
.chip.cancelled { background: #eef0f3; color: var(--muted); }

/* البطاقات الإحصائية */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); cursor: pointer; }
.stat .n { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.stat.hi { border-color: var(--brand); background: var(--brand-soft); }
.stat.hi .n { color: var(--brand); }

/* مسار الاعتماد */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 4px 0; }
.flow .st { position: relative; text-align: center; padding: 0 6px; }
.flow .st::before { content: ''; position: absolute; top: 19px; left: 50%; width: 100%; height: 3px; background: var(--border); z-index: 0; }
.flow .st:first-child::before { display: none; }
.flow .st.done::before, .flow .st.cur::before { background: var(--ok); }
.flow .dot { position: relative; z-index: 1; width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface); border: 3px solid var(--border); color: var(--muted); }
.flow .st.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.flow .st.cur .dot { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.flow .st.bad .dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.flow .st.back .dot { border-color: var(--info); color: var(--info); background: var(--info-soft); }
.flow .t { font-weight: 700; font-size: 13.5px; }
.flow .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.flow .cnt { font-size: 22px; font-weight: 800; color: var(--text); }

/* الجداول */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: right; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #fbfcfe; }
.tbl .num { font-variant-numeric: tabular-nums; }
.filters { display: grid; grid-template-columns: 2fr 1.4fr 1.2fr 1fr 1fr auto; gap: 10px; margin-bottom: 14px; }

/* اختيار نوع النموذج */
.group-t { font-weight: 800; color: var(--muted); font-size: 13px; margin: 18px 0 10px; }
.forms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.form-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; color: var(--text); box-shadow: var(--shadow); transition: .15s; }
.form-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.form-card .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.form-card b { font-size: 14.5px; }

/* محرر الطلب */
.editor { display: grid; grid-template-columns: minmax(330px, 440px) 1fr; gap: 18px; align-items: start; }
.editor .card.sticky { position: sticky; top: 16px; }
.preview-wrap { background: #e5e7eb; border-radius: var(--radius); padding: 18px; overflow: auto; max-height: calc(100vh - 120px); }
.preview-wrap .letter { box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.trows .trow { display: grid; gap: 6px; margin-bottom: 6px; align-items: center; }
.trows .trow .in { padding: 7px 8px; font-size: 13px; }
.tfield { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px; }

/* تفاصيل الطلب */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 10px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 22px 16px 0; border-right: 2px solid var(--border); margin-right: 6px; }
.timeline li:last-child { border-color: transparent; }
.timeline li::before { content: ''; position: absolute; right: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.timeline li.approve::before, .timeline li.submit::before, .timeline li.resubmit::before { background: var(--ok); }
.timeline li.reject::before { background: var(--bad); }
.timeline li.return::before { background: var(--info); }
.timeline .when { color: var(--muted); font-size: 12.5px; }
.timeline .note { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; margin-top: 5px; font-size: 13.5px; white-space: pre-wrap; }
.act-box { border: 2px solid var(--warn); }
.files li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.files { list-style: none; padding: 0; margin: 0 0 10px; }

/* تسجيل الدخول */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--navy) 0%, color-mix(in srgb, var(--brand) 35%, #111111) 100%); }
.login .card { width: 100%; max-width: 400px; padding: 30px; }
.login h1 { margin: 0 0 4px; font-size: 22px; text-align: center; }
.login p { margin: 0 0 22px; text-align: center; color: var(--muted); }
.login .field { margin-bottom: 14px; }
.login .btn { width: 100%; padding: 12px; font-size: 15px; }
.login .flow-mini { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 18px; line-height: 1.8; }

/* نافذة منبثقة */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; padding: 22px; max-height: 92vh; overflow: auto; }
.modal h3 { margin-top: 0; }

.up-bar { position: fixed; bottom: 22px; right: 50%; transform: translateX(50%); z-index: 100; background: var(--navy, #1f2937); color: #fff; border-radius: 10px; padding: 10px 16px 14px; min-width: 300px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 13.5px; }
.up-bar i { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: #22c55e; border-radius: 0 0 10px 10px; transition: width .2s; }
#toast { position: fixed; bottom: 22px; left: 22px; z-index: 99; display: flex; flex-direction: column; gap: 8px; }
/* في صفحة التصفية تظهر الرسائل فوق شريط الإرسال حتى لا تغطي الزر */
body:has(.embed-actions) #toast { bottom: 130px; }
#toast div { background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; animation: tin .2s; }
#toast div.bad { background: var(--bad); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- الخطاب (A4) ---------- */
.letter { width: 210mm; min-height: 297mm; padding: var(--letter-top, 35mm) 14mm 12mm; background: #fff; color: #000; margin: 0 auto; line-height: 1.6; font-size: 15px; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.letter .red, .letter .fill { color: #c00000; }
.letter .dots { color: #888; }
.l-top { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.l-title { text-align: center; text-decoration: underline; color: #c00000; font-size: 23px; font-weight: 800; margin: 18px 0; }
.l-dest { font-weight: 700; line-height: 1.9; margin-bottom: 8px; }
.l-dest-row { display: flex; justify-content: space-between; }
.l-greet { text-align: center; font-weight: 700; margin: 14px 0; }
.l-para { text-align: justify; font-size: 16.5px; line-height: 2.1; }
.l-para.pre { white-space: pre-wrap; }
.l-sec { margin: 14px 0 6px; font-size: 15.5px; text-decoration: underline; }
table.lt { width: 100%; border-collapse: collapse; margin: 10px 0; border: 2px solid #000; }
.lt td, .lt th { border: 1px solid #000; padding: 7px 9px; text-align: right; }
.lt th { background: #f2f2f2; }
.lt.grid td, .lt.grid th { text-align: center; }
.lt td.lbl { background: #f2f2f2; font-weight: 700; width: 19%; }
.lt tr.total td { font-weight: 800; background: #f6f6f6; }
.l-box { border: 2px solid #000; margin-top: 12px; }
.l-box-h { background: #d99694; border-bottom: 2px solid #000; padding: 5px; text-align: center; font-weight: 700; }
.l-box-b { min-height: 110px; padding: 8px 10px; white-space: pre-wrap; }
.l-box-b.small { min-height: 55px; }
.l-mgr-sig { text-align: left; font-weight: 700; margin: 8px 0 4px; }
.l-notes { margin: 12px 0; font-size: 14.5px; }
.l-notes ul { margin: 4px 0; padding-right: 22px; }
.lt.sm td, .lt.sm th { padding: 5px 4px; font-size: 12.5px; }
.l-dec { font-size: 14px; margin-bottom: 4px; }
.l-dec.rej { color: #b91c1c; }
.l-sigs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; text-align: center; font-weight: 700; font-size: 13px; }
.l-sig-line { margin-top: 22px; color: #555; }
.stamp { display: inline-block; margin-top: 8px; border: 2px solid; border-radius: 8px; padding: 4px 10px; font-size: 12px; line-height: 1.5; transform: rotate(-4deg); }
.stamp.ok { color: #047857; border-color: #047857; }
.letter { position: relative; }
.letter:has(.l-qr) { padding-bottom: 38mm; }
.l-qr { position: absolute; bottom: 10mm; left: 14mm; width: 26mm; text-align: center; }
.l-qr img { width: 22mm; height: 22mm; display: block; margin: 0 auto; }
.l-qr small { display: block; font-size: 8px; line-height: 1.3; color: #444; }
.chip.late { background: #fdecec; color: #b91c1c; border: 1px solid #f5b5b5; }
.need-att { background: #fff7e6; border: 1px solid #f3c77a; color: #8a5a00; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 13.5px; }
.embed-card { padding: 0; overflow: hidden; }
.embed-frame { display: block; width: 100%; min-height: 900px; border: 0; background: #fff; }
/* شريط الإرسال ثابت أسفل الشاشة أثناء إدخال التصفية */
.embed-actions { position: sticky; bottom: 0; z-index: 5; margin-bottom: 0; padding: 10px 16px; box-shadow: 0 -4px 14px rgba(0,0,0,.12); }
.embed-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.embed-bar .field { flex: 1; min-width: 200px; margin: 0; }
.embed-bar .btn { padding: 10px 22px; font-size: 15px; white-space: nowrap; }
.settle-snap h3 { font-size: 14px; margin: 10px 0 4px; text-decoration: underline; }
.settle-snap table { width: 100%; border-collapse: collapse; margin: 4px 0; font-size: 12px; }
.settle-snap th, .settle-snap td { border: 1px solid #000; padding: 3px 6px; text-align: right; }
.settle-snap th { background: #f2f2f2; }
.settle-snap .snap-val { font-weight: 700; }
/* إقرار المخالصة */
/* المخالصة صفحة A4 واحدة بالضبط: المحتوى في الأعلى، وسطر الربط والرمز في أسفل الصفحة */
.letter.clearance { padding: 20mm 20mm 12mm; font-size: 17px; height: 297mm; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.letter.clearance .l-title { font-size: 26px; margin: 10mm 0 8mm; }
.c-para { line-height: 2.15; margin: 0 0 5mm; text-align: justify; }
.c-sign { display: grid; gap: 7mm; margin-top: 10mm; font-weight: 700; }
.c-print { display: inline-block; width: 28mm; height: 28mm; border: 1px dashed #999; border-radius: 6px; vertical-align: top; margin-right: 6mm; }
.c-ack { font-weight: 700; margin: 2mm 0 0; }
.c-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8mm; border-top: 1px solid #ddd; padding-top: 3mm; }
.c-link { font-size: 12px; color: #555; flex: 1; }
.c-qr { width: 26mm; text-align: center; flex: none; }
.c-qr img { width: 22mm; height: 22mm; display: block; margin: 0 auto; }
.c-qr small { display: block; font-size: 8px; line-height: 1.3; color: #444; }
.companion-h { margin: 18px 0 8px; font-size: 15px; }
.print-page .letter + .letter { margin-top: 20px; }
/* صفحة A4 مضغوطة (التصفية): أقل هوامش وخط أصغر لتتسع كل البيانات في صفحة واحدة */
.letter.compact { padding: 6mm 7mm; font-size: 11px; line-height: 1.3; }
.letter.compact:has(.l-qr) { padding-bottom: 6mm; }
.letter.compact .l-top { font-size: 11px; }
.letter.compact .l-title { font-size: 16px; margin: 1mm 0 2mm; }
.letter.compact .settle-snap h3 { font-size: 11px; margin: 1.6mm 0 .6mm; }
.letter.compact .settle-snap table { font-size: 10px; margin: 0; }
.letter.compact .settle-snap th, .letter.compact .settle-snap td { padding: 1px 4px; line-height: 1.3; }
.letter.compact .l-sigs { margin-top: 3mm; gap: 4px; font-size: 10px; }
.letter.compact .l-sig-img { max-height: 30px; max-width: 110px; margin-top: 2px; }
.letter.compact .stamp { margin-top: 2px; padding: 2px 6px; font-size: 9px; line-height: 1.35; }
.letter.compact .l-sig-line { margin-top: 10px; }
.letter.compact .l-prep { margin-top: 2mm; font-size: 9px; }
.letter.compact .l-qr { position: static; width: auto; }
.letter.compact .l-qr img { width: 19mm; height: 19mm; }
.l-sig-img { display: block; max-width: 150px; max-height: 60px; margin: 6px auto 0; object-fit: contain; }
.sig-preview { display: flex; align-items: center; justify-content: center; min-height: 90px; border: 1px dashed var(--line, #ccc); border-radius: 8px; background: #fff; margin-bottom: 12px; padding: 8px; }
.sig-preview img { max-width: 260px; max-height: 90px; object-fit: contain; }
.stamp.no { color: #b91c1c; border-color: #b91c1c; }
.l-prep { margin-top: 22px; font-size: 12px; color: #444; }

.print-bar { display: flex; gap: 10px; justify-content: center; padding: 14px; background: var(--navy); position: sticky; top: 0; z-index: 5; }
.print-page { background: #e5e7eb; min-height: 100vh; padding-bottom: 30px; }
.print-page .letter { margin-top: 20px; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .print-bar, #toast { display: none !important; }
  .print-page { background: #fff; padding: 0; }
  .print-page .letter { margin: 0; box-shadow: none; }
  .print-page .letter + .letter { margin-top: 0; break-before: page; }
  .print-page.only-main .letter.clearance, .print-page.only-clear .letter:not(.clearance) { display: none; }
  .print-page.only-clear .letter.clearance { break-before: auto; }
  .letter { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- الجوال ---------- */
@media (max-width: 1100px) {
  .editor, .detail { grid-template-columns: 1fr; }
  .editor .card.sticky { position: static; }
  .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 0 0 auto; width: 260px; z-index: 40; transform: translateX(100%); transition: .2s; }
  .side.open { transform: none; }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 30; }
  .mobile-bar button { background: none; border: 0; color: #fff; font-size: 22px; }
  .main { padding: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .flow .t { font-size: 12px; }
  .preview-wrap { padding: 8px; }
}

/* ---------- لوحة المؤشرات ---------- */
.dash-filters { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-filters label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; }
.dash-filters .in { width: auto; min-width: 150px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.dash-grid .card + .card { margin-top: 0; }
.chart .legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.chart .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.chart-box { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: #edf0f4; stroke-width: 1; }
.chart .base { stroke: #cbd5e1; stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11.5px; font-family: inherit; }
.chart .vlabel { fill: var(--text); font-size: 11.5px; font-weight: 700; font-family: inherit; }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit.on { fill: rgba(15, 23, 42, .045); }
.chart .tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 20px rgba(15,23,42,.12); padding: 8px 12px; font-size: 13px; min-width: 150px; z-index: 3; }
.tip-h { font-weight: 700; margin-bottom: 4px; color: var(--muted); font-size: 12.5px; }
.tip-r { display: flex; align-items: center; gap: 8px; line-height: 1.7; }
.tip-r i { width: 12px; height: 3px; border-radius: 2px; flex-shrink: 0; }
.tip-r b { font-variant-numeric: tabular-nums; }
.tip-r span { color: var(--muted); }
.tip-t { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; font-weight: 700; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hb-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr 70px; gap: 10px; align-items: center; font-size: 13.5px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { background: var(--surface-2); border-radius: 4px; height: 14px; }
.hb-bar { background: var(--s1); height: 100%; border-radius: 4px; min-width: 3px; }
.hb-v { font-weight: 700; font-variant-numeric: tabular-nums; }
.tbl tr.total-row td { font-weight: 800; background: var(--surface-2); }

/* ---------- الإعدادات ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }
.check { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; cursor: pointer; }
.tbl tr.cat-row td { background: var(--soft, #f3f4f6); font-weight: 800; font-size: 13.5px; padding-top: 10px; }
.builder .b-sec { margin: 16px 0 8px; font-size: 15px; border-bottom: 1px solid var(--line, #e5e7eb); padding-bottom: 4px; }
.b-field { display: grid; grid-template-columns: 1fr 130px auto auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.b-field .b-opts { grid-column: 1 / -1; }
.b-rec { display: grid; grid-template-columns: 110px 1fr 1fr auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.b-field .check { padding: 0; font-size: 13px; white-space: nowrap; }
.chip-btn { border: 1px solid var(--line, #d1d5db); background: var(--soft, #f3f4f6); border-radius: 12px; padding: 2px 8px; margin: 2px; font: inherit; font-size: 12.5px; cursor: pointer; }
.perm-box { margin-top: 14px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 14px; }
.perm-box summary { cursor: pointer; font-weight: 700; }
.perm-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; }
.perm-cols .check { padding: 3px 0; font-size: 13px; }
.perm-g { margin: 8px 0 2px; font-size: 12px; color: var(--muted); font-weight: 700; }
@media (max-width: 600px) { .perm-cols { grid-template-columns: 1fr; } }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.info-card { background: var(--info-soft); border-color: #c9d7f8; font-size: 14px; line-height: 1.8; }
.info-card ol { margin: 4px 0; }
.steps { display: flex; flex-direction: column; gap: 8px; }
.step-row { display: grid; grid-template-columns: 30px 1.3fr 1fr auto; gap: 8px; align-items: center; }
.step-row.fixed { grid-template-columns: 30px 1fr; color: var(--muted); }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.save-bar { justify-content: flex-end; margin-top: 16px; position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .step-row { grid-template-columns: 30px 1fr; } .step-row > :nth-child(n+3) { grid-column: 2; } .hb-row { grid-template-columns: 1fr 60px; } .hb-row .hb-l { grid-column: 1 / -1; } }

/* ---------- لوحة المؤشرات والتقرير ---------- */
.kpis .stat { cursor: default; }
.delta { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.delta.up { color: #15803d; }
.delta.down { color: #b45309; }
.chart .xhair { stroke: #94a3b8; stroke-width: 1; stroke-dasharray: 3 3; display: none; }
.chart .xhair.on, .chart .pt.on { display: inline; }
.chart .pt { display: none; }
.report-page { background: #e5e7eb; }
.report { width: 210mm; margin: 20px auto; background: #fff; padding: 12mm; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.report .r-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--brand, #8b1a1a); padding-bottom: 8px; margin-bottom: 14px; }
.report .r-head h1 { margin: 0 0 4px; font-size: 20px; }
.report .r-meta { font-size: 12px; color: var(--muted); text-align: left; }
.report .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.report .stat { box-shadow: none; padding: 10px; }
.report .stat .n { font-size: 22px; }
.report .dash-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.report .card { box-shadow: none; padding: 10px; break-inside: avoid; }
.report .card h3 { font-size: 13.5px; }
.report .tbl td, .report .tbl th { padding: 4px 6px; font-size: 11.5px; }
.report .hb-row { font-size: 11.5px; grid-template-columns: minmax(90px, 40%) 1fr 64px; }
@media print {
  .report-page { background: #fff; }
  .report { margin: 0; box-shadow: none; padding: 8mm; width: auto; }
  .report .tr.click { cursor: default; }
}

/* ---------- الشاشة الافتتاحية وشعار الدخول ---------- */
#splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #f4f4f5 55%, #e7e5e4 100%); transition: opacity .6s ease, transform .6s ease; }
#splash.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
#splash .sp-center { position: relative; text-align: center; }
#splash .sp-logo-wrap { position: relative; width: 230px; height: 230px; margin: 0 auto; overflow: hidden; border-radius: 12px;
  animation: spLogo 1.1s cubic-bezier(.2,.8,.2,1) .25s both; }
#splash .sp-logo { width: 100%; height: 100%; object-fit: contain; display: block; }
#splash .sp-shine { position: absolute; inset: -20% auto -20% -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent); animation: spShine 1s ease-in-out 1.35s both; }
#splash .sp-ring { position: absolute; top: 42%; left: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%;
  border: 2px solid rgba(200, 16, 46, .55); animation: spRing 2.2s ease-out .1s both; }
#splash .sp-ring.r2 { border-color: rgba(17, 17, 17, .25); animation-delay: .45s; }
#splash .sp-app { margin-top: 18px; font-size: 22px; font-weight: 800; color: #111; animation: spUp .6s ease 1.45s both; }
#splash .sp-org { margin-top: 4px; font-size: 14px; color: #6b7280; animation: spUp .6s ease 1.65s both; }
#splash .sp-bar { width: 180px; height: 3px; margin: 18px auto 0; border-radius: 3px; background: #e5e7eb; overflow: hidden; animation: spUp .4s ease 1.7s both; }
#splash .sp-bar i { display: block; height: 100%; width: 0; background: #c8102e; border-radius: 3px; animation: spBar 1.1s ease-in-out 1.8s both; }
@keyframes spLogo { from { opacity: 0; transform: scale(.65) rotate(-10deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes spShine { from { left: -60%; } to { left: 130%; } }
@keyframes spRing { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes spUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spBar { from { width: 0; } to { width: 100%; } }
#splash.reduced *, #splash.reduced { animation: none !important; }
.login-card { animation: loginIn .7s cubic-bezier(.2,.8,.2,1) both; }
.login-logo { display: block; width: 110px; height: 110px; object-fit: contain; margin: -6px auto 8px; }
@keyframes loginIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .login-card { animation: none; } }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; flex: none; }
/* اسم المنصة والوصف: كل جملة في سطر واحد */
.brand { gap: 8px; }
.tool-row { display: grid; grid-template-columns: 1fr 110px auto auto auto auto auto auto; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.tool-row.off { opacity: .55; }
.tool-row .check { padding: 0; font-size: 13px; white-space: nowrap; }
@media (max-width: 900px) { .tool-row { grid-template-columns: 1fr 1fr; } }
.theme-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface); border-radius: 20px; padding: 4px 10px 4px 8px; font-size: 12.5px; cursor: pointer; }
.theme-chip i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.theme-chip i + i { margin-inline-start: -6px; margin-inline-end: 4px; box-shadow: 0 0 0 2px var(--surface); }
input[type="color"] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.brand > div { min-width: 0; }
.brand b, .brand small { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.brand b { font-size: 15px; }
.brand small { display: block; font-size: 11.5px; }
.brand-logo { width: 38px; height: 38px; }

/* ---------- ملف التصفية ---------- */
.case-stages { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.case-st { border: 1px solid #cbd5e1; border-radius: 14px; padding: 2px 10px; font-size: 12.5px; color: #64748b; }
.case-st.done { border-color: #15803d; color: #15803d; font-weight: 700; }
.task-form { margin-bottom: 10px; }
.appendix-wrap .letter + .letter { margin-top: 16px; }
.print-page .letter.appendix { min-height: 0; }
@media print {
  .print-page.only-main .letter.appendix, .print-page.only-clear .letter.appendix { display: none; }
  .print-page.only-app .letter:not(.appendix) { display: none; }
  .print-page.only-app .letter.appendix:first-of-type { break-before: auto; }
}

/* ---------- المسميات والصلاحيات ---------- */
.role-row { display: grid; grid-template-columns: 1fr 220px auto auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.role-row .role-caps { grid-column: 1 / -1; font-size: 12.5px; }
.tri-row { justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 13px; }
.tri-row .tri { width: auto; padding: 3px 6px; font-size: 12.5px; }
@media (max-width: 800px) { .role-row { grid-template-columns: 1fr 1fr; } }
/* تبويبات الإعدادات تنزل لسطر جديد بدل أن تختفي خارج الشاشة */
.tabs { flex-wrap: wrap; row-gap: 2px; overflow: visible; }
.tabs a { white-space: nowrap; }

/* ---------- شريط الإشعارات ---------- */
/* الشريط العلوي الثابت: العناصر في أقصى اليسار */
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 30px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); min-height: 58px; }
.tb-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: inherit; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tb-btn:hover, .tb-btn.on { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.tb-btn.bell { width: 40px; padding: 0; justify-content: center; font-size: 18px; }
.tb-user { display: inline-flex; align-items: center; gap: 9px; padding: 4px 6px 4px 12px; border-radius: 12px; color: inherit; }
.tb-user:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.tb-av { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; flex: none; }
.tb-name { display: flex; flex-direction: column; line-height: 1.25; max-width: 220px; }
.tb-name b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-name small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell-n { position: absolute; top: -6px; left: -6px; background: #ef4444; color: #fff; border-radius: 99px; font-size: 11px; font-weight: 800; min-width: 19px; height: 19px; line-height: 19px; padding: 0 5px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.notif-panel { position: fixed; top: 64px; left: 24px; width: 400px; max-width: calc(100vw - 24px); max-height: calc(100vh - 28px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 50px rgba(15,23,42,.25); z-index: 45; display: flex; flex-direction: column; overflow: hidden; }
.np-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.np-list { overflow: auto; }
.np-item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; color: inherit; }
.np-item:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.np-item.new { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.np-item.new .np-txt b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: middle; }
.np-ic { font-size: 18px; flex: none; width: 24px; text-align: center; }
.np-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13.5px; }
.np-txt span { color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.np-txt small { color: var(--muted); font-size: 11.5px; }
.an-users { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 8px; display: grid; gap: 6px; }
@media (max-width: 1100px) {
  .topbar { top: 47px; padding: 6px 12px; min-height: 50px; z-index: 29; }
  .tb-btn span:not(.bell-n) { display: none; }
  .tb-btn { width: 38px; height: 38px; padding: 0; justify-content: center; font-size: 17px; }
  .tb-name { max-width: 150px; }
  .notif-panel { left: 12px; right: 12px; width: auto; top: 104px; max-height: calc(100vh - 116px); }
}
@media print { .topbar { display: none !important; } }

/* ---------- الدليل الاسترشادي ---------- */
.guide { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.g-toc { position: sticky; top: 16px; display: grid; gap: 2px; }
.g-toc b { margin-bottom: 6px; }
.g-toc a { padding: 7px 8px; border-radius: 8px; color: inherit; cursor: pointer; font-size: 14px; }
.g-toc a:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.g-body { display: grid; gap: 14px; min-width: 0; }
.g-body .card + .card { margin-top: 0; }
.g-sec { line-height: 1.9; scroll-margin-top: 16px; }
.g-sec.mine { border-inline-start: 4px solid var(--brand); }
.g-sec ol, .g-sec ul { padding-inline-start: 22px; margin: 6px 0; }
.g-sec p { margin: 6px 0; }
.g-tip { background: color-mix(in srgb, #f59e0b 12%, transparent); border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: 14px; }
@media (max-width: 900px) { .guide { grid-template-columns: 1fr; } .g-toc { position: static; } }
@media print { .guide { grid-template-columns: 1fr; } .g-toc, .side, .mobile-bar, .page-head .row { display: none !important; } .shell { display: block; } .g-sec { break-inside: avoid; box-shadow: none; } }

/* ---------- ترويسة الشركة أعلى الخطابات ---------- */
.l-head { position: absolute; top: 7mm; left: 12mm; width: calc(100% - 24mm); height: auto; display: block; pointer-events: none; }
.letter.has-head { padding-top: max(var(--letter-top, 35mm), 31mm); }
.letter.compact.has-head { padding-top: 27mm; }
.letter.compact .l-head { top: 5mm; left: 7mm; width: calc(100% - 14mm); }

/* أزرار الشريط العلوي: الرئيسية والإعدادات وتسجيل الخروج */
.tb-btn.icon { width: 40px; padding: 0; justify-content: center; font-size: 17px; }
#logoutBtn:hover { border-color: var(--bad, #dc2626); color: var(--bad, #dc2626); background: color-mix(in srgb, #dc2626 6%, var(--surface)); }
.tb-sep { width: 1px; height: 26px; background: var(--border); margin: 0 4px; }
@media (max-width: 1100px) { .tb-btn.icon { width: 36px; height: 36px; font-size: 15px; } .tb-sep { display: none; } .topbar { gap: 5px; } .tb-name { max-width: 110px; } }
@media (max-width: 480px) { .tb-name { display: none; } }

.modal.yesno { max-width: 360px; text-align: center; }
.modal.yesno p { font-size: 16px; font-weight: 700; margin: 4px 0 18px; }
.modal.yesno .btn { min-width: 90px; justify-content: center; }

/* مسارات الموافقات في الدليل */
.g-grp { margin: 16px 0 8px; color: var(--brand); font-size: 15px; }
.g-route { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.g-route-t { font-weight: 800; margin-bottom: 8px; }
.g-steps { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px 4px; }
.g-step { display: inline-flex; flex-direction: column; justify-content: center; padding: 5px 10px; border-radius: 9px; background: color-mix(in srgb, var(--brand) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); line-height: 1.35; font-size: 13px; position: relative; }
.g-step + .g-step { margin-inline-start: 14px; }
.g-step + .g-step::before { content: '←'; position: absolute; right: -15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.g-step small { color: var(--muted); font-size: 11.5px; }
.g-step.start { background: color-mix(in srgb, #64748b 10%, var(--surface)); border-color: color-mix(in srgb, #64748b 30%, transparent); }
.g-step.task { background: color-mix(in srgb, #0ea5e9 9%, var(--surface)); border-color: color-mix(in srgb, #0ea5e9 30%, transparent); }
.g-step.opt { border-style: dashed; background: var(--surface); }
.g-step.end { background: color-mix(in srgb, #16a34a 10%, var(--surface)); border-color: color-mix(in srgb, #16a34a 35%, transparent); }
@media print { .g-route { break-inside: avoid; } }

/* ملف التصفية بانتظار المخالصة الموقّعة / مغلق */
.chip.waitclr { background: color-mix(in srgb, #f59e0b 16%, transparent); color: #92400e; }
.clr-box { border: 2px solid color-mix(in srgb, #f59e0b 55%, transparent); }
.clr-done { background: color-mix(in srgb, #16a34a 8%, var(--surface)); border-color: color-mix(in srgb, #16a34a 35%, transparent); line-height: 1.9; }

/* عمود تفاصيل الطلب: لا يخرج عن الشاشة، والأسماء الطويلة تلتف */
.detail > * { min-width: 0; }
.files li, .clr-done a, .files a { overflow-wrap: anywhere; min-width: 0; }

/* نافذة قراءة التعميم */
.modal.notice-read { max-width: 560px; }
.nr-head { display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 14px; }
.nr-head h3 { margin: 0 0 4px; font-size: 18px; }
.nr-ic { font-size: 28px; line-height: 1; }
.nr-body { font-size: 15.5px; line-height: 2; white-space: normal; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; }

/* ---------- البريد الداخلي ---------- */
.mail-list { border-top: 1px solid var(--border); }
.mail-row { display: grid; grid-template-columns: 220px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); color: inherit; }
.mail-row:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.mail-row.new { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.mail-row.new .mr-who, .mail-row.new .mr-sub b { font-weight: 800; }
.mr-who, .mr-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.mail-body { font-size: 15.5px; line-height: 2; overflow-wrap: anywhere; }
.mail-att, .mail-readers { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); line-height: 2; }
.mail-prev { opacity: .85; font-size: 14px; line-height: 1.9; }
.to-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.to-chip { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); border-radius: 99px; padding: 2px 6px 2px 10px; font-size: 13px; }
.to-chip button { border: 0; background: none; cursor: pointer; font-size: 15px; color: var(--muted); }
.to-list { max-height: 220px; overflow: auto; display: grid; gap: 4px; margin-top: 6px; }
.mail-compose .field { margin-bottom: 12px; }
@media (max-width: 760px) { .mail-row { grid-template-columns: 1fr auto; } .mr-sub { grid-column: 1 / -1; } }
/* ---------- مركز التعاميم ---------- */
.notice-list { display: grid; gap: 12px; }
.notice-list .card + .card { margin-top: 0; }
.notice-card.new { border-inline-start: 4px solid var(--brand); }
.nc-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.nc-head b { font-size: 16px; }
.nc-head .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-left: 8px; }
.nc-text { color: var(--muted); margin-top: 6px; line-height: 1.8; overflow-wrap: anywhere; }
/* ---------- رمز التحقق ---------- */
.otp-in { font-size: 26px; letter-spacing: 10px; text-align: center; font-weight: 800; }

/* ---------- اللغة الإنجليزية ---------- */
.lang-btn { font-weight: 800; min-width: 40px; justify-content: center; letter-spacing: .5px; }
.lang-login { width: 100%; margin-top: 8px; }
html.lang-en body { font-family: 'Segoe UI', Tajawal, system-ui, sans-serif; }
html.lang-en .notif-panel { left: auto; right: 24px; }
html.lang-en .bell-n { left: auto; right: -6px; }
html.lang-en .g-step + .g-step::before { content: '→'; right: auto; left: -15px; }
html.lang-en .letter, html.lang-en .print-page .letter, html.lang-en .preview-wrap { direction: rtl; text-align: right; font-family: Tajawal, sans-serif; }
@media (max-width: 1100px) { html.lang-en .notif-panel { left: 12px; right: 12px; } }
