/* وثّق — التصميم الجديد (v2)
   طبقة أنماط أخيرة فوق كل ما سبق: تغيّر الهوية البصرية فقط ولا تلمس المنطق.
   الألوان والخط من لوح التصميم المعتمد. النصوص الفرعية أغمق قليلاً لتحقيق التباين. */

:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --ink: #14181F;
  --muted: #5B6472;
  --navy: #0B6E4F;
  --primary: #0B6E4F;
  --primary2: #0B6E4F;
  --soft: #E8F5EE;
  --border: #E5E3DC;
  --gold: #B45309;
  --danger: #B91C1C;
  --ok: #0B6E4F;
  --shadow: 0 1px 2px rgba(20, 24, 31, .04), 0 6px 18px rgba(20, 24, 31, .05);
  --radius: 16px;
  --wt-dark: #14181F;
  --wt-line: #EDEBE5;
  --wt-green-soft: #E8F5EE;
}

html body,
html body button,
html body input,
html body select,
html body textarea {
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html body {
  background: var(--bg);
  color: var(--ink);
}

html body h1, html body h2, html body h3, html body h4 {
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  color: var(--ink);
  letter-spacing: 0;
}

/* ---------- الأزرار ---------- */
html body .btn {
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 700;
  box-shadow: none;
  transform: none;
}
html body .btn:hover { transform: none; filter: brightness(.96); }
html body .btn:focus-visible { outline: 3px solid rgba(11, 110, 79, .35); outline-offset: 2px; }
html body .btn-primary,
html body .btn-gold {
  background: var(--primary);
  color: #fff;
  box-shadow: none;
  background-image: none;
}
html body .btn-soft {
  background: var(--wt-green-soft);
  color: var(--primary);
  border: 0;
}
html body .btn-ghost {
  background: #fff;
  color: #374151;
  border: 1px solid var(--border);
}

/* ---------- الحقول ---------- */
html body .input,
html body .select,
html body .textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
}
html body .input:focus,
html body .select:focus,
html body .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, .12);
}
html body .field label { font-size: .85rem; font-weight: 600; color: #374151; }

/* ---------- البطاقات ---------- */
html body .card {
  background: #fff;
  border: 1px solid var(--wt-line);
  border-radius: 16px;
  box-shadow: none;
}

/* ---------- الهيكل: قائمة جانبية وشريط علوي ---------- */
html body .sidebar {
  right: 0; top: 0; bottom: 0;
  width: 240px;
  background: #fff;
  border: 0;
  border-inline-start: 1px solid var(--wt-line);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}
html body .side-item {
  border-radius: 10px;
  color: #374151;
  font-weight: 600;
  font-size: .9rem;
}
html body .side-item:hover { background: #F4F3EF; color: var(--ink); }
html body .side-item.active {
  background: var(--wt-green-soft);
  color: var(--primary);
  font-weight: 700;
  box-shadow: none;
  background-image: none;
}
html body .side-item.active .side-icon { background: transparent; }
html body .main { margin-right: 240px; padding: 0 0 80px; }
html body .topbar {
  top: 0;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid var(--wt-line);
  border-radius: 0;
  background: #fff;
  backdrop-filter: none;
  padding: 10px 40px;
  box-shadow: none;
}
html body .content { max-width: 1240px; margin: 28px auto; padding: 0 40px; }

@media (max-width: 900px) {
  html body .main { margin-right: 0; padding: 0 0 92px; }
  html body .topbar { padding: 10px 14px; min-height: 60px; }
  html body .content { margin: 16px auto; padding: 0 14px; }
}

/* ---------- شاشة الدخول ---------- */
html body .auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 560px 1fr;
  background: var(--bg);
}
html body .auth-panel {
  order: -1;
  background: #fff;
  padding: 64px 72px;
  align-items: center;
  justify-content: center;
}
html body .auth-card {
  width: 100%;
  max-width: 416px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}
html body .auth-card h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 6px; }
html body .auth-card .section-sub { color: var(--muted); font-size: .9rem; margin: 0 0 4px; }
html body .auth-tabs { background: #F1F0EC; border-radius: 10px; padding: 4px; margin: 22px 0; }
html body .auth-tabs button { border-radius: 8px; color: #5B6472; font-weight: 600; padding: 10px 0; }
html body .auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: none; }
html body .phone-field { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
html body .phone-field .input { border: 0; border-radius: 0; box-shadow: none; }
html body .phone-field > span { background: #F9FAFB; color: #5B6472; }
html body .auth-shell .note.blue {
  background: #F4F3EF; border: 0; color: #5B6472; border-radius: 10px;
}
html body .otp-box { background: #F4F3EF; border: 1px dashed #CFCBC0; border-radius: 12px; }
html body .otp-digit { background: #fff; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); }

html body .auth-art {
  background: var(--wt-dark);
  color: #fff;
  position: relative;
  padding: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
html body .auth-art h1 { color: #fff; font-size: 2.1rem; line-height: 1.4; font-weight: 700; }
html body .auth-art p { color: #A8B0BD; line-height: 1.9; }
html body .auth-art .trust-chip {
  background: #1E232C; color: #D1D5DB; border: 0; border-radius: 999px; padding: 8px 16px; font-size: .8rem;
}

@media (max-width: 900px) {
  html body .auth-shell { grid-template-columns: 1fr; }
  html body .auth-art { display: none; }
  html body .auth-panel { padding: 32px 22px; }
}


/* ---------- تقوية الأولوية على طبقات الأنماط القديمة ---------- */
html body .wt2-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
html body .wt2-brand-mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
}
html body .wt2-brand-name { font-size: 1.25rem; font-weight: 700; color: var(--ink); }

html body .auth-shell .auth-card {
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background: transparent !important; padding: 0 !important; backdrop-filter: none !important;
}
html body .auth-shell .auth-panel { background: #fff !important; background-image: none !important; }
html body .auth-shell .auth-art {
  background: var(--wt-dark) !important; background-image: none !important;
}
html body .auth-shell .auth-art::before,
html body .auth-shell .auth-art::after { display: none !important; }
html body .auth-shell .auth-art .auth-logo { display: none !important; }
html body .auth-shell .auth-art-copy { max-width: 460px; }
html body .auth-shell .btn-primary,
html body .auth-card .btn-primary,
html body .btn.btn-primary,
html body .btn.btn-gold {
  background: var(--primary) !important; background-image: none !important;
  color: #fff !important; box-shadow: none !important; border-radius: 10px !important;
}
html body .btn.btn-block { padding: 13px 0; font-size: .95rem; }
html body .auth-shell .auth-mobile-logo { display: none !important; }

html body .auth-shell .phone-field {
  display: flex !important; align-items: stretch; flex-direction: row;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff;
}
html body .auth-shell .phone-field > span {
  display: flex; align-items: center; padding: 0 14px; background: #F9FAFB; color: #374151;
  border-inline-end: 1px solid var(--border); font-size: .9rem;
}
html body .auth-shell .phone-field .input {
  flex: 1; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  text-align: left; direction: ltr;
}
html body .auth-shell .auth-art { display: flex !important; align-items: center !important; justify-content: center !important; }
html body .auth-shell .btn-primary:focus-visible { outline: 3px solid rgba(11, 110, 79, .3) !important; outline-offset: 2px; }

/* =====================================================================
   الشاشات الداخلية — تغلّب على الطبقات القديمة (تستخدم !important)
   ===================================================================== */
html body { background: var(--bg) !important; color: var(--ink) !important; }
html body h1, html body h2, html body h3, html body h4 { color: var(--ink); }

/* ---------- القائمة الجانبية ---------- */
html body .sidebar {
  right: 0 !important; top: 0 !important; bottom: 0 !important; left: auto !important;
  width: 240px !important;
  background: #fff !important; background-image: none !important;
  border: 0 !important; border-inline-start: 1px solid var(--wt-line) !important;
  border-radius: 0 !important; box-shadow: none !important; backdrop-filter: none !important;
  padding: 24px 0 !important; color: var(--ink) !important;
}
html body .sidebar .sidebar-logo, html body .sidebar .brand { padding: 0 24px 22px !important; color: var(--ink) !important; }
html body .sidebar .sidebar-logo *, html body .sidebar .brand-name { color: var(--ink) !important; }
html body .side-nav { padding: 0 12px !important; gap: 2px !important; }
html body .side-item {
  background: transparent !important; background-image: none !important;
  color: #374151 !important; border-radius: 10px !important; box-shadow: none !important;
  font-weight: 600 !important; font-size: .9rem !important; padding: 11px 12px !important;
}
html body .side-item .side-icon {
  background: transparent !important; color: #6B7280 !important; box-shadow: none !important;
  width: 20px !important; height: 20px !important; border-radius: 0 !important;
}
html body .side-item:hover { background: #F4F3EF !important; color: var(--ink) !important; }
html body .side-item.active {
  background: var(--wt-green-soft) !important; color: var(--primary) !important;
  font-weight: 700 !important; box-shadow: none !important; border: 0 !important;
}
html body .side-item.active .side-icon { color: var(--primary) !important; background: transparent !important; }
html body .sidebar-help {
  background: #FAF9F6 !important; background-image: none !important; border: 1px solid var(--wt-line) !important;
  border-radius: 12px !important; color: var(--ink) !important; box-shadow: none !important;
}
html body .sidebar-help p, html body .sidebar-help b, html body .sidebar-help h4 { color: #5B6472 !important; }
html body .sidebar-help b, html body .sidebar-help h4 { color: var(--ink) !important; }

/* ---------- الشريط العلوي ---------- */
html body .main { margin-right: 240px !important; padding: 0 0 90px !important; }
html body .topbar {
  position: sticky !important; top: 0 !important; z-index: 20;
  min-height: 72px !important; margin: 0 !important; padding: 10px 40px !important;
  background: #fff !important; background-image: none !important;
  border: 0 !important; border-bottom: 1px solid var(--wt-line) !important;
  border-radius: 0 !important; box-shadow: none !important; backdrop-filter: none !important;
}
html body .top-title, html body .topbar h1 { color: var(--ink) !important; font-weight: 700 !important; }
html body .searchbox { background: #F4F3EF !important; border: 1px solid transparent !important; border-radius: 10px !important; box-shadow: none !important; }
html body .searchbox input { background: transparent !important; color: var(--ink) !important; }
html body .icon-btn, html body .avatar {
  background: #fff !important; border: 1px solid var(--wt-line) !important; color: #374151 !important; box-shadow: none !important; border-radius: 10px !important;
}
html body .avatar { border-radius: 999px !important; background: #E7E5DF !important; color: #374151 !important; font-weight: 700 !important; }
html body .content { max-width: 1240px !important; margin: 28px auto !important; padding: 0 40px !important; }

/* ---------- البطاقات ---------- */
html body .card, html body .form-card, html body .task-card, html body .contract-card,
html body .service-card, html body .subCard, html body .review-box, html body .money-box, html body .stat {
  background: #fff !important; background-image: none !important;
  border: 1px solid var(--wt-line) !important; border-radius: 16px !important; box-shadow: none !important;
  color: var(--ink) !important;
}
html body .contract-card { transition: border-color .15s; }
html body .contract-card:hover { border-color: #CFCBC0 !important; transform: none !important; }
/* ---------- البطل (الرئيسية) ---------- */
html body .hero {
  background: var(--wt-dark) !important; background-image: none !important;
  border: 0 !important; border-radius: 16px !important; box-shadow: none !important; color: #fff !important;
  padding: 36px 40px !important; min-height: 0 !important;
}
html body .hero h1 { color: #fff !important; font-size: 1.9rem !important; line-height: 1.45 !important; }
html body .hero p { color: #A8B0BD !important; }
html body .hero .trust-chip { background: #1E232C !important; color: #D1D5DB !important; border: 0 !important; }
html body .hero .btn-gold, html body .hero .btn-primary { background: var(--primary) !important; color: #fff !important; }
html body .hero .btn-ghost { background: transparent !important; color: #fff !important; border: 1px solid #3A414D !important; }

/* ---------- عناوين الصفحات ---------- */
html body .page-head h1 { color: var(--ink) !important; font-size: 1.5rem !important; font-weight: 700 !important; }
html body .page-head p, html body .section-sub, html body .muted, html body .small, html body .tiny { color: #5B6472 !important; }
html body .contract-id { color: var(--primary) !important; }

/* ---------- الأزرار والفلاتر ---------- */
html body .btn { border-radius: 10px !important; box-shadow: none !important; transform: none !important; font-weight: 700 !important; }
html body .btn-primary, html body .btn-gold, html body .btn-navy {
  background: var(--primary) !important; background-image: none !important; color: #fff !important; border: 0 !important;
}
html body .btn-soft { background: var(--wt-green-soft) !important; color: var(--primary) !important; border: 0 !important; }
html body .btn-ghost { background: #fff !important; color: #374151 !important; border: 1px solid var(--border) !important; }
html body .btn-danger { background: #fff !important; color: var(--danger) !important; border: 1px solid #FCA5A5 !important; }
html body .filter-btn, html body .workspace-tab {
  background: #fff !important; border: 1px solid var(--border) !important; color: #374151 !important;
  border-radius: 999px !important; box-shadow: none !important;
}
html body .filter-btn.active, html body .workspace-tab.active {
  background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important;
}

/* ---------- حقول ---------- */
html body .input, html body .select, html body .textarea, html body .native-select {
  border: 1px solid var(--border) !important; border-radius: 10px !important; background: #fff !important; color: var(--ink) !important; box-shadow: none !important;
}

/* ---------- الحالات ---------- */
html body .status { border-radius: 999px !important; font-weight: 600 !important; box-shadow: none !important; border: 0 !important; background: #F1F0EC !important; color: #374151 !important; }
html body .status.done { background: var(--wt-green-soft) !important; color: var(--primary) !important; }
html body .status.review { background: #FEF3E2 !important; color: #B45309 !important; }
html body .status.payment { background: #FDECEC !important; color: #B91C1C !important; }
html body .status.draft { background: #F1F0EC !important; color: #5B6472 !important; }

@media (max-width: 900px) {
  html body .main { margin-right: 0 !important; }
  html body .topbar { padding: 10px 14px !important; min-height: 60px !important; }
  html body .content { margin: 16px auto !important; padding: 0 14px !important; }
}


/* ---------- الرئيسية (تصميم جديد) ---------- */
html body .sidebar .sidebar-logo.wt2-brand { padding: 0 24px 22px !important; margin: 0 !important; }
html body .side-item, html body .side-item * { color: inherit !important; }
html body .side-item .side-icon { color: #6B7280 !important; }
html body .side-item.active .side-icon { color: var(--primary) !important; }
html body .side-item:not(.active) { color: #374151 !important; }
html body .side-item.active { color: var(--primary) !important; }

html body .wt2-greet h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
html body .wt2-greet p { color: #5B6472; margin: 4px 0 0; font-size: .9rem; }
html body .wt2-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
html body .wt2-kpi {
  background: #fff; border: 1px solid var(--wt-line); border-radius: 16px; padding: 26px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
html body .wt2-kpi span { font-size: .82rem; color: #5B6472; }
html body .wt2-kpi b { font-size: 1.4rem; font-weight: 700; color: var(--ink); line-height: 1.5; }
html body .wt2-kpi small { font-size: .78rem; color: #6B7280; }
html body .wt2-kpi .wt2-danger { color: var(--danger); }
html body .wt2-kpi-dark { background: var(--wt-dark); border-color: var(--wt-dark); }
html body .wt2-kpi-dark span { color: #A8B0BD; }
html body .wt2-kpi-dark b { color: #fff; font-size: 1.05rem; }
html body .wt2-kpi-dark .btn { margin-top: 6px; }
@media (max-width: 900px) {
  html body .wt2-kpis { grid-template-columns: 1fr; }
  }

html body .sidebar .side-item.active,
html body .sidebar .side-nav .side-item.active {
  background: var(--wt-green-soft) !important; background-image: none !important; box-shadow: none !important;
}
html body .sidebar .sidebar-logo, html body .sidebar .wt2-brand {
  display: flex !important; align-items: center; gap: 10px; width: auto !important; height: auto !important;
  filter: none !important; opacity: 1 !important; padding: 0 24px 22px !important;
}
html body .sidebar .wt2-brand-name { color: var(--ink) !important; }
html body .sidebar .wt2-brand-mark { background: var(--primary) !important; background-image: none !important; }
/* زر المساعد العائم */
html body .assistant-fab, html body .chat-fab, html body [class*="fab"], html body .chatbot-btn {
  background: var(--primary) !important; background-image: none !important; box-shadow: 0 6px 18px rgba(11,110,79,.3) !important;
}
html body .sidebar .side-item.active, html body .sidebar .side-item.active * { color: var(--primary) !important; opacity: 1 !important; }
html body .sidebar .side-item:not(.active) { opacity: 1 !important; }

/* ---------- تحويل بقايا الأزرق إلى هوية التصميم ---------- */
html body .create, html body .topbar .create { background: var(--primary) !important; background-image: none !important; color: #fff !important; box-shadow: none !important; }
html body .note, html body .note.blue { background: #F4F3EF !important; border: 1px solid var(--border) !important; color: #374151 !important; border-radius: 12px !important; }
html body .note.warn { background: #FEF3E2 !important; border-color: #F5D9A8 !important; color: #92400E !important; }
html body .step.active, html body .flow-step.active { border-color: var(--primary) !important; }
html body .wt-v10-step.active i, html body .step.active i, html body .step.active > b {
  background: var(--primary) !important; background-image: none !important; color: #fff !important; box-shadow: none !important; border-color: var(--primary) !important;
}
html body .wt-v10-step.done i, html body .step.done i { background: var(--wt-green-soft) !important; color: var(--primary) !important; box-shadow: none !important; }
html body .wt13-footer, html body .wt13-footer * { color: #5B6472 !important; }
html body .wt13-footer { background: transparent !important; background-image: none !important; border-top: 1px solid var(--wt-line) !important; box-shadow: none !important; }
html body a { color: var(--primary); }
html body .progress > i, html body .progress-bar, html body [class*="progress"] > i { background: var(--primary) !important; background-image: none !important; }

/* ---------- معالج إنشاء العقد ---------- */
html body.wt-flow-open, html body.wt-flow-open #app { background: var(--bg) !important; background-image: none !important; }
html body .wt-visual { background: var(--wt-dark) !important; background-image: none !important; box-shadow: none !important; border: 0 !important; border-radius: 16px !important; }
html body .wt2-brand-mark { background: var(--primary) !important; background-image: none !important; box-shadow: none !important; }
html body .wt-next { background: var(--primary) !important; background-image: none !important; box-shadow: none !important; border-radius: 10px !important; color: #fff !important; }
html body .wt-stage-badge { background: var(--wt-green-soft) !important; color: var(--primary) !important; box-shadow: none !important; }
html body .wt-network { background: #F1F0EC !important; background-image: none !important; color: #5B6472 !important; box-shadow: none !important; }
html body .wt-shell .active i, html body .wt-shell [aria-current] i, html body .wt-shell .current i {
  background: var(--primary) !important; background-image: none !important; color: #fff !important; box-shadow: none !important;
}
html body .wt-shell .done i { background: var(--wt-green-soft) !important; color: var(--primary) !important; box-shadow: none !important; }
html body .wt-orbit, html body .wt-orbit * { background-image: none !important; }
html body .wt-orbit i { background: #232833 !important; color: #fff !important; box-shadow: none !important; }

/* =====================================================================
   v2 الكاملة: الهيكل، العقود، المدفوعات، حسابي (تخطيط التصميم)
   ===================================================================== */
html body .top-title { display: none !important; }
html body .topbar { justify-content: flex-end !important; gap: 12px !important; }
html body .searchbox, html body .icon-btn.speech, html body .topbar .create-btn { display: none !important; }
html body .side-item .side-icon svg { display: block; }
html body .icon-btn { position: relative; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 !important; }
html body .avatar { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem !important; padding: 0 !important; }
html body .badge-dot { position: absolute; top: -5px; left: -5px; background: var(--danger) !important; color: #fff; }
html body .sidebar-help { margin: auto 12px 0 !important; padding: 16px !important; }
html body .sidebar-help .btn-soft { width: 100%; }

html body .wt2-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
html body .wt2-head h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
html body .wt2-head p { color: #5B6472; margin: 4px 0 0; font-size: .9rem; }

html body .wt2-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
html body .wt2-tiles > div { background: #fff; border: 1px solid var(--wt-line); border-radius: 12px; padding: 14px 18px; }
html body .wt2-tiles small { display: block; font-size: .78rem; color: #5B6472; }
html body .wt2-tiles b { display: block; font-size: 1.3rem; font-weight: 700; margin-top: 4px; }
html body .wt2-tiles b.warn { color: #B45309; }
html body .wt2-tiles b.ok { color: var(--primary); }
html body .wt2-tiles b.bad { color: var(--danger); }

html body .wt2-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; font-style: normal; }
html body .wt2-badge.ok { background: var(--wt-green-soft); color: var(--primary); }
html body .wt2-badge.warn { background: #FEF3E2; color: #B45309; }
html body .wt2-badge.bad { background: #FDECEC; color: #B91C1C; }
html body .wt2-badge.muted { background: #F1F0EC; color: #5B6472; }
html body .wt2-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
html body .wt2-pactions { display: flex; gap: 10px; flex-wrap: wrap; }
html body .wt2-empty { padding: 34px 18px; text-align: center; color: #5B6472; background: #FAF9F6; border: 1px dashed #D9D5C9; border-radius: 12px; }
html body .wt2-empty b { display: block; color: var(--ink); margin-bottom: 6px; }
html body .wt2-empty p { margin: 0; font-size: .84rem; line-height: 1.8; }

html body .wt2-h3 { font-size: .95rem; font-weight: 700; margin: 26px 0 12px; }
html body .wt2-acct { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
html body .wt2-profile { padding: 28px !important; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
html body .wt2-profile h2 { margin: 0; font-size: 1rem; }
html body .wt2-bigavatar { width: 64px; height: 64px; border-radius: 999px; background: #E7E5DF; color: #374151; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; font-style: normal; }
html body .wt2-acctmain { display: flex; flex-direction: column; gap: 20px; }
html body .wt2-box { padding: 26px !important; }
html body .wt2-box h3 { margin: 0 0 16px; font-size: .95rem; }
@media (max-width: 1100px) {
  html body .wt2-split, html body .wt2-pay, html body .wt2-acct { grid-template-columns: 1fr; }
  html body .wt2-tiles { grid-template-columns: repeat(2, 1fr); }
  }
html body .wt13-header-create, html body #wt13_header_create { display: none !important; }

/* تبويبات مركز العمل: مجموعة رمادية والفعّال أبيض */
html body .workspace-tabs { display: flex !important; flex-wrap: wrap; gap: 6px; background: #EFEDE7 !important; padding: 5px !important; border-radius: 10px !important; width: fit-content; max-width: 100%; margin-bottom: 20px !important; }
html body .workspace-tab { border: 0 !important; background: transparent !important; color: #5B6472 !important; border-radius: 8px !important; padding: 8px 14px !important; font-size: .82rem !important; box-shadow: none !important; }
html body .workspace-tab.active { background: #fff !important; color: var(--ink) !important; }

/* شعار معالج إنشاء العقد (صنفه wt-brand-mark، ويختلف عن شعار القائمة wt2-brand-mark) */
html body .wt-brand-name, html body .wt-brand b { color: var(--ink) !important; }

/* الشريط العلوي: الجرس والصورة الرمزية على اليسار (الشريط القديم شبكة grid فلا تعمل المحاذاة إلا هكذا) */
html body .topbar { display: flex !important; align-items: center !important; justify-content: flex-end !important; grid-template-columns: none !important; }
html body .top-actions { margin: 0 !important; }

/* الرئيسية: إجراءات سريعة كبطاقات بأيقونات */
html body .wt2-greet .wt2-link { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
html body .wt2-quickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
html body .wt2-quickgrid button { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--wt-line); border-radius: 14px; background: #fff; cursor: pointer; text-align: right; color: var(--ink); font-family: inherit; }
html body .wt2-quickgrid button:hover { border-color: #CFCBC0; }
html body .wt2-quickgrid i { width: 40px; height: 40px; border-radius: 10px; background: var(--wt-green-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex: none; }
html body .wt2-quickgrid b { font-size: .92rem; font-weight: 600; }
html body .wt2-home .wt2-h3 { margin-top: 8px; }

/* سجل العقد داخل لوحة العقد */
/* ===== العقود: فلاتر أفقية وبطاقات عريضة والتفاصيل تنفتح تحت كل بطاقة ===== */
html body .wt2-tabs { display: flex; gap: 6px; background: #EFEDE7; padding: 5px; border-radius: 10px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: thin; }
html body .wt2-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; background: transparent; border-radius: 8px; color: #5B6472; font-family: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
html body .wt2-tab em { font-style: normal; font-size: .72rem; background: rgba(20,24,31,.07); padding: 1px 7px; border-radius: 999px; }
html body .wt2-tab.active { background: #fff; color: var(--ink); }
html body .wt2-tab.active em { background: var(--wt-green-soft); color: var(--primary); }
html body .wt2-tab:focus-visible { outline: 3px solid rgba(11,110,79,.3); }

html body .wt2-list2 { display: flex; flex-direction: column; gap: 12px; }
html body .wt2-crow2 { background: #fff; border: 1px solid var(--wt-line); border-radius: 14px; overflow: hidden; }
html body .wt2-crow2.open { border-color: #CFCBC0; }
html body .wt2-crow2-head { display: grid; grid-template-columns: 34px minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.9fr); gap: 8px; align-items: start; padding: 16px 18px; }
html body .wt2-crow2-head .wt2-cnum { margin-top: 2px; }
html body .wt2-crow2 > .wt2-pactions { padding: 14px 18px 16px; border-top: 1px solid #F1F0EC; justify-content: flex-end; }
html body .wt2-cinfo { cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
html body .wt2-cinfo b { font-size: .95rem; font-weight: 700; }
html body .wt2-cinfo small, html body .wt2-cparty small, html body .wt2-cdate small { font-size: .72rem; color: #6B7280; }
html body .wt2-camount { font-weight: 700; font-size: .92rem; text-align: left; }
@media (max-width: 1100px) {
  html body .wt2-crow2-head { grid-template-columns: 1fr auto; gap: 10px 14px; }
  html body .wt2-cparty, html body .wt2-cdate, html body .wt2-camount { grid-column: auto; }
  }

/* أرقام الجوال تُعرض من اليسار لليمين حتى داخل النص العربي */
/* عنوان فوق كل قيمة في البطاقة العريضة */
html body .wt2-ccol { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
html body .wt2-ccol small { font-size: .72rem; color: #6B7280; }
html body .wt2-ccol b, html body .wt2-ccol .wt2-csub { white-space: nowrap; }
html body .wt2-ccol .wt2-csub { margin-top: -2px; }
html body .wt2-ccol.wt2-camount b { font-size: .92rem; font-weight: 700; text-align: right; }
/* زر الإجراء أصغر */
@media (max-width: 1100px) {
  html body .wt2-crow2-head { grid-template-columns: 1fr auto; }
}

/* ترقيم الصفوف + رقم العقد ونوعه */
html body .wt2-cnum { width: 28px; height: 28px; border-radius: 999px; background: #F1F0EC; color: #5B6472; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; }
html body .wt2-cinfo.wt2-ccol { cursor: pointer; }
html body .wt2-cinfo b { font-size: .92rem; font-weight: 700; }
html body .wt2-cid { font-size: .8rem !important; font-weight: 600 !important; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
html body .wt2-tagsh { font-style: normal; font-size: .68rem; color: var(--primary); background: var(--wt-green-soft); padding: 1px 8px; border-radius: 999px; align-self: flex-start; }

/* المدفوعات: صف واحد بعرض الصفحة بعد حذف اللوحة الجانبية */
/* صفوف المدفوعات: نفس عرض صفوف العقود لكن بدون سهم/زر إجراء */
html body .wt2-pay-head { grid-template-columns: 34px 1.3fr 1.1fr 1fr 1.1fr 100px 120px 130px !important; cursor: default; }

/* ===== مركز العمل: نوافذ الإضافة (عقار/طرف) ===== */
html body .wt2-modal { max-width: 520px !important; width: 92vw; max-height: 86vh; overflow: auto; }
html body .wt2-frow { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
html body .wt2-frow span { font-size: .82rem; font-weight: 600; color: #374151; }
html body .wt2-frow .input, html body .wt2-frow .select { width: 100%; }

/* ===== حقل تاريخ مخصص (يفتح تقويم واحد بتبويب هجري/ميلادي داخله) ===== */
html body .wt2-date-wrap { position: relative; }
html body .wt2-date-input { padding-left: 44px !important; padding-right: 12px !important; cursor: pointer; background: #fff; text-align: right !important; }
html body .wt2-date-icon { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--wt-green-soft, #E8F5EE); color: var(--primary, #0B6E4F); display: grid; place-items: center; cursor: pointer; }
html body .wt2-date-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ===== حقل الجوال: مفتاح الدولة + الرقم داخل صندوق واحد ===== */
html body .wt2-dp-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
html body .wt2-dp-tab { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid #DFE7F2; background: #F8FAFD; font: 700 13px 'IBM Plex Sans Arabic', sans-serif; color: #42526B; cursor: pointer; transition: .15s ease; }
html body .wt2-dp-tab.active { background: var(--primary, #0B6E4F); color: #fff; border-color: var(--primary, #0B6E4F); }
html body .wt-hijri-days .wt2dp-blank { min-height: 48px; }
/* معالج إنشاء العقد (#wt_flow) يغطي الشاشة بترتيب طبقة عالٍ جدًا (z-index) — تقويم التاريخ المخصص
   يحتاج ترتيب أعلى منه ليظهر ويستقبل النقر فوقه، لا خلفه. */
html body .wt2-dp-modal { z-index: 2147483647 !important; }
/* رسالة الخطأ تحت حقل التاريخ لا تزيح خانة "نوع الصك" المجاورة لها بالصف — تُعرض بدون أخذ مساحة بالتخطيط */
html body .wt-field .wt-error-text:not(:empty) { position: absolute; top: 100%; right: 0; left: 0; margin-top: 3px; }

/* ===== التوزيع الجغرافي بالتقارير ===== */

/* ===== قوائم عقاراتي/التجديدات: صفوف عريضة ===== */
html body .wt2-pactions2 { display: flex; gap: 8px; justify-self: end; }
html body .wt2-pactions2 .btn { padding: 8px 14px !important; font-size: .78rem !important; }
html body .wt2-prop-head { grid-template-columns: 34px 1.3fr 1.2fr 1fr 1fr 100px 160px !important; }

/* لون مميز لطيف لعقاراتي (أزرق فاتح مقابل أخضر العقود) */
html body .wt2-props .wt2-prow { border-inline-start: 4px solid #7FA6C9; background: #F7FAFC; }
html body .wt2-props .wt2-prow .wt2-cnum { background: #E7F0F7; color: #3E6E92; }

/* التجديدات: تلوين حسب الاستعجال */
html body .wt2-renewrow { border-inline-start: 4px solid #D9D5C9; }
html body .wt2-renewrow.wt2-u-urgent { border-inline-start-color: #B91C1C; background: #FDF6F6; }
html body .wt2-renewrow.wt2-u-soon { border-inline-start-color: #B45309; background: #FEFAF3; }
html body .wt2-renewrow.wt2-u-ok { border-inline-start-color: #0B6E4F; background: #F7FAF8; }
html body .wt2-renew-head { grid-template-columns: 34px 1.3fr 1.2fr 1fr 1fr 1fr 110px !important; }

@media (max-width: 1100px) {
  html body .wt2-prop-head, html body .wt2-renew-head { grid-template-columns: 1fr auto !important; }
}


/* معالج إنشاء العقد: بطاقة المرحلة بعرض الصفحة كاملة + إبقاء القائمة الرئيسية ظاهرة على اليمين */
html body .wt-shell { width: 100% !important; max-width: none !important; grid-template-columns: minmax(0, 1fr) !important; }
@media (min-width: 901px) {
  html body.wt-flow-open #app { display: block !important; }
  html body.wt-flow-open #app .main, html body.wt-flow-open #app .bottom-nav { display: none !important; }
  html body.wt-flow-open #wt_flow { right: 240px !important; padding: 28px 40px 40px !important; }
}

/* عناوين أقسام بطاقة بيانات العقد */
/* جدول الدفعات الإيجارية: أرقام إنجليزية بخط أكبر */
/* حسابي: قسم الأمان وحقول كلمة المرور */
html body .wt2-secbox { margin-top: 16px; }
html body .wt2-pwwrap { position: relative; }
html body .wt2-pwwrap .input { padding-left: 44px; }
html body .wt2-pweye { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #6B7280; cursor: pointer; display: inline-flex; padding: 6px; }
html body .wt2-pweye:hover { color: var(--ink); }

/* الشريط السفلي (الجوال): نفس هوية القائمة الجانبية الخضراء */
html body .bottom-nav { background: #fff !important; border: 1px solid var(--wt-line) !important; box-shadow: 0 6px 24px rgba(20,24,31,.10) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html body .bottom-nav button { color: #6B7280 !important; font-family: inherit; font-size: .68rem !important; font-weight: 600; background: transparent !important; gap: 3px; }
html body .bottom-nav button span { display: inline-flex; font-size: 1rem !important; }
html body .bottom-nav button.active { color: var(--primary) !important; background: var(--wt-green-soft) !important; }
html body .bottom-nav button.create { background: var(--primary) !important; background-image: none !important; color: #fff !important; border: 0 !important; box-shadow: 0 8px 20px rgba(11,110,79,.28) !important; }
html body .bottom-nav button:focus-visible { outline: 3px solid rgba(11,110,79,.3); outline-offset: -2px; }

/* الفوتر: بأسفل الصفحة دائمًا (sticky footer) */
html body #app > .app-shell, html body .app-shell { min-height: 100vh; }
html body .main { display: flex; flex-direction: column; min-height: 100vh; }
html body .content { display: flex !important; flex-direction: column; flex: 1 0 auto; width: 100%; box-sizing: border-box; }
html body .content > .wt13-footer { margin-top: auto !important; }
html body .wt13-footer { display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 4px 14px !important; margin-top: 32px; }
html body .wt13-footer-actions { display: flex; align-items: center; gap: 12px; }
html body .wt13-footer-meta { display: flex; gap: 10px; font-size: .78rem; }
@media (min-width: 901px) { html body .main { padding-bottom: 0 !important; } }

/* الشعار: شكل واحد بكل الشاشات (مربع أخضر بعلامة ✓ + وثّق) وضغطه يرجع للرئيسية */
html body .wt13-top-logo { display: none !important; align-items: center; gap: 10px; padding: 0 !important; border: 0 !important; background: transparent !important; cursor: pointer; }
@media (max-width: 900px) { html body .wt13-top-logo { display: flex !important; } }
html body .sidebar .sidebar-logo.wt2-brand, html body .wt-brand.wt2-brand { cursor: pointer; }
html body .wt-brand.wt2-brand { margin: 0; }
html body .wt2-brand-mark svg { display: block; }
html body .wt13-top-logo .wt2-brand-name { font-size: 1.15rem; }
/* لوحة الإشعارات: تبقى داخل الشاشة */
html body .top-actions .dropdown, html body .top-actions .dropdown.right { left: 0 !important; right: auto !important; max-width: calc(100vw - 24px); }
@media (max-width: 600px) {
  html body .top-actions { position: static; }
  html body .top-actions > div { position: static !important; }
  html body .top-actions .dropdown, html body .top-actions .dropdown.right { position: fixed !important; top: 66px !important; left: 12px !important; right: 12px !important; width: auto !important; max-width: none; }
}

/* شاشة الدخول: خانة تذكّر رقم الجوال */
html body .wt2-remember { display: flex; align-items: center; gap: 8px; margin: -2px 0 16px; font-size: .85rem; font-weight: 600; color: #374151; cursor: pointer; user-select: none; }
html body .wt2-remember input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; margin: 0; }

/* حقل الجوال بشاشات الدخول: المفتاح على اليسار قبل الرقم (+966 | 5XXXXXXXX) */
html body .auth-shell .phone-field { direction: ltr; }

/* شاشة التحقق: زرّا إعادة الإرسال وتعديل الرقم بنفس الشكل والحجم بعرض الصف */
html body .auth-otp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
html body .auth-otp-actions .btn { width: 100%; min-height: 44px; padding-inline: 10px; white-space: normal; line-height: 1.3; }

/* لوحة الدخول: أخضر داكن، والنص بالأعلى بثلاثة أسطر (العنوان، الوصف، الشارات) بخط أكبر */
html body .auth-shell .auth-art { background: #F1F0EC !important; position: relative; align-items: flex-start !important; justify-content: center !important; padding: 14vh clamp(28px, 4vw, 64px) 48px !important; }
html body .auth-shell .auth-art-copy { position: static !important; max-width: none !important; width: 100%; }
html body .auth-shell .auth-art h1 { font-size: clamp(1.15rem, calc((100vw - 680px) / 16.5), 3.4rem) !important; line-height: 1.3; white-space: nowrap; margin: 0 0 16px; }
html body .auth-shell .auth-art p { font-size: clamp(1rem, 1.6vw, 1.55rem) !important; color: #5B6472 !important; margin: 0 0 26px; white-space: nowrap; }
html body .auth-shell .auth-art .trust-row { display: flex; flex-wrap: nowrap; gap: 10px; }
html body .auth-shell .auth-art .trust-chip { background: #fff !important; color: #374151 !important; border: 1px solid #E4E1D9 !important; font-size: clamp(.8rem, 1.1vw, 1.05rem) !important; padding: 9px clamp(12px, 1.4vw, 20px); white-space: nowrap; }

/* لوحة الدخول الفاتحة: نص داكن + فوتر بأسفلها */
html body .auth-shell .auth-art h1 { color: #14181F !important; }
html body .auth-shell .auth-art-footer { position: absolute; left: clamp(28px, 4vw, 64px); right: clamp(28px, 4vw, 64px); bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid #E0DDD5; color: #6B7280; font-size: .78rem; }
html body .auth-shell .auth-art-footer .wt13-footer-actions { display: flex; align-items: center; gap: 12px; }
html body .auth-shell .auth-art-footer button { border: 0; background: transparent; color: #374151; font: inherit; font-weight: 600; cursor: pointer; padding: 4px 0; }
html body .auth-shell .auth-art-footer button:hover { color: var(--primary); }
html body .auth-shell .auth-art-footer .wt13-footer-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #E8F5EE; color: #0B6E4F; font-weight: 600; font-size: .72rem; }
html body .auth-shell .auth-art-footer .wt13-footer-badge i { width: 6px; height: 6px; border-radius: 50%; background: #0B6E4F; display: inline-block; }

/* الإشعارات المؤقتة: أخضر النظام. رابط مركز المساعدة: رمادي داكن وأخضر عند التمرير */
html body .toast { background: #0B6E4F !important; color: #fff !important; font-weight: 600; box-shadow: 0 10px 28px rgba(11,110,79,.28) !important; }
html body .wt13-footer-actions button, html body .auth-shell .auth-art-footer button { color: #374151 !important; background: transparent !important; }
html body .wt13-footer-actions button:hover, html body .auth-shell .auth-art-footer button:hover { color: #0B6E4F !important; background: #E8F5EE !important; }

.wt-iban{display:flex;align-items:stretch;border:1px solid var(--wt-border,#d8e0dc);border-radius:16px;overflow:hidden;background:#fff}
.wt-iban:focus-within{border-color:var(--wt-primary,#0B6E4F)}
.wt-iban .wt-input{flex:1;min-width:0;border:0;border-radius:0;box-shadow:none;outline:none}
.wt-iban-prefix{display:flex;align-items:center;padding:0 24px;background:var(--wt-primary,#0B6E4F);color:#fff;font-weight:700;letter-spacing:.5px}

/* قائمة الاقتراحات (المدينة/الحي): تعمل باللمس على سفاري الآيفون بدل datalist الأصلي */
.wt-suggest { position: absolute; inset-inline: 0; z-index: 40; max-height: min(240px, 38vh); overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; border: 1px solid #D3E0DC; border-radius: 14px; box-shadow: 0 12px 30px rgba(20, 24, 31, .16); padding: 6px; }
.wt-suggest-item { display: block; width: 100%; min-height: 44px; text-align: start; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; font: 600 15px 'IBM Plex Sans Arabic', system-ui, sans-serif; color: #14181F; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wt-suggest-item:hover, .wt-suggest-item:active { background: #E8F5EE; }
.wt-suggest-more { padding: 8px 12px; color: #5B6472; font-size: .78rem; }

/* شاشة المراجعة: الخانتان بعيدتان عن شريط الأزرار الثابت وكبيرتان للمس */
.wt-review { padding-bottom: 28px; }
.wt-consent { touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; min-height: 64px; }
.wt-consent input { width: 26px; height: 26px; }
