/* ============ الواجهة العامة ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* خاصية hidden يجب أن تُخفي دائماً حتى لو كان للعنصر display خاص (flex مثلاً) */
[hidden] { display: none !important; }

html, body {
  direction: rtl;
  font-family: 'Segoe UI', Tahoma, 'Simplified Arabic', Arial, sans-serif;
  background: #eef2f8;
  color: #1c2434;
  min-height: 100%;
}

button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ============ بوابة المصادقة ============ */
#auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: linear-gradient(135deg, #14275e 0%, #1e3f8f 55%, #2b55b8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 30px 16px;
}
.auth-loading { color: #fff; text-align: center; font-size: 17px; font-weight: 700; }
.spinner {
  width: 46px; height: 46px;
  border: 4px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-screen { width: 100%; display: flex; justify-content: center; }
.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 34px 34px 28px;
  width: 100%;
  max-width: 410px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  text-align: center;
  animation: rise .3s ease;
}
.auth-card.wide { max-width: 620px; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.auth-logo { font-size: 52px; margin-bottom: 8px; }
.auth-card h1 { font-size: 25px; color: #14275e; margin-bottom: 6px; }
.auth-sub { font-size: 13.5px; color: #66739a; line-height: 1.6; margin-bottom: 22px; }
.auth-card .fld { text-align: right; margin-bottom: 14px; }
.auth-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 6px; }
.auth-fields .fld { margin-bottom: 0; }
.paste-fld { margin-top: 6px; }
.paste-fld textarea {
  border: 1.5px solid #c9d4ec; border-radius: 9px; padding: 9px 12px;
  font-size: 13px; background: #fbfcff; resize: vertical; font-family: monospace;
}
.auth-card input {
  width: 100%;
  border: 1.5px solid #c9d4ec;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  background: #fbfcff;
  transition: border-color .15s, box-shadow .15s;
}
.auth-card input:focus { outline: none; border-color: #2b55b8; box-shadow: 0 0 0 3px rgba(43,85,184,.15); background: #fff; }
.auth-btn { width: 100%; margin-top: 6px; }
.auth-err { color: #d11; font-size: 13.5px; font-weight: 700; min-height: 18px; margin: 2px 0 8px; }
.link-btn { background: none; border: none; color: #2b55b8; font-size: 13px; cursor: pointer; margin-top: 12px; text-decoration: underline; }
.auth-switch { margin-top: 18px; font-size: 14px; color: #56638a; border-top: 1px solid #eef2fa; padding-top: 16px; }
.auth-switch a { color: #1e3f8f; font-weight: 800; cursor: pointer; text-decoration: underline; }

/* ============ صندوق الحساب في الشريط ============ */
.account-box { display: flex; align-items: center; gap: 10px; }
.account-email { color: #dbe6ff; font-size: 13px; font-weight: 700; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.sync-badge { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.sync-badge.on { background: rgba(16,185,129,.25); color: #b6f7d8; }
.sync-badge.off { background: rgba(255,255,255,.18); color: #ffd9a8; }
.logout-btn { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.logout-btn:hover { background: rgba(255,120,120,.35); }

/* ============ الشريط العلوي ============ */
#topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: linear-gradient(135deg, #14275e 0%, #1e3f8f 60%, #2b55b8 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(20, 39, 94, .35);
}
.brand { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.brand-icon { margin-left: 6px; }
#topbar nav { display: flex; gap: 8px; }
.nav-btn {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: .18s;
}
.nav-btn:hover { background: rgba(255, 255, 255, .25); }
.nav-btn.active { background: #fff; color: #16306e; }

/* ============ الشاشات ============ */
.screen { padding: 26px 34px 60px; max-width: 1500px; margin: 0 auto; }

/* ============ الرئيسية ============ */
.home-hero { text-align: center; margin: 18px 0 30px; }
.home-hero h1 { font-size: 32px; color: #14275e; margin-bottom: 8px; }
.home-hero p { font-size: 16px; color: #56638a; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}
.card {
  background: #fff;
  border-radius: 18px;
  padding: 30px 22px 22px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 4px 18px rgba(23, 43, 99, .08);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
}
.card.c-blue::before   { background: linear-gradient(90deg, #2b55b8, #4f7de0); }
.card.c-orange::before { background: linear-gradient(90deg, #d97706, #f59e0b); }
.card.c-green::before  { background: linear-gradient(90deg, #047857, #10b981); }
.card.c-purple::before { background: linear-gradient(90deg, #6d28d9, #8b5cf6); }
.card.c-teal::before   { background: linear-gradient(90deg, #0e7490, #06b6d4); }
.card.c-slate::before  { background: linear-gradient(90deg, #334155, #64748b); }
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(23, 43, 99, .18); border-color: #2b55b8; }
.card-icon { font-size: 58px; line-height: 1.2; margin-bottom: 10px; }
.card-title { font-size: 21px; font-weight: 800; color: #14275e; margin-bottom: 6px; }
.card-desc { font-size: 14px; color: #66739a; margin-bottom: 16px; min-height: 20px; }
.card-go {
  display: inline-block;
  background: #eef3ff;
  color: #1e3f8f;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 999px;
}
.card:hover .card-go { background: #1e3f8f; color: #fff; }

/* ============ الأزرار ============ */
.btn {
  background: #e8edf7;
  color: #1c2f66;
  border: 1px solid #c9d4ec;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
}
.btn:hover { background: #d8e2f5; }
.btn.primary { background: #1e3f8f; border-color: #1e3f8f; color: #fff; }
.btn.primary:hover { background: #16306e; }
.btn.success { background: #047857; border-color: #047857; color: #fff; }
.btn.success:hover { background: #036548; }
.btn.danger { background: #fde8e8; border-color: #f5b5b5; color: #b91c1c; }
.btn.danger:hover { background: #fbd5d5; }
.btn.ghost { background: transparent; border-color: #b7c3de; }
.btn.big { font-size: 17px; padding: 13px 34px; border-radius: 12px; }
.btn.small { padding: 5px 12px; font-size: 13px; border-radius: 8px; }

/* ============ نموذج التعبئة ============ */
.form-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.form-head h2 { font-size: 24px; color: #14275e; }
.edit-badge {
  background: #fff3cd; color: #92610a; font-size: 13px;
  padding: 3px 12px; border-radius: 999px; vertical-align: middle;
}
.form-section {
  background: #fff;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(23, 43, 99, .06);
  border: 1px solid #e4eaf5;
}
.form-section h3 {
  font-size: 16px;
  color: #1e3f8f;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eef2fa;
}
.fields-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 18px;
}
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font-size: 13.5px; font-weight: 700; color: #45557e; }
.fld input, .fld textarea, .fld select {
  border: 1.5px solid #c9d4ec;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 15px;
  background: #fbfcff;
  color: #111a30;
  transition: border-color .15s, box-shadow .15s;
}
.fld input:focus, .fld textarea:focus, .fld select:focus {
  outline: none;
  border-color: #2b55b8;
  box-shadow: 0 0 0 3px rgba(43, 85, 184, .15);
  background: #fff;
}
/* حقول إنجليزية فقط (رقم الشاصي): اتجاه يسار-يمين وأحرف كبيرة واضحة */
.fld input[data-latin] { direction: ltr; text-align: left; letter-spacing: .5px; }
.fld input[data-latin]::placeholder { direction: rtl; text-align: right; }
/* حقل صورة الطرف داخل النموذج: مربع مثل الصورة الشخصية 1:1 */
.photo-fld .pf-box {
  width: 132px;
  height: 132px;
  margin: 0 auto;
  border: 1.5px dashed #b7c3de;
  border-radius: 12px;
  background: #f6f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.photo-fld .pf-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-fld .pf-empty { font-size: 12.5px; color: #8a97b8; font-weight: 700; }
.photo-fld .pf-btns { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; justify-content: center; }
.photo-fld .pf-btns label.btn { display: inline-block; }

.form-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 14px;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(180deg, rgba(238, 242, 248, 0) 0%, #eef2f8 30%);
}

/* ============ المعاينة ============ */
#screen-preview { padding: 0; max-width: none; }
.preview-bar {
  position: sticky;
  top: 62px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 26px;
  background: #fff;
  border-bottom: 1px solid #dde5f2;
  box-shadow: 0 2px 8px rgba(23, 43, 99, .07);
}
.pv-title { font-size: 17px; font-weight: 800; color: #14275e; }
.pv-spacer { flex: 1; }
.paper-area {
  padding: 30px 10px 60px;
  background: #525b6b;
  min-height: calc(100vh - 130px);
  display: flex;
  justify-content: center;
}
.paper-holder .sheet { box-shadow: 0 8px 40px rgba(0, 0, 0, .45); }

/* ============ سجل العقود ============ */
.archive-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.archive-head h2 { font-size: 24px; color: #14275e; }
.count-badge {
  background: #1e3f8f; color: #fff; font-size: 14px;
  padding: 3px 13px; border-radius: 999px; vertical-align: middle;
}
#archive-search {
  border: 1.5px solid #c9d4ec;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 15px;
  width: 360px;
  max-width: 100%;
  background: #fff;
}
#archive-search:focus { outline: none; border-color: #2b55b8; }
/* تبويبات أقسام السجل */
.arc-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.arc-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid #dbe4f3;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14.5px;
  font-weight: 800;
  color: #2c3d6e;
  cursor: pointer;
  transition: .15s;
  box-shadow: 0 1px 5px rgba(23, 43, 99, .05);
}
.arc-tab:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(23, 43, 99, .12); }
.arc-count {
  background: #eef2fa;
  color: #2c3d6e;
  font-size: 12.5px;
  padding: 1px 10px;
  border-radius: 999px;
  min-width: 28px;
  text-align: center;
}
.arc-tab.active .arc-count { background: rgba(255, 255, 255, .25); color: #fff; }
.arc-tab.all.active { background: #14275e; border-color: #14275e; color: #fff; }
.arc-tab.c-blue { border-color: #b9c8ec; }
.arc-tab.c-blue.active { background: #2b55b8; border-color: #2b55b8; color: #fff; }
.arc-tab.c-orange { border-color: #f2d3a8; }
.arc-tab.c-orange.active { background: #d97706; border-color: #d97706; color: #fff; }
.arc-tab.c-green { border-color: #b3ddcd; }
.arc-tab.c-green.active { background: #047857; border-color: #047857; color: #fff; }
.arc-tab.c-purple { border-color: #d5c3f2; }
.arc-tab.c-purple.active { background: #6d28d9; border-color: #6d28d9; color: #fff; }
.arc-tab.c-teal { border-color: #b0dde8; }
.arc-tab.c-teal.active { background: #0e7490; border-color: #0e7490; color: #fff; }
.arc-tab.c-slate { border-color: #c3ccda; }
.arc-tab.c-slate.active { background: #334155; border-color: #334155; color: #fff; }

.table-wrap {
  background: #fff;
  border-radius: 14px;
  overflow: auto;
  box-shadow: 0 2px 10px rgba(23, 43, 99, .06);
  border: 1px solid #e4eaf5;
}
.archive-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.archive-table th {
  background: #f2f6fd;
  color: #2c3d6e;
  text-align: right;
  padding: 12px 16px;
  font-size: 13.5px;
  border-bottom: 2px solid #e0e8f6;
  white-space: nowrap;
}
.archive-table td { padding: 11px 16px; border-bottom: 1px solid #eef2fa; }
.archive-table tr:hover td { background: #f8fafe; }
.type-chip { font-weight: 800; white-space: nowrap; }
.type-chip.c-blue { color: #1e3f8f; }
.type-chip.c-orange { color: #b45309; }
.type-chip.c-green { color: #047857; }
.type-chip.c-purple { color: #6d28d9; }
.type-chip.c-teal { color: #0e7490; }
.type-chip.c-slate { color: #334155; }
.td-summary { font-weight: 700; }
.td-no { font-weight: 800; color: #1e3f8f; white-space: nowrap; }
.td-when { color: #66739a; font-size: 13px; white-space: nowrap; }
.td-actions { display: flex; gap: 6px; white-space: nowrap; }
.empty-state {
  background: #fff;
  border: 2px dashed #c9d4ec;
  border-radius: 14px;
  padding: 60px 20px;
  text-align: center;
  color: #66739a;
  font-size: 17px;
  font-weight: 700;
}

/* ============ الإعدادات ============ */
.settings-head h2 { font-size: 24px; color: #14275e; margin-bottom: 20px; }
.settings-layout { display: flex; gap: 20px; align-items: flex-start; }
.settings-tabs { display: flex; flex-direction: column; gap: 8px; min-width: 220px; position: sticky; top: 90px; }
.stab {
  background: #fff;
  border: 1.5px solid #dbe4f3;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #2c3d6e;
  cursor: pointer;
  text-align: right;
  transition: .15s;
}
.stab:hover { border-color: #2b55b8; }
.stab.active { background: #1e3f8f; border-color: #1e3f8f; color: #fff; }
.settings-panel {
  flex: 1;
  background: #fff;
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: 0 2px 10px rgba(23, 43, 99, .06);
  border: 1px solid #e4eaf5;
}
.settings-panel h3 { font-size: 17px; color: #1e3f8f; margin: 6px 0 4px; }
.settings-panel .hint { font-size: 13px; color: #66739a; margin-bottom: 14px; }
.s-grid { margin-bottom: 24px; }

/* صفوف إعدادات الترويسة: نص + لون + حجم خط + غامق */
.s-rows { margin-bottom: 24px; }
.sfield-row {
  display: grid;
  grid-template-columns: 1fr 88px 96px 52px 42px;
  gap: 12px;
  align-items: end;
  margin-bottom: 13px;
}
.sf-color, .sf-size, .sf-bold { display: flex; flex-direction: column; gap: 6px; }
.sf-color > span, .sf-size > span, .sf-bold > span { font-size: 12px; font-weight: 700; color: #45557e; }
/* زر الغامق B: مربع اختيار مخفي يفعّل مظهر الزر */
.sf-bold { cursor: pointer; }
.sf-bold input { position: absolute; opacity: 0; pointer-events: none; }
.sf-bold b {
  height: 39px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #c9d4ec;
  border-radius: 9px;
  background: #fbfcff;
  color: #8a97b8;
  font-size: 17px;
  font-weight: 900;
  user-select: none;
  transition: all .15s;
}
.sf-bold input:checked + b {
  background: #2b55b8;
  border-color: #2b55b8;
  color: #fff;
  box-shadow: 0 2px 8px rgba(43, 85, 184, .35);
}
.sf-bold:hover b { border-color: #2b55b8; }
/* صفوف مجموعات نصوص جسم العقد */
.body-row .body-lbl { align-self: center; }
.body-row .body-lbl span { font-size: 13.5px; font-weight: 800; color: #2c3a5e; }
.sf-color input[type=color] {
  width: 100%;
  height: 39px;
  border: 1.5px solid #c9d4ec;
  border-radius: 9px;
  padding: 3px;
  background: #fbfcff;
  cursor: pointer;
}
.sf-size input {
  border: 1.5px solid #c9d4ec;
  border-radius: 9px;
  padding: 9px 8px;
  font-size: 14px;
  background: #fbfcff;
  width: 100%;
}
.sf-size input:focus { outline: none; border-color: #2b55b8; }
.sf-reset { height: 39px; font-size: 17px; }
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.slot-box {
  border: 1.5px solid #dbe4f3;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.slot-preview {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f9ff;
  border: 1.5px dashed #b7c3de;
  border-radius: 9px;
  margin-bottom: 10px;
  overflow: hidden;
}
.slot-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.slot-empty { font-size: 12px; color: #8a97b8; line-height: 1.7; }
.slot-label { font-size: 13px; font-weight: 700; color: #45557e; margin-bottom: 9px; min-height: 34px; }
.slot-size {
  display: grid;
  grid-template-columns: 1fr 1fr 34px;
  gap: 7px;
  align-items: end;
  margin-bottom: 9px;
}
.slot-size label { display: flex; flex-direction: column; gap: 4px; }
.slot-size label > span { font-size: 11px; font-weight: 700; color: #45557e; }
.slot-size input {
  border: 1.5px solid #c9d4ec;
  border-radius: 8px;
  padding: 6px 6px;
  font-size: 13.5px;
  background: #fbfcff;
  width: 100%;
  text-align: center;
}
.slot-size input:focus { outline: none; border-color: #2b55b8; }
.slot-size .btn { height: 32px; padding: 3px 6px; }
.slot-btns { display: flex; gap: 6px; justify-content: center; }
.slot-btns label.btn { display: inline-block; }
.settings-actions { display: flex; gap: 12px; align-items: center; border-top: 1px solid #eef2fa; padding-top: 18px; }

/* المعاينة الحية داخل الإعدادات */
.settings-preview {
  flex: 0 0 365px;
  width: 365px;
  position: sticky;
  top: 84px;
}
.settings-preview h3 { font-size: 16px; color: #1e3f8f; margin-bottom: 2px; }
.settings-preview .hint { font-size: 12px; color: #66739a; margin-bottom: 10px; }
.sp-clip {
  width: calc(210mm * 0.43);
  height: calc(297mm * 0.43);
  overflow: hidden;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(20, 39, 94, .3);
  background: #fff;
}
.sp-inner {
  width: 210mm;
  height: 297mm;
  transform: scale(0.43);
  transform-origin: top right;
}

/* ============ الاقتراحات الذكية ============ */
#suggest-box {
  position: fixed;
  z-index: 300;
  background: #fff;
  border: 1.5px solid #c9d4ec;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 39, 94, .22);
  max-height: 280px;
  overflow-y: auto;
  direction: rtl;
}
.sg-item {
  padding: 9px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f4fb;
  transition: background .1s;
}
.sg-item:last-child { border-bottom: none; }
.sg-item:hover, .sg-item.active { background: #eef3ff; }
.sg-label { font-size: 14.5px; font-weight: 700; color: #14275e; }
.sg-sub { font-size: 12px; color: #66739a; margin-top: 2px; }

/* ============ تفقيط المبالغ ============ */
.money-words {
  font-size: 12.5px;
  font-weight: 700;
  color: #047857;
  min-height: 16px;
}

/* ============ إدارة الصور الشخصية ============ */
.ph-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ph-chip {
  background: #fff;
  border: 1.5px solid #dbe4f3;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #2c3d6e;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ph-chip b { color: #1e3f8f; }
.ph-chip.warn { background: #fff7e6; border-color: #f2d3a8; color: #92610a; }
.ph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.ph-card {
  background: #fff;
  border: 1px solid #e4eaf5;
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(23, 43, 99, .06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ph-img {
  height: 150px;
  background: #f2f5fb;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph-img img { width: 100%; height: 100%; object-fit: contain; }
.ph-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: #56638a; font-weight: 700; }
.ph-size { color: #047857; }
.ph-kind { background: #eef3ff; color: #1e3f8f; padding: 1px 9px; border-radius: 999px; }
.ph-usage { font-size: 12px; font-weight: 700; color: #92610a; background: #fff7e6; border-radius: 8px; padding: 4px 8px; }
.ph-usage.free { color: #56638a; background: #f2f5fb; }

/* ============ نافذة التأكيد الداخلية ============ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(15, 25, 55, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.confirm-box {
  background: #fff;
  border-radius: 18px;
  padding: 28px 30px 24px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  animation: rise .2s ease;
}
.confirm-icon { font-size: 42px; margin-bottom: 10px; }
.confirm-msg { font-size: 16.5px; font-weight: 700; color: #1c2434; line-height: 1.7; margin-bottom: 20px; }
.confirm-btns { display: flex; gap: 12px; justify-content: center; }
.confirm-btns .btn { min-width: 110px; }

/* ============ الطابعة المعتمدة (طباعة مباشرة) ============ */
.printer-card {
  background: #fff;
  border: 1.5px solid #dbe4f3;
  border-radius: 14px;
  padding: 14px 18px 10px;
  margin-bottom: 16px;
}
.printer-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
}
.printer-ico { font-size: 30px; line-height: 1; padding-bottom: 6px; }
.printer-fld { flex: 1; }
.printer-fld select {
  width: 100%;
  border: 1.5px solid #c9d4ec;
  border-radius: 9px;
  padding: 10px;
  font-size: 14.5px;
  background: #fbfcff;
}
.printer-card .hint { font-size: 13px; color: #66739a; margin: 8px 4px 2px; }
.printer-card .hint b { color: #047857; }
/* قائمة اختيار الطابعة عند أول طباعة */
.printer-box { max-width: 460px; }
.printer-list { display: grid; gap: 8px; margin-bottom: 16px; }
.printer-item {
  border: 1.5px solid #c9d4ec;
  border-radius: 11px;
  background: #fbfcff;
  padding: 12px 14px;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
}
.printer-item b { font-size: 15px; color: #14275e; display: block; }
.printer-item span { font-size: 12px; color: #047857; font-weight: 700; }
.printer-item:hover { border-color: #2b55b8; background: #eef3ff; transform: translateY(-1px); }
.printer-item.def { border-color: #9ec3a8; }

/* ============ استوديو الصورة: كاميرا + محرر ============ */
.cam-overlay {
  position: fixed;
  inset: 0;
  z-index: 420;
  background: rgba(15, 25, 55, .62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: fadeIn .15s ease;
}
.cam-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(10, 20, 50, .35);
  width: min(680px, 96vw);
  max-height: 94vh;
  overflow: auto;
  padding: 16px 18px 18px;
  animation: rise .2s ease;
}
.cam-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cam-head b { font-size: 17px; color: #1e3f8f; }
.cam-vid-wrap {
  position: relative;
  background: #101828;
  border-radius: 12px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* المعاينة طبيعية — وتظهر كالمرآة للكاميرا الأمامية فقط، والالتقاط يطابقها تماماً */
.cam-vid-wrap video { width: 100%; max-height: 420px; display: block; }
.cam-vid-wrap video.cam-mirror { transform: scaleX(-1); }
.cam-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: #dbe4f5;
  font-weight: 700;
  font-size: 15.5px;
  text-align: center;
  line-height: 1.8;
  background: #101828;
  padding: 16px;
}
.cam-msg small { font-weight: 400; font-size: 13px; color: #9fb0d0; }
.cam-msg .spinner { margin: 0 auto; }
.cam-msg .cam-msg-file { margin-top: 4px; }
.cam-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-top: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.cam-pick {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: #45557e;
  min-width: 200px;
}
.cam-pick select {
  border: 1.5px solid #c9d4ec;
  border-radius: 9px;
  padding: 9px;
  font-size: 14px;
  background: #fbfcff;
}
.ed-canvas-wrap { text-align: center; }
.ed-canvas-wrap canvas {
  width: min(300px, 70vw);
  border: 2px solid #2b55b8;
  border-radius: 10px;
  background: #eef2fa;
  cursor: grab;
  touch-action: none;
}
.ed-canvas-wrap canvas:active { cursor: grabbing; }
.ed-hint { font-size: 12px; color: #66739a; margin-top: 6px; }
.ed-controls { margin-top: 12px; display: grid; gap: 9px; }
.ed-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #45557e;
}
.ed-row input[type=range] { width: 100%; accent-color: #2b55b8; }
.ed-row span b { color: #2b55b8; }
.ed-btns { flex-direction: row; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ed-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ التنبيهات ============ */
#toast {
  position: fixed;
  bottom: 28px;
  right: 50%;
  transform: translate(50%, 20px);
  background: #14275e;
  color: #fff;
  padding: 13px 30px;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 500; /* فوق كل النوافذ حتى تظهر التنبيهات داخل استوديو الصورة ونوافذ التأكيد */
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
#toast.show { opacity: 1; transform: translate(50%, 0); }
#toast.show.ok { background: #047857; }
#toast.show.err { background: #b91c1c; }

/* ============ الطباعة ============
   عند الطباعة/التصدير: يُلغى تماماً أي تصغير للمعاينة (transform) وأي حشوات،
   فتُرسم الورقة بمقاسها الحقيقي A4 كاملة — على الحاسبة والجوال معاً */
@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { background: #fff !important; width: auto !important; height: auto !important; }
  .no-print, #topbar, .preview-bar, #toast, #mob-drawer, #mob-actions, .msp-fab { display: none !important; }
  #screens, .screen, #screen-preview { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .paper-area { padding: 0 !important; background: #fff !important; min-height: 0 !important; display: block !important; overflow: visible !important; }
  /* إلغاء التصغير وإرجاع الورقة لحجمها الكامل عند الطباعة (لكل المنصّات) */
  .sheet { transform: none !important; zoom: 1 !important; }
  .paper-holder {
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .paper-holder .sheet { box-shadow: none !important; margin: 0 !important; }
}

/* ============ تكييف شاشات الجوال (تطبيق أندرويد) ============
   لا يؤثر على الحاسبة — يعمل فقط تحت عرض 760 بكسل */
@media (max-width: 760px) {
  #topbar { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  #topbar nav { order: 3; width: 100%; display: flex; gap: 6px; }
  #topbar .nav-btn { flex: 1; font-size: 13px; padding: 8px 4px; }
  .account-box { margin-right: auto; }
  .cards-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .fields-grid { grid-template-columns: 1fr !important; }
  .fld[style*="span"] { grid-column: auto !important; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1; min-width: 40%; }
  .preview-bar { flex-wrap: wrap; gap: 6px; }
  .settings-layout { flex-direction: column; }
  .settings-preview { width: 100%; flex: none; position: static; }
  .sfield-row { grid-template-columns: 1fr 70px 70px 44px 36px; gap: 6px; }
  .arc-tabs { flex-wrap: wrap; }
  .table-wrap { overflow-x: auto; }
  .cam-box { width: 96vw; padding: 10px; }
}

/* ============ واجهة الجوال الاحترافية (تطبيق أندرويد فقط) ============
   تُفعّل بفئة body.mobile — نسخة الحاسبة لا تتأثر إطلاقاً */

/* عناصر الجوال مخفية على الحاسبة */
#mob-menu-btn, #mob-actions { display: none; }

/* ---- الأكشن بار الثابت ---- */
body.mobile #topbar {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 120;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  min-height: 54px;
}
body.mobile #screens { padding-top: 54px; }
body.mobile #topbar nav, body.mobile .account-box { display: none !important; }
body.mobile .brand { font-size: 15.5px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.mobile #mob-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 21px;
  cursor: pointer;
  flex: 0 0 auto;
}
body.mobile #mob-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.mob-act {
  width: 40px; height: 40px;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.mob-act.ma-blue { background: #2b6cb8; }
.mob-act.ma-green { background: #0a8754; }
.mob-act.ma-orange { background: #d97706; }
.mob-act:active { transform: scale(.93); }

/* ---- القائمة الجانبية ---- */
#mob-drawer { position: fixed; inset: 0; z-index: 300; }
#mob-drawer .drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 18, 40, .55);
  opacity: 0;
  transition: opacity .22s;
}
#mob-drawer .drawer-panel {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: min(300px, 82vw);
  background: #fff;
  box-shadow: -8px 0 30px rgba(0,0,0,.3);
  transform: translateX(100%);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
  overflow-y: auto;
}
#mob-drawer.open .drawer-backdrop { opacity: 1; }
#mob-drawer.open .drawer-panel { transform: translateX(0); }
.drawer-head {
  background: linear-gradient(135deg, #14275e 0%, #1e3f8f 60%, #2b55b8 100%);
  color: #fff;
  padding: 22px 18px 16px;
  text-align: center;
  margin-bottom: 8px;
}
.drawer-logo { font-size: 40px; margin-bottom: 6px; }
.drawer-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.drawer-email { font-size: 12px; color: #cdd9f5; direction: ltr; margin-bottom: 8px; word-break: break-all; }
.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 20px);
  margin: 3px 10px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  color: #1c2f66;
  cursor: pointer;
  text-align: right;
}
.drawer-item:active { background: #eef3ff; }
.drawer-item.danger { color: #b91c1c; }
.di-ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
}
.di-ico.d-blue { background: #e3ecff; }
.di-ico.d-teal { background: #d9f2ef; }
.di-ico.d-purple { background: #ede3ff; }
.di-ico.d-red { background: #fde8e8; }
.drawer-sep { border-top: 1px solid #eef2fa; margin: 10px 16px; }

/* ---- الرئيسية: مربعات ملونة مناسبة للهاتف ---- */
body.mobile .home-hero { margin: 12px 0 16px; }
body.mobile .home-hero h1 { font-size: 21px; }
body.mobile .home-hero p { font-size: 13px; }
body.mobile .cards-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px;
}
body.mobile .card {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border-radius: 18px;
}
body.mobile .card::before { height: 5px; }
body.mobile .card-icon { font-size: 46px; margin-bottom: 8px; }
body.mobile .card-title { font-size: 15.5px; margin-bottom: 4px; }
body.mobile .card-desc { display: none; }
body.mobile .card-go { font-size: 11.5px; padding: 5px 12px; }

/* ---- شاشات كاملة ونموذج مريح للمس ---- */
body.mobile .screen { padding: 14px 12px 80px; }
body.mobile .form-actions { display: none !important; }
body.mobile .form-head h2 { font-size: 17px; }
body.mobile .fld input, body.mobile .fld select, body.mobile .fld textarea { font-size: 16px; padding: 11px 12px; }
body.mobile .form-section h3 { font-size: 15px; }

/* المعاينة: شريط أدوات مضغوط بأزرار صغيرة */
body.mobile .preview-bar { gap: 5px; padding: 8px; }
body.mobile .preview-bar .btn { padding: 7px 10px; font-size: 12.5px; }
body.mobile .pv-title { font-size: 12px; }

/* ============ الجوال: المعاينة والإعدادات والسجل والقوائم المنبثقة ============ */

/* المعاينة: ورقة واحدة داخل التطبيق — الشريط القديم يُخفى والأزرار في الأكشن بار */
body.mobile .preview-bar { display: none !important; }
body.mobile #screen-preview { padding: 10px 8px 40px; }
body.mobile .paper-area { overflow: hidden; padding: 0; display: flex; justify-content: center; }
body.mobile .paper-holder { box-shadow: 0 6px 24px rgba(20,39,94,.25); border-radius: 6px; }
.mob-act.ma-grey { background: #56638a; }
@media print {
  body.mobile .sheet { transform: none !important; }
  body.mobile .paper-holder { height: auto !important; width: auto !important; overflow: visible !important; }
}

/* الإعدادات: أقسام مطوية أنيقة وصفوف ملائمة للهاتف */
.m-sec {
  background: #fff;
  border: 1.5px solid #dbe4f3;
  border-radius: 14px;
  margin-bottom: 12px;
  padding: 0 14px 10px;
}
.m-sec summary {
  list-style: none;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 800;
  color: #1e3f8f;
  padding: 14px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.m-sec summary::-webkit-details-marker { display: none; }
.m-sec summary::after { content: '▾'; color: #8a97b8; transition: transform .18s; }
.m-sec[open] summary::after { transform: rotate(180deg); }
body.mobile .settings-preview { display: none !important; }
body.mobile .settings-head h2 { font-size: 17px; }
body.mobile .settings-tabs {
  display: flex !important;
  flex-direction: row !important;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 6px;
  width: 100%;
}
body.mobile .settings-tabs .stab { white-space: nowrap; flex: 0 0 auto; }
body.mobile .settings-panel { width: 100%; }
/* صف نص الترويسة: الحقل بعرض كامل ثم أدوات اللون والحجم والغامق تحته */
body.mobile .sfield-row {
  grid-template-columns: 1fr 1fr 56px 42px;
  gap: 8px;
  background: #f7f9fd;
  border-radius: 10px;
  padding: 8px;
}
body.mobile .sfield-row .fld { grid-column: 1 / -1; }
body.mobile .body-row .body-lbl { grid-column: 1 / -1; }
body.mobile .slots-grid { grid-template-columns: 1fr; }
body.mobile .settings-actions { flex-wrap: wrap; gap: 8px; }
body.mobile .settings-actions .btn { flex: 1; min-width: 45%; }

/* سجل العقود: بطاقات بدل الجدول */
body.mobile .archive-head { flex-direction: column; align-items: stretch; gap: 8px; }
body.mobile .archive-head h2 { font-size: 16px; }
body.mobile .arc-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
body.mobile .arc-tab { white-space: nowrap; flex: 0 0 auto; }
body.mobile .table-wrap { overflow: visible; }
body.mobile .archive-table { display: block; border: none; background: transparent; }
body.mobile .archive-table thead { display: none; }
body.mobile .archive-table tbody { display: block; }
body.mobile .archive-table tr {
  display: block;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: 0 3px 12px rgba(23,43,99,.10);
  border: 1.5px solid #e3eaf6;
}
body.mobile .archive-table td { display: inline-block; border: none; padding: 2px 4px; font-size: 12.5px; }
body.mobile .archive-table td.td-summary { display: block; font-size: 15px; font-weight: 800; color: #14275e; }
body.mobile .archive-table td.td-no { font-weight: 800; color: #1e3f8f; }
body.mobile .archive-table td.td-when { color: #66739a; }
body.mobile .archive-table td.td-actions { display: flex; gap: 6px; margin-top: 8px; padding: 0; }
body.mobile .archive-table td.td-actions .btn { flex: 1; padding: 8px 4px; }

/* القائمة المنبثقة (الفئة والمحافظة): بحث + استعراض مثل قوائم الجوال الأصلية */
.sheet-pick { position: fixed; inset: 0; z-index: 350; }
.sheet-pick .sp-back { position: absolute; inset: 0; background: rgba(10,18,40,.55); opacity: 0; transition: opacity .2s; }
.sheet-pick .sp-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 78vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 8px 14px 14px;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .22s ease;
  box-shadow: 0 -10px 40px rgba(0,0,0,.3);
}
.sheet-pick.open .sp-back { opacity: 1; }
.sheet-pick.open .sp-panel { transform: translateY(0); }
.sp-grip { width: 44px; height: 5px; border-radius: 3px; background: #d3dcee; margin: 4px auto 10px; }
.sp-title { font-size: 16px; font-weight: 800; color: #14275e; text-align: center; margin-bottom: 10px; }
.sp-search {
  border: 1.5px solid #c9d4ec;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 16px;
  background: #f7f9fd;
  margin-bottom: 10px;
  font-family: inherit;
}
.sp-search:focus { outline: none; border-color: #2b55b8; }
.sp-list { overflow-y: auto; display: grid; gap: 6px; padding-bottom: 6px; }
.sp-item {
  border: 1.5px solid #e3eaf6;
  border-radius: 11px;
  background: #fff;
  padding: 12px 14px;
  font-size: 15.5px;
  font-weight: 700;
  color: #1c2f66;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
}
.sp-item:active { background: #eef3ff; }
.sp-item.cur { border-color: #2b55b8; background: #eef3ff; color: #1e3f8f; }
.sp-item.sp-clear { color: #b91c1c; background: #fff7f7; border-color: #f5d5d5; }
.sp-none { text-align: center; color: #8a97b8; font-weight: 700; padding: 14px; }


/* ============ الجوال: زر المعاينة العائم داخل الإعدادات ============ */
.msp-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 16px;
  z-index: 130;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #1e3f8f, #2b55b8);
  color: #fff;
  font-size: 23px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(20, 39, 94, .45);
}
body.mobile .msp-fab { display: flex; align-items: center; justify-content: center; }
.msp-fab:active { transform: scale(.92); }
.msp-overlay {
  position: fixed;
  inset: 0;
  z-index: 340;
  background: #1b2542;
  display: flex;
  flex-direction: column;
}
.msp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #14275e;
  color: #fff;
  font-size: 15px;
}
.msp-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 9px;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
.msp-body {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.msp-holder {
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 10px 34px rgba(0,0,0,.45);
}

/* ============ عدّاد الفترة التجريبية / الاشتراك ============
   الاتجاه rtl وكل وحدة زمنية معزولة داخل <bdi> — فيبقى ترتيب العدّاد ثابتاً
   تماماً سواء كان نظام الحاسبة عربياً أو إنجليزياً، ولا تنقلب الأرقام ولا
   تتبدل أماكن الوحدات. tabular-nums تُثبّت العرض فلا يهتزّ مع تغيّر الأرقام */
.trial-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
  direction: rtl;
  unicode-bidi: isolate;
}
.trial-timer .tu { unicode-bidi: isolate; white-space: nowrap; }
.trial-timer b { color: #ffe08a; font-variant-numeric: tabular-nums; }
.trial-timer.ok { background: rgba(16, 185, 129, .28); color: #d1fae5; }
.trial-timer.urgent { background: rgba(220, 38, 38, .35); border-color: rgba(255, 150, 150, .5); }
.trial-timer.urgent b { color: #ffd5d5; }
.trial-timer.danger { background: rgba(220, 38, 38, .45); }

/* القائمة الجانبية للهاتف: مستطيل صغير بالرموز فقط (ي/س/د/ث) —
   بعرض محتواه تماماً فلا يتشوّه ولا تختفي الثواني مهما ضاقت الشاشة */
.drawer-timer.mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
  padding: 4px 8px;
  margin: 6px auto 4px;
  width: fit-content;
  max-width: 100%;
  direction: rtl;
  unicode-bidi: isolate;
}
.drawer-timer.mini.urgent { background: rgba(220, 38, 38, .3); border-color: rgba(255, 160, 160, .5); }
.drawer-timer .dt-val {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: #fff;
  font-size: 13px;
}
.drawer-timer .ts {
  unicode-bidi: isolate;
  background: rgba(255, 255, 255, .92);
  color: #14275e;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.drawer-timer .ts b { font-weight: 900; font-variant-numeric: tabular-nums; }
.drawer-timer.ok { color: #fff; font-size: 14px; font-weight: 800; margin: 6px 0 4px; }

/* ============ الجوال: الإعدادات على مستويين ============
   شاشة اختيار العقد (بطاقات) ← شاشة كاملة لإعدادات ذلك العقد ← رجوع.
   استُبدل بها الشريط الأفقي الذي كان يتشوّه ويرجع لأول عقد عند السحب */
.set-hint { margin: 2px 0 14px; }
.set-cards { display: grid; gap: 10px; }
.set-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #fff;
  border: 1.5px solid #dbe4f3;
  border-radius: 14px;
  padding: 14px 16px 14px 14px;
  text-align: right;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(20, 45, 110, .05);
  transition: background .15s, transform .1s;
}
.set-card::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 6px;
}
.set-card.c-blue::before   { background: linear-gradient(180deg, #2b55b8, #4f7de0); }
.set-card.c-orange::before { background: linear-gradient(180deg, #d97706, #f59e0b); }
.set-card.c-green::before  { background: linear-gradient(180deg, #047857, #10b981); }
.set-card.c-purple::before { background: linear-gradient(180deg, #6d28d9, #8b5cf6); }
.set-card.c-teal::before   { background: linear-gradient(180deg, #0e7490, #06b6d4); }
.set-card.c-slate::before  { background: linear-gradient(180deg, #334155, #64748b); }
.set-card:active { background: #f2f7ff; transform: scale(.985); }
.sc-icon { font-size: 26px; flex: 0 0 auto; line-height: 1; }
.sc-txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sc-txt b { font-size: 15.5px; font-weight: 800; color: #14357e; }
.sc-txt small { font-size: 12px; color: #7c89a8; font-weight: 600; }
.sc-go { flex: 0 0 auto; color: #c3cfe4; font-size: 15px; font-weight: 900; }

/* ترويسة إعدادات العقد بشاشة كاملة (جوال) — ثابتة أعلى الشاشة */
.settings-head.mob {
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f1f4f9;
  padding: 8px 0;
  margin-bottom: 6px;
  border-bottom: 1.5px solid #e2e9f5;
}
.settings-head.mob h2 { font-size: 17px; margin: 0; flex: 1 1 auto; }
.set-back {
  flex: 0 0 auto;
  font-size: 19px;
  font-weight: 900;
  padding: 6px 14px;
  line-height: 1;
}

/* رقم الإصدار — للتأكد بنظرة أن النسخة المنصَّبة هي الجديدة */
.app-ver {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, .75);
  letter-spacing: .3px;
}
.ver-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #14357e;
  background: #eaf1ff;
  border: 1.5px solid #cfe0fb;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

/* ============ تبويبات الدخول / حساب جديد ============ */
.auth-tabs {
  display: flex;
  gap: 6px;
  background: #eef2fa;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  color: #66739a;
  cursor: pointer;
  transition: .15s;
}
.auth-tab.active { background: #fff; color: #1e3f8f; box-shadow: 0 2px 8px rgba(20, 39, 94, .15); }

/* ============ رسالة الترحيب المتحركة ============ */
#welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: linear-gradient(135deg, #14275e 0%, #1e3f8f 55%, #2b55b8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: wlFade .3s ease;
}
@keyframes wlFade { from { opacity: 0; } }
.wl-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 40px 30px 30px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  animation: wlPop .5s cubic-bezier(.22, 1.2, .36, 1);
  overflow: hidden;
}
@keyframes wlPop { from { opacity: 0; transform: scale(.7) translateY(30px); } }
.wl-burst {
  position: absolute;
  top: -60px; left: 50%;
  width: 300px; height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(43,85,184,.18), transparent 62%);
  animation: wlSpin 8s linear infinite;
}
@keyframes wlSpin { to { transform: translateX(-50%) rotate(360deg); } }
.wl-emoji { font-size: 72px; line-height: 1; animation: wlBounce 1s ease infinite alternate; position: relative; }
@keyframes wlBounce { to { transform: translateY(-12px); } }
.wl-title { font-size: 30px; color: #14275e; margin: 12px 0 6px; position: relative; }
.wl-sub { font-size: 15px; color: #56638a; margin-bottom: 18px; position: relative; }
.wl-badge {
  display: inline-block;
  background: linear-gradient(90deg, #047857, #10b981);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(4, 120, 87, .4);
  position: relative;
  animation: wlGlow 1.6s ease infinite;
}
@keyframes wlGlow { 50% { box-shadow: 0 8px 30px rgba(16, 185, 129, .7); } }
.wl-email { font-size: 13px; color: #8a97b8; font-weight: 700; margin: 16px 0 4px; position: relative; }
.wl-btn { width: 100%; margin-top: 10px; position: relative; }

/* ============ تحكم المسافات في الإعدادات ============ */
.body-offset {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eaf1ff;
  border: 1.5px solid #c9d9f5;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.body-offset .bo-lbl { flex: 1; font-size: 13.5px; font-weight: 800; color: #1e3f8f; }
.body-offset input {
  width: 84px;
  border: 1.5px solid #c9d4ec;
  border-radius: 9px;
  padding: 8px;
  font-size: 15px;
  text-align: center;
  background: #fff;
}
.body-card {
  background: #f7f9fd;
  border: 1.5px solid #dbe4f3;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.body-card-title { font-size: 14px; font-weight: 800; color: #2c3a5e; margin-bottom: 8px; }
.body-card-ctrls {
  display: grid;
  grid-template-columns: 74px 96px 100px 52px 40px;
  gap: 10px;
  align-items: end;
}
.body-card-ctrls .bcc { display: flex; flex-direction: column; gap: 5px; }
.body-card-ctrls .bcc > span { font-size: 11.5px; font-weight: 700; color: #45557e; }
.body-card-ctrls .bcc input[type=color] {
  width: 100%; height: 38px; border: 1.5px solid #c9d4ec; border-radius: 9px; padding: 3px; background: #fff; cursor: pointer;
}
.body-card-ctrls .bcc input[type=number] {
  width: 100%; border: 1.5px solid #c9d4ec; border-radius: 9px; padding: 8px 6px; font-size: 14px; background: #fff; text-align: center;
}
.body-card-ctrls .sf-bold b {
  height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #c9d4ec; border-radius: 9px; background: #fff; color: #8a97b8; font-size: 16px; font-weight: 900;
}
.body-card-ctrls .sf-reset { height: 38px; }

/* الجوال: أعمدة أضيق */
body.mobile .body-card-ctrls { grid-template-columns: 1fr 1fr 1fr 46px 38px; gap: 7px; }
body.mobile .body-offset { flex-wrap: wrap; }

/* ============ نافذة عدد النسخ ============ */
.copies-box { max-width: 340px; }
.copies-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 6px 0 20px;
}
.copies-btn {
  width: 48px; height: 48px;
  border: none;
  border-radius: 12px;
  background: #eef3ff;
  color: #1e3f8f;
  font-size: 26px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
}
.copies-btn:active { background: #d8e2f5; }
.copies-row input {
  width: 84px;
  height: 54px;
  border: 2px solid #c9d4ec;
  border-radius: 12px;
  font-size: 26px;
  font-weight: 900;
  text-align: center;
  color: #14275e;
  background: #fbfcff;
}
.copies-row input:focus { outline: none; border-color: #2b55b8; }

/* ============ محرّر بنود/شروط العقد ============ */
.clauses-box { display: grid; gap: 10px; margin-bottom: 12px; }
.clause-row {
  display: grid;
  grid-template-columns: 30px 1fr 40px;
  gap: 8px;
  align-items: start;
  background: #f7f9fd;
  border: 1.5px solid #dbe4f3;
  border-radius: 12px;
  padding: 8px;
}
.clause-num {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: #1e3f8f; color: #fff;
  border-radius: 8px;
  font-weight: 900; font-size: 14px;
  margin-top: 2px;
}
.clause-ta {
  border: 1.5px solid #c9d4ec;
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 14px;
  background: #fff;
  resize: vertical;
  line-height: 1.6;
  font-family: inherit;
}
.clause-ta:focus { outline: none; border-color: #2b55b8; }
.clause-del { height: 34px; margin-top: 2px; }

/* ============ الخيارات العامة: الشهود + العلامة المائية ============ */
.gopt-box { display: grid; gap: 14px; }
.gopt-toggle {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f2f7ff; border: 1.5px solid #cfe0fb; border-radius: 12px;
  padding: 12px 14px; cursor: pointer; line-height: 1.6;
}
.gopt-toggle input[type=checkbox] { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; cursor: pointer; }
.gopt-toggle b { font-size: 15px; color: #14357e; }
.gopt-wm {
  background: #f7f9fd; border: 1.5px solid #dbe4f3; border-radius: 12px; padding: 12px 14px;
}
.gopt-wm-head { font-weight: 800; color: #14357e; margin-bottom: 10px; font-size: 14.5px; }
.gopt-wm-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.wm-preview {
  width: 120px; height: 120px; flex: 0 0 auto;
  border: 1.5px dashed #b9c6e2; border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  /* رقعة شطرنج خفيفة لإظهار الشفافية */
  background-image:
    linear-gradient(45deg, #eef2f9 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f9 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f9 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.wm-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.wm-preview span { color: #8a97b8; font-size: 12px; text-align: center; padding: 6px; }
.gopt-wm-ctrls { display: grid; gap: 12px; flex: 1 1 220px; }
.wm-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.wm-op { display: grid; gap: 6px; }
.wm-op > span { font-size: 13.5px; color: #33405c; }
.wm-op small { color: #8a97b8; }
.wm-op b { color: #14357e; }
.wm-op input[type=range] { width: 100%; accent-color: #2b55b8; }


/* ============ هوية لونية محسّنة — الإصدار 1.0.6 ============ */
:root {
  --brand-navy: #16324f;
  --brand-blue: #245f8f;
  --brand-sky: #4a90b8;
  --brand-gold: #d7a84d;
  --brand-cream: #f7f3ea;
  --brand-ink: #193047;
  --brand-muted: #66788a;
}
html, body { background: linear-gradient(180deg, #f4f7f9 0%, #edf2f5 100%); color: var(--brand-ink); }
#auth-gate,
#topbar,
.drawer-head {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 58%, var(--brand-sky) 100%);
}
#topbar { box-shadow: 0 3px 18px rgba(22,50,79,.28); }
.auth-card { border: 1px solid rgba(36,95,143,.10); box-shadow: 0 24px 60px rgba(12,38,61,.28); }
.auth-card h1, .home-hero h1, .card-title, .form-head h2, .settings-head h2 { color: var(--brand-navy); }
.auth-sub, .home-hero p, .card-desc { color: var(--brand-muted); }
.auth-card input:focus, .fld input:focus, .fld textarea:focus, .fld select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(36,95,143,.14);
}
.btn.primary { background: var(--brand-blue); border-color: var(--brand-blue); }
.btn.primary:hover { background: var(--brand-navy); }
.nav-btn.active { color: var(--brand-navy); }
.card { box-shadow: 0 6px 22px rgba(22,50,79,.08); }
.card:hover { border-color: var(--brand-blue); box-shadow: 0 15px 34px rgba(22,50,79,.16); }
.card.c-blue::before { background: linear-gradient(90deg, var(--brand-navy), var(--brand-sky)); }
.card.c-orange::before { background: linear-gradient(90deg, #b57b2c, var(--brand-gold)); }
.card.c-green::before { background: linear-gradient(90deg, #34725f, #64a58e); }
.card.c-purple::before { background: linear-gradient(90deg, #665487, #947eb8); }
.card.c-teal::before { background: linear-gradient(90deg, #267b82, #58a9ad); }
.card.c-slate::before { background: linear-gradient(90deg, #40586c, #718596); }
.card-go { background: #eaf2f7; color: var(--brand-blue); }
.card:hover .card-go { background: var(--brand-blue); }
.form-section { border-color: #dfe8ee; box-shadow: 0 3px 14px rgba(22,50,79,.055); }
.form-section h3 { color: var(--brand-blue); border-bottom-color: #e7eef3; }
.ver-chip { color: var(--brand-navy); background: #edf5f8; border-color: #cfe0e8; }
.sync-badge.on { background: rgba(65,154,126,.28); color: #d8fff1; }
.drawer-item { color: var(--brand-navy); }
.drawer-item:active { background: #edf4f7; }
.developer-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e6edf2;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #6a7c8d;
  font-size: 12.5px;
}
.developer-footer b { color: var(--brand-navy); }
.developer-footer a { color: var(--brand-blue); font-weight: 800; text-decoration: none; direction: ltr; }
.developer-card {
  margin: 12px auto 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
}
.developer-card a { color: #fff; font-weight: 800; text-decoration: none; direction: ltr; }
.about-developer {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #eef5f8);
  border: 1px solid #d9e6ec;
  box-shadow: 0 5px 18px rgba(22,50,79,.07);
  display: flex;
  align-items: center;
  gap: 12px;
}
.about-developer .about-dev-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-blue));
  color: #fff; font-size: 20px;
}
.about-developer > div:nth-child(2) { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.about-developer b { color: var(--brand-navy); font-size: 14px; }
.about-developer span { color: var(--brand-muted); font-size: 12px; }
.about-developer a { color: var(--brand-blue); font-weight: 900; text-decoration: none; direction: ltr; }
@media (max-width: 640px) {
  .developer-footer { font-size: 12px; }
  .about-developer { padding: 12px; }
}


/* ===== ثيم الماس الداكن v1.1.0 ===== */
:root{
  --bg:#0b1020; --surface:#121a2f; --surface2:#18223a; --line:#2b3858;
  --text:#f4f7ff; --muted:#aeb9d2; --primary:#5b8cff; --primary2:#7c5cff;
  --success:#27c59a; --danger:#ff6b7a; --gold:#f5c451;
}
html,body{background:radial-gradient(circle at top right,#18264b 0,#0b1020 44%,#070b15 100%) fixed;color:var(--text)}
#auth-gate{background:radial-gradient(circle at 85% 10%,#274b93 0,#131d3c 38%,#080d1b 100%)}
.auth-card,.card,.form-section,.archive-wrap,.settings-section,.modal-card,.preview-actions,.empty-state{
  background:rgba(18,26,47,.96)!important;color:var(--text)!important;border:1px solid rgba(119,145,205,.20)!important;
  box-shadow:0 18px 50px rgba(0,0,0,.28)!important;
}
.auth-card h1,.home-hero h1,.card-title,.form-head h2,.form-section h3,.settings-section h3{color:var(--text)!important}
.auth-sub,.home-hero p,.card-desc,.auth-switch,.fld>span,.hint,.muted{color:var(--muted)!important}
#topbar{background:linear-gradient(120deg,#101a33,#1c3163 58%,#35276f);box-shadow:0 5px 25px rgba(0,0,0,.38)}
.nav-btn{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.14)}
.nav-btn.active{background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;border-color:transparent}
.card{background:linear-gradient(155deg,rgba(25,36,62,.98),rgba(14,21,39,.98))!important}
.card:hover{border-color:var(--primary)!important;box-shadow:0 18px 40px rgba(42,88,190,.28)!important}
.card-go{background:rgba(91,140,255,.14);color:#bcd1ff}.card:hover .card-go{background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff}
input,textarea,select,.auth-card input,.paste-fld textarea{
  background:#0e1629!important;color:var(--text)!important;border:1px solid #334366!important;
}
input::placeholder,textarea::placeholder{color:#7583a4}
input:focus,textarea:focus,select:focus,.auth-card input:focus{border-color:var(--primary)!important;box-shadow:0 0 0 3px rgba(91,140,255,.17)!important;background:#111b31!important}
.btn{background:#202d49;color:#e9efff;border-color:#354667}.btn:hover{background:#2a3a5d}
.btn.primary{background:linear-gradient(135deg,var(--primary),var(--primary2));border-color:transparent}.btn.primary:hover{filter:brightness(1.08)}
.btn.success{background:linear-gradient(135deg,#18a980,var(--success));border-color:transparent}
.btn.danger{background:rgba(255,107,122,.13);color:#ff9aa5;border-color:rgba(255,107,122,.35)}
.form-section h3{border-bottom-color:#293654!important}.edit-badge{background:rgba(245,196,81,.14);color:#ffd978}
.drawer-panel{background:#0e1629!important;color:var(--text)!important}.drawer-head{background:linear-gradient(145deg,#17264b,#302469)!important}.drawer-item{color:#eaf0ff!important;border-bottom-color:#202d49!important}.drawer-item:hover{background:#17233d!important}
.sync-badge.on{background:rgba(39,197,154,.14);color:#7ce7c5}.developer-card{background:rgba(255,255,255,.07)!important;border-color:rgba(255,255,255,.12)!important}
.archive-table,.archive-table th,.archive-table td{border-color:#2a3858!important}.archive-table th{background:#18243f!important;color:#dfe8ff!important}.archive-table tr:hover td{background:#17223b!important}
#toast{background:#111a2e!important;color:#fff!important;border:1px solid #334366!important}
@media(max-width:700px){.screen{padding:18px 14px 50px}.card{border-radius:16px}.home-hero h1{font-size:26px}}

/* ===== منصة الماس لإدارة المعارض والعقارات v2.0 ===== */
#topbar{gap:14px;padding-inline:18px}
#topbar .brand{white-space:nowrap;font-size:17px}
#topbar nav{overflow-x:auto;scrollbar-width:none;max-width:60vw;padding-bottom:2px}
#topbar nav::-webkit-scrollbar{display:none}
#topbar .nav-btn{padding:8px 12px;font-size:13px;white-space:nowrap}
.biz-hero{display:flex;justify-content:space-between;align-items:center;gap:25px;padding:28px;border-radius:24px;background:linear-gradient(135deg,rgba(29,49,98,.96),rgba(55,38,114,.92));border:1px solid rgba(123,150,222,.22);box-shadow:0 18px 45px rgba(0,0,0,.24);margin-bottom:22px}
.biz-hero p{color:#8fb4ff;font-weight:800;margin-bottom:5px}.biz-hero h1{font-size:30px;margin-bottom:7px}.biz-hero span{color:#c2cbe0}.hero-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:14px;margin-bottom:20px}.kpi-card{border:1px solid rgba(116,143,205,.2);border-radius:18px;padding:18px;background:linear-gradient(155deg,#17223d,#10182c);color:#fff;display:flex;align-items:center;gap:13px;text-align:right;cursor:pointer;box-shadow:0 8px 22px rgba(0,0,0,.18);transition:.18s}.kpi-card:hover{transform:translateY(-3px);border-color:#5b8cff}.kpi-card>span{width:46px;height:46px;display:grid;place-items:center;border-radius:14px;background:rgba(255,255,255,.08);font-size:24px}.kpi-card div{display:grid;gap:2px}.kpi-card b{font-size:21px;line-height:1.2}.kpi-card small{color:#adb9d2}.kpi-card.blue>span{color:#8db0ff}.kpi-card.cyan>span{color:#72e3ee}.kpi-card.purple>span{color:#c09aff}.kpi-card.green>span{color:#78e6c5}.kpi-card.amber>span{color:#ffd77c}
.dash-layout{display:grid;grid-template-columns:1fr 1fr;gap:16px}.biz-panel{background:linear-gradient(155deg,rgba(20,30,53,.98),rgba(13,20,36,.98));border:1px solid rgba(117,143,203,.18);border-radius:20px;padding:18px;box-shadow:0 9px 26px rgba(0,0,0,.18)}.biz-panel.span2{grid-column:span 2}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.panel-head h2{font-size:18px}.text-btn{border:0;background:none;color:#8fb4ff;font-weight:800;cursor:pointer}.dash-contracts{display:grid;grid-template-columns:repeat(4,1fr);gap:11px}.dash-contract{border:1px solid #2d3b5d;background:#131d34;color:#fff;border-radius:15px;padding:15px 10px;display:grid;gap:5px;place-items:center;cursor:pointer}.dash-contract:hover{border-color:#648ff8;background:#1a2949}.dash-contract>span{font-size:30px}.dash-contract small{color:#9daccc}.mini-items,.follow-list{display:grid;gap:8px}.mini-items button,.follow-list button{border:1px solid #263552;background:#10192e;color:#fff;border-radius:13px;padding:10px;display:flex;align-items:center;gap:10px;text-align:right;cursor:pointer}.mini-items button:hover,.follow-list button:hover{border-color:#587fdb}.mini-items button>span{width:48px;height:42px;border-radius:10px;background:#1d2a48;display:grid;place-items:center;overflow:hidden;font-size:23px;flex:0 0 auto}.mini-items img{width:100%;height:100%;object-fit:cover}.mini-items div,.follow-list div{display:grid;gap:2px;flex:1}.mini-items small,.follow-list span{color:#9eadc9}.mini-items .status{margin-right:auto}.follow-list time{color:#ffd27a;font-size:12px;direction:ltr}.mini-empty{padding:28px 10px;text-align:center;color:#8f9db9}
.biz-page-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:18px}.biz-page-head h1{font-size:27px;margin-bottom:5px}.biz-page-head p{color:#aab6cd}.biz-tools{display:grid;grid-template-columns:minmax(220px,1fr) 190px auto;gap:10px;align-items:center;margin-bottom:16px}.biz-tools.multi{grid-template-columns:minmax(220px,1fr) 145px 145px auto}.biz-tools input,.biz-tools select{height:44px;border-radius:12px;padding:0 13px}.result-count{color:#a8b7d3;white-space:nowrap;font-weight:700}
.stock-list{display:grid;gap:12px}.stock-card{display:grid;grid-template-columns:125px minmax(220px,1fr) 210px auto;gap:15px;align-items:center;padding:14px;background:linear-gradient(155deg,#151f37,#0f1729);border:1px solid #273653;border-radius:18px}.stock-img{height:100px;border-radius:13px;background:#1b2845;overflow:hidden;display:grid;place-items:center;font-size:42px}.stock-img img{width:100%;height:100%;object-fit:cover}.stock-main{display:grid;gap:8px}.stock-title{display:flex;align-items:center;justify-content:space-between;gap:9px}.stock-title h3{font-size:19px}.stock-main p{color:#aab6cd}.stock-tags{display:flex;gap:7px;flex-wrap:wrap}.stock-tags span{background:#1c2945;border:1px solid #2a3a5d;border-radius:999px;padding:4px 9px;color:#b7c4dd;font-size:12px}.stock-price{display:grid;gap:5px;text-align:center;border-inline:1px solid #273653;padding-inline:13px}.stock-price b{font-size:20px;color:#90b2ff}.stock-price small{color:#9daac4}.stock-price em{font-style:normal;font-size:12px;font-weight:800}.positive{color:#66e4bb}.negative{color:#ff8a96}.stock-actions{display:flex;gap:6px;align-items:center}
.status{font-style:normal;font-size:11px;font-weight:900;padding:4px 9px;border-radius:999px;white-space:nowrap}.status.open{background:rgba(39,197,154,.13);color:#6ce4bf}.status.hold{background:rgba(245,196,81,.13);color:#ffd571}.status.warn{background:rgba(255,139,75,.13);color:#ffae73}.status.done{background:rgba(91,140,255,.15);color:#9abbff}
.property-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:15px}.property-card{position:relative;overflow:hidden;border:1px solid #273653;border-radius:18px;background:linear-gradient(155deg,#151f37,#0f1729);box-shadow:0 8px 22px rgba(0,0,0,.16)}.property-img{height:165px;background:#1c2945;display:grid;place-items:center;font-size:55px;position:relative;overflow:hidden}.property-img img{width:100%;height:100%;object-fit:cover}.property-img>i{position:absolute;top:10px;right:10px;background:rgba(6,12,25,.75);color:#fff;padding:5px 10px;border-radius:999px;font-size:12px;font-style:normal}.property-body{padding:14px;display:grid;gap:9px}.property-body>p{color:#a8b5cd}.property-specs{display:flex;gap:6px;flex-wrap:wrap}.property-specs span{background:#1d2b49;padding:5px 8px;border-radius:8px;color:#b5c3de;font-size:12px}.property-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #273653;padding-top:11px}.property-bottom b{font-size:20px;color:#91b2ff}.property-bottom small{color:#9dabca}.property-card>.stock-actions{padding:0 14px 14px;justify-content:flex-end}
.biz-empty{border:1px dashed #344664;border-radius:20px;padding:55px 20px;text-align:center;background:rgba(15,23,42,.7)}.biz-empty span{font-size:56px}.biz-empty h3{font-size:20px;margin:9px}.biz-empty p{color:#9ba9c3}
.biz-overlay{position:fixed;inset:0;z-index:500;background:rgba(2,7,16,.76);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:18px}.biz-modal{width:min(760px,100%);max-height:94vh;overflow:auto;border-radius:22px;background:#111a2e;border:1px solid #354667;box-shadow:0 30px 80px rgba(0,0,0,.5)}.biz-modal.wide{width:min(1020px,100%)}.biz-modal-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:17px 20px;background:#16213a;border-bottom:1px solid #2c3b5d}.biz-modal-head h3{font-size:20px}.biz-x{width:38px;height:38px;border:0;border-radius:10px;background:#263451;color:#fff;cursor:pointer}.biz-modal-body{padding:20px}.biz-form{display:grid;gap:18px}.biz-photo{display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap}.biz-photo>div{width:150px;height:110px;border:1px dashed #405477;border-radius:14px;background:#18243d;display:grid;place-items:center;overflow:hidden;font-size:45px}.biz-photo img{width:100%;height:100%;object-fit:cover}.biz-fields{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.biz-fields label{display:grid;gap:6px}.biz-fields label.full{grid-column:1/-1}.biz-fields span{color:#b5c1d9;font-size:13px;font-weight:700}.biz-fields input,.biz-fields select,.biz-fields textarea{width:100%;border-radius:10px;padding:10px 11px}.biz-form-actions{display:flex;justify-content:flex-end;gap:9px;border-top:1px solid #273653;padding-top:15px}
.crm-table td:first-child{display:grid;gap:3px}.crm-table td:first-child small{color:#9eacc7}.crm-table .late{color:#ff8c97;font-weight:900}
.report-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.report-card{border:1px solid #283754;background:linear-gradient(155deg,#151f37,#0f1729);border-radius:19px;padding:18px;display:grid;gap:13px}.report-card.span2{grid-column:span 2}.report-card h3{font-size:18px}.report-stat{display:flex;align-items:end;gap:8px}.report-stat b{font-size:36px;color:#91b3ff}.report-stat span{color:#a8b5cd;padding-bottom:5px}.report-card dl{display:grid;gap:8px}.report-card dl div{display:flex;justify-content:space-between;border-bottom:1px solid #24334f;padding-bottom:7px}.report-card dt{color:#aab7cf}.report-card dd{font-weight:900}.backup-card p{color:#aab7cf;line-height:1.7}.backup-card>div{display:flex;gap:8px;flex-wrap:wrap}.activity-list{list-style:none;display:grid;gap:8px}.activity-list li{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:9px;padding:9px;border-radius:11px;background:#111b31}.activity-list li>i{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#1f2c49;font-style:normal}.activity-list li>div{display:grid;gap:2px}.activity-list span{color:#9eacc7}.activity-list time{color:#8fa1c1;font-size:11px;direction:ltr}
@media(max-width:1100px){.kpi-grid{grid-template-columns:repeat(3,1fr)}.stock-card{grid-template-columns:110px 1fr 180px}.stock-actions{grid-column:1/-1;justify-content:flex-end}.report-grid{grid-template-columns:1fr 1fr}.dash-contracts{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){#topbar nav{display:none}.biz-hero{padding:20px;align-items:flex-start;flex-direction:column}.biz-hero h1{font-size:24px}.hero-actions{justify-content:flex-start}.kpi-grid{grid-template-columns:1fr 1fr}.kpi-card{padding:13px}.kpi-card b{font-size:16px}.dash-layout{grid-template-columns:1fr}.biz-panel.span2{grid-column:auto}.dash-contracts{grid-template-columns:1fr 1fr}.biz-page-head{align-items:flex-start}.biz-page-head h1{font-size:23px}.biz-tools,.biz-tools.multi{grid-template-columns:1fr 1fr}.biz-tools input{grid-column:1/-1}.result-count{justify-self:end}.stock-card{grid-template-columns:90px 1fr;padding:10px}.stock-img{height:82px}.stock-price{grid-column:1/-1;border-inline:0;border-top:1px solid #273653;padding-top:10px;text-align:right}.stock-actions{grid-column:1/-1}.property-grid{grid-template-columns:1fr}.biz-fields{grid-template-columns:1fr 1fr}.report-grid{grid-template-columns:1fr}.report-card.span2{grid-column:auto}.crm-table{min-width:900px}}
@media(max-width:480px){.kpi-grid{grid-template-columns:1fr}.dash-contracts{grid-template-columns:1fr}.biz-fields{grid-template-columns:1fr}.biz-fields label.full{grid-column:auto}.biz-tools,.biz-tools.multi{grid-template-columns:1fr}.biz-tools input{grid-column:auto}.biz-page-head{flex-direction:column}.biz-page-head>.btn{width:100%}.stock-card{grid-template-columns:1fr}.stock-img{height:150px}.stock-title{align-items:flex-start}}

/* ===== تحديث v2.2.0: تبديل الوضع + عرض هواتف المالك ===== */
.theme-toggle {
  white-space: nowrap;
  min-width: 112px;
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(255,255,255,.18) !important;
  color: #fff !important;
}
.theme-toggle:hover { background: rgba(255,255,255,.18) !important; }
.theme-setting-card {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  background: linear-gradient(145deg,#151f37,#0f1729);
  border: 1px solid #2c3b5d;
}
.theme-setting-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(91,140,255,.14);
  font-size: 23px;
}
.theme-setting-card > div:nth-child(2) { display: grid; gap: 3px; }
.theme-setting-card b { color: #fff; }
.theme-setting-card span { color: #aeb9d2; font-size: 12.5px; }
.owner-phone,
.owner-contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 10px;
  text-decoration: none;
  direction: ltr;
  color: #8ff0d0;
  background: rgba(39,197,154,.13);
  border: 1px solid rgba(39,197,154,.30);
  font-size: 12.5px;
  font-weight: 900;
}
.owner-phone:hover,
.owner-contact a:hover { filter: brightness(1.12); }
.owner-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(91,140,255,.08);
  border: 1px solid rgba(91,140,255,.17);
}
.owner-contact > span { color: #c8d4ed; font-size: 12.5px; font-weight: 800; }

/* الوضع الفاتح — يبقي نفس التخطيط ويغيّر الألوان فقط */
html.theme-light,
html.theme-light body {
  --text: #17233a;
  --muted: #66758c;
  --surface: #ffffff;
  --surface2: #f4f7fb;
  --line: #dce5ef;
  background: linear-gradient(180deg,#f6f8fb 0%,#edf2f7 100%) fixed !important;
  color: #17233a !important;
}
html.theme-light #auth-gate {
  background: linear-gradient(145deg,#edf4ff,#f8fbff 55%,#e5edfb) !important;
}
html.theme-light .auth-card,
html.theme-light .card,
html.theme-light .form-section,
html.theme-light .archive-wrap,
html.theme-light .settings-section,
html.theme-light .modal-card,
html.theme-light .preview-actions,
html.theme-light .empty-state {
  background: #fff !important;
  color: #17233a !important;
  border-color: #dce5ef !important;
  box-shadow: 0 12px 34px rgba(34,59,92,.10) !important;
}
html.theme-light .auth-card h1,
html.theme-light .home-hero h1,
html.theme-light .card-title,
html.theme-light .form-head h2,
html.theme-light .form-section h3,
html.theme-light .settings-section h3,
html.theme-light .settings-head h2,
html.theme-light .biz-page-head h1,
html.theme-light .stock-title h3,
html.theme-light .report-card h3,
html.theme-light .panel-head h2 {
  color: #172f54 !important;
}
html.theme-light .auth-sub,
html.theme-light .home-hero p,
html.theme-light .card-desc,
html.theme-light .auth-switch,
html.theme-light .fld > span,
html.theme-light .hint,
html.theme-light .muted,
html.theme-light .biz-page-head p,
html.theme-light .stock-main p,
html.theme-light .property-body > p,
html.theme-light .backup-card p,
html.theme-light .report-card dt,
html.theme-light .result-count {
  color: #66758c !important;
}
html.theme-light input,
html.theme-light textarea,
html.theme-light select,
html.theme-light .auth-card input,
html.theme-light .paste-fld textarea {
  background: #fff !important;
  color: #17233a !important;
  border-color: #cfdbe8 !important;
}
html.theme-light input::placeholder,
html.theme-light textarea::placeholder { color: #94a1b4 !important; }
html.theme-light input:focus,
html.theme-light textarea:focus,
html.theme-light select:focus,
html.theme-light .auth-card input:focus {
  background: #fff !important;
  border-color: #4d79d8 !important;
  box-shadow: 0 0 0 3px rgba(77,121,216,.15) !important;
}
html.theme-light .btn {
  background: #eef3f8;
  color: #19385f;
  border-color: #d1dde9;
}
html.theme-light .btn:hover { background: #e2eaf3; }
html.theme-light .btn.primary {
  background: linear-gradient(135deg,#3f72d8,#6e57d9);
  color: #fff;
  border-color: transparent;
}
html.theme-light .btn.danger {
  background: #fff0f2;
  color: #c94351;
  border-color: #f2c4ca;
}
html.theme-light .theme-toggle {
  background: rgba(255,255,255,.11) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.20) !important;
}
html.theme-light .drawer-panel {
  background: #fff !important;
  color: #17233a !important;
}
html.theme-light .drawer-item {
  color: #19385f !important;
  border-bottom-color: #e5ebf2 !important;
}
html.theme-light .drawer-item:hover { background: #eef4fa !important; }
html.theme-light .drawer-head { color: #fff !important; }
html.theme-light .developer-card { color: #fff !important; }
html.theme-light .archive-table,
html.theme-light .archive-table th,
html.theme-light .archive-table td { border-color: #dbe4ee !important; }
html.theme-light .archive-table th {
  background: #eaf1f8 !important;
  color: #19385f !important;
}
html.theme-light .archive-table tr:hover td { background: #f4f8fc !important; }
html.theme-light .kpi-card,
html.theme-light .biz-panel,
html.theme-light .dash-contract,
html.theme-light .mini-items button,
html.theme-light .follow-list button,
html.theme-light .stock-card,
html.theme-light .property-card,
html.theme-light .report-card {
  background: #fff !important;
  color: #17233a !important;
  border-color: #dce5ef !important;
  box-shadow: 0 8px 24px rgba(33,58,91,.08) !important;
}
html.theme-light .kpi-card small,
html.theme-light .mini-items small,
html.theme-light .follow-list span,
html.theme-light .dash-contract small,
html.theme-light .activity-list span,
html.theme-light .report-stat span {
  color: #718096 !important;
}
html.theme-light .dash-contract:hover,
html.theme-light .mini-items button:hover,
html.theme-light .follow-list button:hover {
  background: #f5f8fc !important;
  border-color: #7da1e9 !important;
}
html.theme-light .stock-img,
html.theme-light .property-img,
html.theme-light .mini-items button > span,
html.theme-light .biz-photo > div {
  background: #edf3f8 !important;
}
html.theme-light .stock-tags span,
html.theme-light .property-specs span {
  background: #eef4fa !important;
  border-color: #dce6f0 !important;
  color: #3f526b !important;
}
html.theme-light .stock-price,
html.theme-light .property-bottom,
html.theme-light .biz-form-actions {
  border-color: #dce5ef !important;
}
html.theme-light .stock-price b,
html.theme-light .property-bottom b,
html.theme-light .report-stat b { color: #356ac7 !important; }
html.theme-light .stock-price small,
html.theme-light .property-bottom small { color: #718096 !important; }
html.theme-light .biz-empty {
  background: #fff !important;
  border-color: #cbd8e5 !important;
}
html.theme-light .biz-empty p { color: #718096 !important; }
html.theme-light .biz-overlay { background: rgba(15,29,48,.48) !important; }
html.theme-light .biz-modal {
  background: #fff !important;
  color: #17233a !important;
  border-color: #d2deea !important;
  box-shadow: 0 28px 75px rgba(15,34,58,.24) !important;
}
html.theme-light .biz-modal-head {
  background: #f1f5f9 !important;
  border-bottom-color: #dce5ef !important;
}
html.theme-light .biz-modal-head h3 { color: #17345a !important; }
html.theme-light .biz-x { background: #e1e8f0 !important; color: #1c3557 !important; }
html.theme-light .biz-fields span { color: #4e6078 !important; }
html.theme-light .report-card dl div,
html.theme-light .activity-list li { border-color: #e1e8f0 !important; }
html.theme-light .activity-list li { background: #f4f7fa !important; }
html.theme-light .activity-list li > i { background: #e4edf6 !important; }
html.theme-light .theme-setting-card {
  background: #fff;
  border-color: #dce5ef;
  box-shadow: 0 7px 20px rgba(33,58,91,.07);
}
html.theme-light .theme-setting-card b { color: #17345a; }
html.theme-light .theme-setting-card span { color: #6b7b91; }
html.theme-light .theme-setting-icon { background: #edf3ff; }
html.theme-light .owner-phone,
html.theme-light .owner-contact a {
  color: #15785f;
  background: #e9faf4;
  border-color: #bce8d9;
}
html.theme-light .owner-contact {
  background: #f0f5ff;
  border-color: #d8e4fb;
}
html.theme-light .owner-contact > span { color: #40536d; }
html.theme-light .about-developer {
  background: linear-gradient(135deg,#fff,#f1f6fa);
  border-color: #d9e4ed;
}
html.theme-light .developer-footer { border-top-color: #dfe7ef; color: #66758c; }
html.theme-light #toast {
  background: #fff !important;
  color: #17233a !important;
  border-color: #ced9e5 !important;
  box-shadow: 0 12px 32px rgba(30,54,83,.16);
}

@media (max-width: 760px) {
  .account-box .theme-toggle { display: none; }
  .theme-setting-card { grid-template-columns: 42px 1fr; }
  .theme-setting-card .btn { grid-column: 1 / -1; width: 100%; }
  .owner-contact { align-items: stretch; }
  .owner-contact a { width: 100%; }
}


/* =========================================================
   الوضع الداكن الكامل — الإصدار 2.2.2
   يغطي الإعدادات والعدادات والحقول التي كانت تبقى بيضاء.
   ورقة معاينة العقد تبقى بيضاء عمداً لأنها تمثل ورقة الطباعة.
   ========================================================= */
html.theme-dark .settings-head h2,
html.theme-dark .settings-panel h3,
html.theme-dark .settings-preview h3,
html.theme-dark .body-card-title,
html.theme-dark .gopt-toggle b,
html.theme-dark .gopt-wm-head,
html.theme-dark .wm-op b,
html.theme-dark .sc-txt b,
html.theme-dark .ver-chip {
  color: #eef4ff !important;
}

html.theme-dark .settings-panel,
html.theme-dark .m-sec,
html.theme-dark .set-card,
html.theme-dark .slot-box,
html.theme-dark .body-card,
html.theme-dark .clause-row,
html.theme-dark .gopt-toggle,
html.theme-dark .gopt-wm,
html.theme-dark .settings-head.mob,
html.theme-dark .ph-chip,
html.theme-dark .ph-card,
html.theme-dark .settings-section {
  background: linear-gradient(155deg,#151f37,#0f1729) !important;
  color: #eef4ff !important;
  border-color: #2a3a5a !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.18) !important;
}

html.theme-dark body.mobile .sfield-row,
html.theme-dark .body-offset,
html.theme-dark .owner-contact,
html.theme-dark .theme-setting-card {
  background: #111a2f !important;
  border-color: #2b3b5d !important;
}

html.theme-dark .m-sec summary,
html.theme-dark .slot-label,
html.theme-dark .body-offset .bo-lbl,
html.theme-dark .sf-color > span,
html.theme-dark .sf-size > span,
html.theme-dark .sf-bold > span,
html.theme-dark .slot-size label > span,
html.theme-dark .body-card-ctrls .bcc > span,
html.theme-dark .fld > span,
html.theme-dark .wm-op > span,
html.theme-dark .settings-panel .hint,
html.theme-dark .settings-preview .hint,
html.theme-dark .sc-txt small,
html.theme-dark .slot-empty,
html.theme-dark .wm-preview span {
  color: #aebbd4 !important;
}

html.theme-dark .settings-head.mob {
  border-bottom-color: #2a3a5a !important;
}
html.theme-dark .set-card:active { background: #192641 !important; }
html.theme-dark .sc-go,
html.theme-dark .m-sec summary::after { color: #8192b5 !important; }
html.theme-dark .ver-chip {
  background: #1b2947 !important;
  border-color: #33496f !important;
}

html.theme-dark .settings-panel input:not([type="color"]):not([type="checkbox"]):not([type="range"]):not([type="file"]),
html.theme-dark .settings-panel textarea,
html.theme-dark .settings-panel select,
html.theme-dark .m-sec input:not([type="color"]):not([type="checkbox"]):not([type="range"]):not([type="file"]),
html.theme-dark .m-sec textarea,
html.theme-dark .m-sec select,
html.theme-dark .slot-size input,
html.theme-dark .sf-size input,
html.theme-dark .body-offset input,
html.theme-dark .body-card-ctrls .bcc input[type="number"],
html.theme-dark .clause-ta {
  background: #0b1427 !important;
  color: #f5f8ff !important;
  border-color: #33476c !important;
  -webkit-text-fill-color: #f5f8ff !important;
}
html.theme-dark .settings-panel input::placeholder,
html.theme-dark .settings-panel textarea::placeholder,
html.theme-dark .m-sec input::placeholder,
html.theme-dark .m-sec textarea::placeholder { color: #7686a7 !important; }

html.theme-dark .sf-color input[type="color"],
html.theme-dark .body-card-ctrls .bcc input[type="color"] {
  background: #0b1427 !important;
  border-color: #33476c !important;
}
html.theme-dark .sf-bold b,
html.theme-dark .body-card-ctrls .sf-bold b {
  background: #101a30 !important;
  color: #93a3c3 !important;
  border-color: #33476c !important;
}
html.theme-dark .sf-bold input:checked + b,
html.theme-dark .body-card-ctrls .sf-bold input:checked + b {
  background: #315ac2 !important;
  border-color: #5b83e9 !important;
  color: #fff !important;
}

html.theme-dark .slot-preview {
  background: #0c1528 !important;
  border-color: #405379 !important;
}
html.theme-dark .wm-preview {
  border-color: #405379 !important;
  background-color: #101a2e !important;
  background-image:
    linear-gradient(45deg,#1d2942 25%,transparent 25%),
    linear-gradient(-45deg,#1d2942 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#1d2942 75%),
    linear-gradient(-45deg,transparent 75%,#1d2942 75%) !important;
}
html.theme-dark .settings-actions { border-top-color: #293a59 !important; }

/* العدادات والبطاقات الإحصائية تبقى داكنة وواضحة */
html.theme-dark .kpi-card,
html.theme-dark .report-card,
html.theme-dark .biz-panel,
html.theme-dark .dash-contract,
html.theme-dark .mini-items button,
html.theme-dark .follow-list button {
  background: linear-gradient(155deg,#17223d,#10182c) !important;
  color: #fff !important;
  border-color: #2a3a5a !important;
}
html.theme-dark .kpi-card small,
html.theme-dark .report-stat span,
html.theme-dark .mini-items small,
html.theme-dark .follow-list span { color: #aebbd4 !important; }

html.theme-dark .btn:disabled {
  opacity: .68;
  cursor: wait;
}


/* مدخلات الصور خارج الشاشة بدل hidden لضمان عمل اختيار الصور في Safari وPWA */
.image-file-input{position:fixed!important;left:-10000px!important;top:-10000px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
button[data-file-open][disabled]{opacity:.7;cursor:wait}
.slot-preview img,.biz-photo img,.wm-preview img{display:block;max-width:100%;max-height:100%;object-fit:contain}
