.sp-data-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7f8;
  border: 1px solid #f0d4d8;
  color: #444;
  font-size: 13px;
  font-weight: 800;
}
.sp-data-loading.is-error {
  background: #fff1f1;
  color: #8a1020;
}
.sp-data-loading i { color: #d70000; }

/* تعريف مباشر للعميل — مسار شغّال: فورم + بطاقات إجراءات */
.sp-client-intro {
  background: #faf9f6;
  border-radius: 24px;
  padding: clamp(28px, 4vw, 48px) clamp(18px, 3vw, 36px);
  margin: 18px 0;
  text-align: center;
  scroll-margin-top: 88px;
}
.sp-client-intro__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  color: #b00020;
}
.sp-client-intro__head {
  max-width: 720px;
  margin: 0 auto 28px;
}
.sp-client-intro__head h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 900;
  line-height: 1.45;
  color: #1a1a1a;
}
.sp-client-intro__head p {
  margin: 0;
  font-size: clamp(14px, 1.7vw, 16px);
  font-weight: 650;
  line-height: 1.85;
  color: #555;
}

.sp-client-intake {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 960px;
  margin: 0 auto 28px;
  text-align: start;
}
.sp-client-intake__field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #444;
}
.sp-client-intake__field span { padding-inline-start: 2px; }
.sp-client-intake__field input,
.sp-client-intake__field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2d6d9;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 650;
  background: #fff;
  color: #222;
  resize: vertical;
}
.sp-client-intake__field input:focus,
.sp-client-intake__field textarea:focus {
  outline: none;
  border-color: #d70000;
  box-shadow: 0 0 0 3px rgba(215, 0, 0, 0.12);
}
.sp-client-intake__submit {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: min(100%, 280px);
  margin-top: 4px;
}

.sp-client-intro__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.sp-client-intro__card {
  border: 0;
  border-radius: 20px;
  padding: clamp(28px, 3vw, 40px) clamp(18px, 2vw, 28px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  box-sizing: border-box;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.sp-client-intro__card:hover,
.sp-client-intro__card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(20, 0, 4, 0.1);
  outline: none;
}
.sp-client-intro__card.is-active {
  box-shadow: 0 0 0 3px rgba(215, 0, 0, 0.28), 0 14px 28px rgba(20, 0, 4, 0.1);
}
.sp-client-intro__card--blue { background: #eef6ff; }
.sp-client-intro__card--green { background: #f0f9dc; }
.sp-client-intro__card--purple { background: #f1eaff; }
.sp-client-intro__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 18px;
}
.sp-client-intro__icon svg {
  width: 22px;
  height: 22px;
}
.sp-client-intro__card--blue .sp-client-intro__icon {
  background: #d7e9fb;
  color: #1e4f8c;
}
.sp-client-intro__card--green .sp-client-intro__icon {
  background: #e0efc0;
  color: #3d6b14;
}
.sp-client-intro__card--purple .sp-client-intro__icon {
  background: #e2d5f8;
  color: #5b3d9a;
}
.sp-client-intro__card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 900;
  color: #2a2a2a;
  line-height: 1.4;
}
.sp-client-intro__card p {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.75;
  color: #666;
  max-width: 260px;
}
.sp-client-intro__cta {
  margin-top: auto;
  font-size: 12px;
  font-weight: 850;
  color: #b00020;
}

.sp-client-intro__results {
  margin-top: 28px;
  text-align: start;
  background: #fff;
  border: 1px solid #eadfe2;
  border-radius: 18px;
  padding: 16px;
}
.sp-client-intro__results-head {
  margin-bottom: 12px;
}
.sp-client-intro__results-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-client-intro__results-head h3 i { color: #d70000; }
.sp-client-intro__results-head p {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: #666;
}
.sp-client-intro__results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sp-type-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.sp-type-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: start;
  border: 1px solid #eadfe2;
  background: #fffafb;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  color: #222;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.sp-type-tab i { color: #d70000; font-size: 16px; }
.sp-type-tab strong { font-size: 15px; font-weight: 900; }
.sp-type-tab span { font-size: 12px; font-weight: 800; color: #777; }
.sp-type-tab:hover { border-color: #d70000; transform: translateY(-1px); }
.sp-type-tab.is-active {
  border-color: #d70000;
  background: linear-gradient(180deg, #fff 0%, #ffe8ea 100%);
  box-shadow: 0 10px 22px rgba(215, 0, 0, 0.12);
}

.sp-cat-dir {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.sp-cat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: start;
  border: 1px solid #eadfe2;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  font: inherit;
  color: #222;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sp-cat-card:hover,
.sp-cat-card.is-active {
  border-color: #d70000;
  background: #fff7f8;
}
.sp-cat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #111;
  color: #fff;
  flex: 0 0 auto;
}
.sp-cat-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sp-cat-card-copy strong {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
}
.sp-cat-card-copy small {
  font-size: 11px;
  font-weight: 800;
  color: #777;
}

.sp-catalog-groups {
  display: grid;
  gap: 14px;
  width: 100%;
}
.sp-cat-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.sp-cat-group-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-cat-group-head h3 i { color: #d70000; }
.sp-cat-group-head span {
  font-size: 12px;
  font-weight: 800;
  color: #777;
}
.sp-load-more {
  margin-top: 10px;
  width: 100%;
}
.sp-card.is-compact .sp-card-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #eadfe2;
}
.sp-promise {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(135deg, #fff8f8, #fff);
  border: 1px solid #f0d4d8;
  border-right: 4px solid #d70000;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
.sp-promise i { color: #d70000; margin-top: 3px; }
.sp-promise p { margin: 0; font-size: 13px; line-height: 1.7; color: #444; font-weight: 650; }
.sp-promise strong { color: #111; font-weight: 850; }

.sp-engine-path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.sp-engine-path li,
.sp-engine-path a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid #eadfe2;
  border-radius: 12px;
  background: #faf6f7;
  font-size: 11px;
  font-weight: 800;
  color: #222;
  text-decoration: none;
}
.sp-engine-path a:hover { border-color: #d70000; background: #fff; }
.sp-path-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: #d70000;
  flex: 0 0 auto;
  border: 1px solid #eadfe2;
}
.sp-disclaimer {
  background: #fff4e8;
  border: 1px solid #f0d9b8;
  color: #7a4a00;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
}
.sp-risk-low { color: #0a7a3e; }
.sp-risk-mid { color: #b06a00; }
.sp-risk-high { color: #b00010; }

.sp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.sp-stats article {
  background: #fff;
  border: 1px solid #eadfe2;
  border-radius: 14px;
  padding: 14px 12px;
  border-top: 3px solid rgba(215, 0, 0, 0.55);
  box-shadow: 0 8px 18px rgba(20, 0, 4, 0.04);
}
.sp-stats strong {
  display: block;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 4px;
}
.sp-stats span {
  color: #666;
  font-size: 12px;
  font-weight: 700;
}

.sp-panel {
  background: #fff;
  border: 1px solid #eadfe2;
  border-radius: 18px;
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(20, 0, 4, 0.04);
}
.sp-panel-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-panel-head h2 i { color: #d70000; }
.sp-panel-head p {
  margin: 0 0 14px;
  color: #666;
  font-size: 13px;
  font-weight: 650;
}

.sp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.sp-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #555;
}
.sp-field.grow { grid-column: 1 / -1; }
.sp-field input,
.sp-field select,
.sp-field textarea {
  border: 1px solid #e2d6d9;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fafafa;
  width: 100%;
  box-sizing: border-box;
}
.sp-field input:focus,
.sp-field select:focus,
.sp-field textarea:focus {
  outline: none;
  border-color: #d70000;
  background: #fff;
}
.sp-field textarea {
  resize: vertical;
  min-height: 64px;
}
.sp-field input[type='file'] {
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
}
.sp-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.sp-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  width: 100%;
  align-items: end;
}
.sp-catalog-toolbar .sp-field {
  min-width: 0;
}
.sp-catalog-toolbar .sp-field--search {
  grid-column: auto;
}
.sp-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.sp-chip {
  border: 1px solid #eadfe2;
  background: #fffafb;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: #333;
}
.sp-chip:hover { border-color: #d70000; color: #d70000; }
.sp-chip i { margin-inline-end: 6px; color: #d70000; }

.sp-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* شبكة الكتالوج: عرض كامل + أعمدة حسب عرض المحتوى المتاح */
.sp-catalog-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.sp-card {
  border: 1px solid #eadfe2;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #fff 0%, #fffafb 100%);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sp-card-top {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.sp-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  flex: 0 0 auto;
  font-size: 13px;
}
.sp-card-top h3 {
  margin: 0 0 3px;
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.35;
}
.sp-card-top small {
  color: #777;
  font-size: 10.5px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-score {
  margin-inline-start: auto;
  background: #d70000;
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}
.sp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.sp-badges span {
  background: #ffe5e5;
  color: #a00010;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.3;
}
.sp-reasons {
  margin: 0 0 10px;
  color: #666;
  font-size: 12px;
  font-weight: 700;
}
.sp-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.sp-detail-grid div {
  background: #faf6f7;
  border-radius: 10px;
  padding: 8px;
}
.sp-detail-grid span {
  display: block;
  color: #888;
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 2px;
}
.sp-detail-grid strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}
.sp-plan {
  border-top: 1px dashed #eadfe2;
  padding-top: 10px;
  margin-bottom: 10px;
  font-size: 12px;
}
.sp-plan strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 12px;
}
.sp-plan ol {
  margin: 0;
  padding-inline-start: 18px;
}
.sp-plan p { margin: 0 0 6px; color: #555; font-weight: 650; }
.sp-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}
.sp-catalog-grid .sp-card-actions .btn {
  width: 100%;
  justify-content: center;
  font-size: 12px;
  padding: 8px 10px;
  white-space: nowrap;
}

/* أزرار ثانوية على خلفية بيضاء — نص غامق (يتغلب على body.homepage .btn-secondary) */
body.homepage [data-side-projects-page] .sp-card .btn-secondary,
body.homepage [data-side-projects-page] .sp-opened-card .btn-secondary,
body.homepage [data-side-projects-page] .sp-reg-card .btn-secondary,
body.homepage [data-side-projects-page] .sp-form-actions .btn-secondary,
body.homepage [data-side-projects-page] .sp-catalog-groups .btn-secondary,
body.homepage [data-side-projects-page] .sp-load-more.btn-secondary,
[data-side-projects-page] .sp-card .btn-secondary,
[data-side-projects-page] .sp-opened-card .btn-secondary,
[data-side-projects-page] .sp-reg-card .btn-secondary,
[data-side-projects-page] .sp-form-actions .btn-secondary,
[data-side-projects-page] .sp-catalog-groups .btn-secondary,
[data-side-projects-page] .sp-load-more.btn-secondary {
  background: #fff !important;
  border: 1px solid #d9c7cb !important;
  color: #1a1a1a !important;
  box-shadow: none;
}
body.homepage [data-side-projects-page] .sp-card .btn-secondary:hover,
body.homepage [data-side-projects-page] .sp-opened-card .btn-secondary:hover,
body.homepage [data-side-projects-page] .sp-reg-card .btn-secondary:hover,
body.homepage [data-side-projects-page] .sp-form-actions .btn-secondary:hover,
body.homepage [data-side-projects-page] .sp-load-more.btn-secondary:hover,
[data-side-projects-page] .sp-card .btn-secondary:hover,
[data-side-projects-page] .sp-opened-card .btn-secondary:hover,
[data-side-projects-page] .sp-reg-card .btn-secondary:hover,
[data-side-projects-page] .sp-form-actions .btn-secondary:hover,
[data-side-projects-page] .sp-load-more.btn-secondary:hover {
  background: #fff7f8 !important;
  border-color: #d70000 !important;
  color: #9f1239 !important;
  box-shadow: none;
}

.sp-opened-list { display: grid; gap: 14px; }
.sp-opened-card {
  display: grid;
  gap: 14px;
  border: 1px solid #eadfe2;
  border-radius: 16px;
  padding: 16px 18px;
  background: #fff;
  width: 100%;
}
.sp-opened-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.sp-opened-card h3 { margin: 0 0 4px; font-size: 17px; }
.sp-opened-card small { color: #777; font-size: 12px; font-weight: 700; }
.sp-opened-lead { margin: 0; color: #555; font-size: 13px; font-weight: 650; line-height: 1.6; }
.sp-opened-main { min-width: 0; }
.sp-stations {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.sp-station {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: start;
  gap: 4px;
  text-align: start;
  padding: 12px;
  border: 1px solid #eadfe2;
  border-radius: 14px;
  background: #faf6f7;
  color: #222;
  cursor: pointer;
  transition: 0.15s ease;
  min-height: 118px;
  font: inherit;
}
.sp-station:hover {
  border-color: #d70000;
  background: #fff;
  box-shadow: 0 8px 18px rgba(215, 0, 0, 0.08);
}
.sp-station.is-current {
  border-color: #d70000;
  background: #fff7f8;
}
.sp-station.is-done {
  border-color: #c8e6c9;
  background: #f7fff8;
}
.sp-station__n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d70000;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}
.sp-station.is-done .sp-station__n { background: #2e7d32; }
.sp-station i { color: #d70000; font-size: 15px; }
.sp-station strong { font-size: 13px; font-weight: 900; line-height: 1.35; }
.sp-station small { color: #666; font-size: 11px; font-weight: 650; line-height: 1.4; }
.sp-station em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #8a1020;
}
.sp-station.is-done em { color: #2e7d32; }
.sp-station.is-todo em { color: #888; }
.sp-opened-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px dashed #eadfe2;
}

@media (max-width: 1100px) {
  .sp-stations { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .sp-stations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .sp-stations { grid-template-columns: 1fr; }
}

.sp-empty {
  margin: 0;
  padding: 20px;
  text-align: center;
  color: #777;
  font-weight: 700;
}

.sp-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 80;
}
.sp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sp-card-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  flex: 0 0 auto;
  border: none;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
}
.sp-card-icon-btn:hover,
.sp-card-icon-btn:focus-visible {
  background: #d70000;
  transform: translateY(-1px);
  outline: none;
}
.sp-card-title-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  color: inherit;
  text-align: start;
  cursor: pointer;
}
.sp-card-title-btn:hover,
.sp-card-title-btn:focus-visible {
  color: #d70000;
  outline: none;
  text-decoration: underline;
}

.sp-req-hint {
  color: #d70000;
  font-size: 11px;
  font-weight: 800;
}
.sp-selected-project {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px dashed #d70000;
  border-radius: 14px;
  background: #fff7f8;
}
.sp-selected-project[hidden] {
  display: none !important;
}
.sp-selected-label {
  font-size: 12px;
  font-weight: 800;
  color: #777;
}
.sp-selected-project strong {
  font-size: 15px;
  font-weight: 900;
  color: #111;
  flex: 1 1 auto;
}

.sp-reg-list {
  display: grid;
  gap: 12px;
}
.sp-reg-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid #eadfe2;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}
.sp-reg-card-main {
  min-width: 0;
  flex: 1 1 auto;
}
.sp-reg-card-main h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 900;
}
.sp-reg-card-main small,
.sp-reg-card-main p {
  display: block;
  margin: 0 0 4px;
  color: #555;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.sp-reg-exp,
.sp-reg-files {
  color: #777 !important;
}

.sp-reg-modal[hidden] {
  display: none !important;
}
.sp-reg-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
}
.sp-reg-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 8, 10, 0.62);
  backdrop-filter: blur(3px);
}
.sp-reg-modal__panel {
  position: relative;
  z-index: 1;
  width: min(760px, 96vw);
  max-height: min(90vh, 920px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  border: 1px solid #eadfe2;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  direction: rtl;
}
.sp-reg-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #f0e6e8;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.sp-reg-kicker {
  margin: 0 0 4px;
  color: #d70000;
  font-size: 12px;
  font-weight: 800;
}
.sp-reg-modal__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #111;
}
.sp-reg-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #eadfe2;
  background: #fff;
  color: #333;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sp-reg-close:hover {
  border-color: #d70000;
  color: #d70000;
}
.sp-reg-form {
  padding: 16px 20px 20px;
}
.sp-reg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.sp-reg-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}
body.sp-reg-open {
  overflow: hidden;
}

/* دليل + رحلة المشروع — بنفس لغة التصميم الحالي */
.sp-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}
.sp-journey-panel { scroll-margin-top: 88px; }
.sp-now {
  background: #fff7f8;
  border: 1px solid #f0d4d8;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.sp-now__label {
  color: #b00020;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}
.sp-now strong { display: block; margin-bottom: 6px; font-size: 16px; }
.sp-now p { margin: 0 0 12px; color: #555; font-size: 13px; line-height: 1.7; }
.sp-journey-meta {
  font-size: 13px;
  font-weight: 800;
  color: #6b1a28;
  margin-bottom: 12px;
}
.sp-journey-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.sp-journey-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 14px;
}
.sp-journey-step.is-done { border-color: #c8e6c9; background: #f7fff8; }
.sp-journey-step.is-current { border-color: #d70000; box-shadow: 0 0 0 1px rgba(215, 0, 0, 0.12); }
.sp-journey-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 42px;
  border-radius: 12px;
  background: #f6f6f6;
  font-weight: 900;
  font-size: 13px;
  color: #444;
}
.sp-journey-step.is-done .sp-journey-step__num { background: #e8f5e9; color: #2e7d32; }
.sp-journey-step.is-current .sp-journey-step__num { background: #ffe8eb; color: #d70000; }
.sp-journey-step__body strong { display: block; margin-bottom: 4px; }
.sp-journey-step__body p { margin: 0 0 10px; color: #666; font-size: 13px; line-height: 1.6; }

.sp-cat-hint {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #faf9f6;
  border: 1px solid #ebe4df;
}
.sp-cat-hint strong { display: block; margin-bottom: 4px; }
.sp-cat-hint p { margin: 0; color: #555; font-size: 13px; line-height: 1.6; }
.sp-cat-card-copy em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 11px;
  font-weight: 650;
  color: #777;
  line-height: 1.45;
}

.sp-my-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}
.sp-my-card__top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.sp-my-card__top h3 { margin: 0; font-size: 16px; }
.sp-status-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffe8eb;
  color: #b00020;
  font-size: 12px;
  font-weight: 800;
}
.sp-my-meta { margin: 0 0 6px; color: #555; font-size: 13px; }
.sp-progress {
  height: 8px;
  background: #f0f0f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 4px;
}
.sp-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #d70000, #ff5a5a);
}
.sp-revise-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff8e7;
  border: 1px solid #f0e0b0;
}
.sp-revise-box p { margin: 6px 0 0; color: #5c4a14; font-size: 13px; }

.sp-reg-step-indicator {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 800;
  color: #b00020;
}
.sp-reg-step h3 { margin: 0 0 12px; font-size: 15px; }
.sp-reg-review-grid {
  display: grid;
  gap: 10px;
  margin: 0;
}
.sp-reg-review-grid > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 10px 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
}
.sp-reg-review-grid dt { font-size: 12px; color: #777; }
.sp-reg-review-grid dd { margin: 0; font-weight: 800; grid-column: 1; }
.sp-reg-review-grid .btn { grid-row: 1 / span 2; align-self: center; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.sp-field-help {
  display: inline-flex;
  width: 16px;
  height: 16px;
  margin-inline-start: 4px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0f0f0;
  color: #666;
  font-size: 11px;
  font-weight: 900;
  cursor: help;
  vertical-align: middle;
}

.sp-success-modal,
.sp-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}
.sp-success-modal[hidden],
.sp-guide-modal[hidden] { display: none !important; }
.sp-success-modal__backdrop,
.sp-guide-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 10, 12, 0.45);
}
.sp-success-modal__panel,
.sp-guide-modal__panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}
.sp-guide-modal__panel header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.sp-guide-modal__panel h2,
.sp-success-modal__panel h2 {
  margin: 0;
  font-size: 20px;
}
.sp-guide-modal__panel ol {
  margin: 0 0 16px;
  padding-inline-start: 22px;
  line-height: 1.9;
  font-weight: 700;
}
.sp-guide-item {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #faf9f6;
}
.sp-guide-item h3 { margin: 0 0 6px; font-size: 14px; color: #b00020; }
.sp-guide-item p { margin: 0; color: #444; font-size: 13px; line-height: 1.7; }
.sp-guide-modal__actions,
.sp-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.sp-success-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.sp-success-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid #eee;
}
.sp-success-list span { color: #777; font-size: 12px; font-weight: 700; }
body.sp-guide-open,
body.sp-success-open { overflow: hidden; }

.spr-status.is-draft { background: #eceff1; color: #455a64; }
.spr-status.is-revise { background: #fff3e0; color: #e65100; }

@media (max-width: 980px) {
  .sp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-type-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-form-grid,
  .sp-reg-grid,
  .sp-results-grid,
  .sp-detail-grid,
  .sp-client-intro__results-grid { grid-template-columns: 1fr; }
  .sp-client-intro__cards,
  .sp-client-intake { grid-template-columns: 1fr; }
  .sp-client-intro__head { margin-bottom: 28px; }
  .sp-my-card { flex-direction: column; }
  .sp-journey-step { grid-template-columns: 48px 1fr; }
  .sp-catalog-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sp-catalog-toolbar .sp-field--search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .sp-type-tabs { grid-template-columns: 1fr; }
  .sp-reg-card { flex-direction: column; }
  .sp-client-intro {
    padding: 24px 14px;
    border-radius: 18px;
  }
  .sp-catalog-toolbar { grid-template-columns: 1fr; }
}

/* رحلة اختيار المشروع */
.sp-flow-steps {
  margin: 16px 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sp-flow-steps ol {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: max-content;
}
.sp-flow-steps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e8c9cf;
  background: #fff;
  color: #777;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.sp-flow-steps li span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f3;
  color: #555;
  font-size: 11px;
}
.sp-flow-steps li.is-current {
  border-color: #d70000;
  color: #8a000c;
  background: #fff5f6;
}
.sp-flow-steps li.is-current span,
.sp-flow-steps li.is-done span {
  background: #d70000;
  color: #fff;
}
.sp-flow-steps li.is-done {
  border-color: #b8e0c8;
  color: #1b5e20;
  background: #f1faf4;
}

.sp-flow-panel .sp-flow-selected {
  margin-bottom: 16px;
}
.sp-flow-selected__empty,
.sp-flow-selected__card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed #e0b8bf;
  background: #fffafb;
}
.sp-flow-selected__empty[hidden],
.sp-flow-selected__card[hidden],
.sp-flow-grid[hidden],
[data-sp-flow-role-other-wrap][hidden],
[data-sp-flow-need-other-wrap][hidden],
.sp-flow-review[hidden],
.sp-flow-assess__result[hidden],
.sp-flow-msg[hidden] {
  display: none !important;
}
.sp-card.is-selected {
  border-color: #d70000 !important;
  box-shadow: 0 0 0 2px rgba(215, 0, 0, 0.18);
}
.sp-card.is-selected [data-sp-select] {
  background: #1b5e20 !important;
  border-color: #1b5e20 !important;
}
.sp-flow-selected__empty {
  justify-items: center;
  text-align: center;
  color: #777;
}
.sp-flow-selected__empty i { color: #d70000; font-size: 22px; }
.sp-flow-selected__card {
  border-style: solid;
  border-color: #f0d0d5;
}
.sp-flow-meta { margin: 0; color: #666; font-size: 13px; font-weight: 700; }
.sp-flow-grid {
  display: grid;
  gap: 16px;
}
.sp-flow-needs {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #eee;
  background: #fafafa;
}
.sp-flow-needs legend {
  padding: 0 6px;
  font-weight: 900;
  color: #222;
}
.sp-flow-needs__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 8px;
}
.sp-flow-needs__grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 750;
  color: #333;
}
.sp-flow-assess,
.sp-flow-review {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #eee;
  background: #fff;
}
.sp-flow-assess h3,
.sp-flow-review h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.sp-flow-assess__qs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.sp-flow-assess__result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fff7f8;
  border: 1px solid #f0d0d5;
}
.sp-flow-assess__result ul {
  margin: 8px 0 0;
  padding-inline-start: 1.2rem;
}
.sp-flow-review__dl {
  display: grid;
  gap: 10px;
  margin: 0;
}
.sp-flow-review__dl > div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #eee;
}
.sp-flow-review__dl dt {
  font-size: 12px;
  color: #777;
  font-weight: 800;
}
.sp-flow-review__dl dd {
  margin: 0;
  font-weight: 850;
  color: #222;
}
.sp-flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.sp-flow-actions [data-sp-flow-start]:not(.is-ready) {
  opacity: 0.72;
  background: #8a8a8a !important;
  border-color: #8a8a8a !important;
}
.sp-flow-actions [data-sp-flow-start].is-ready {
  opacity: 1;
  background: #d70000 !important;
  border-color: #d70000 !important;
}
.sp-flow-msg {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #1b5e20;
  font-weight: 750;
  line-height: 1.6;
}
.sp-card.is-compact .sp-card-actions,
.sp-card .sp-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

/* تصفح الكتالوج */
.sp-catalog-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 4px;
}
.sp-catalog-pager[hidden] { display: none !important; }
.sp-catalog-pager__meta {
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #777;
  margin-bottom: 2px;
}
.sp-catalog-pager__btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #e2d6d9;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.sp-catalog-pager__btn:hover:not(:disabled):not(.is-current) {
  border-color: #d70000;
  color: #d70000;
}
.sp-catalog-pager__btn.is-current {
  background: #d70000;
  border-color: #d70000;
  color: #fff;
  cursor: default;
}
.sp-catalog-pager__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sp-catalog-pager__ellipsis {
  color: #999;
  font-weight: 900;
  padding: 0 2px;
}

/* أعمدة شبكة المشاريع حسب عرض الشاشة (المحتوى بعرض كامل) */
@media (min-width: 1680px) {
  .sp-catalog-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
  }
}
@media (max-width: 1679px) and (min-width: 1200px) {
  .sp-catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1199px) and (min-width: 992px) {
  .sp-catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 991px) and (min-width: 720px) {
  .sp-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 719px) and (min-width: 480px) {
  .sp-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 479px) {
  .sp-catalog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .sp-flow-needs__grid,
  .sp-flow-assess__qs {
    grid-template-columns: 1fr;
  }
  .sp-flow-actions {
    justify-content: stretch;
  }
  .sp-flow-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
