/* ============ تجهيز العرض لعميل + وضع التسجيل ============ */
/* لون النص فوق تدرّج ألوان الهوية (ثابت في الوضعين كما في صفحة الدخول) */
:root { --prs-ink: #fff; }

.prs-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.prs-status span { flex: 1; min-width: 200px; }
.prs-en { border-top: 1px dashed var(--border); padding-top: 10px; }
.prs-en summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; list-style: none; }
.prs-en summary::-webkit-details-marker { display: none; }
.prs-en summary .ic { width: 15px; height: 15px; }
.prs-logo { background: linear-gradient(135deg, var(--pp, var(--primary)), var(--pa, var(--accent))); color: var(--prs-ink); }
.prs-range { width: 100%; accent-color: var(--primary); cursor: pointer; margin: 6px 0 0; }
.prs-chip { display: inline-flex; align-items: center; gap: 5px; }
.prs-chip .ic { width: 14px; height: 14px; }
.prs-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.prs-actions .li-main { min-width: 200px; }

/* المعاينة المباشرة */
.prs-preview { display: grid; grid-template-columns: 150px minmax(0, 1fr); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; min-height: 230px; }
.prs-pv-side { background: var(--surface-2); border-inline-end: 1px solid var(--border); padding: 12px 10px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; min-width: 0; }
.prs-pv-side > .row { margin-bottom: 8px; min-width: 0; }
.prs-pv-mark { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 15px; overflow: hidden;
  background: linear-gradient(135deg, var(--pp), var(--pa)); color: var(--prs-ink); }
.prs-pv-mark.has-logo { background: var(--surface); border: 1px solid var(--border); padding: 2px; }
.prs-pv-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.prs-pv-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.prs-pv-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.prs-pv-name span { font-size: 10.5px; color: var(--muted); }
.prs-pv-link { padding: 5px 8px; border-radius: 7px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prs-pv-link.on { background: color-mix(in srgb, var(--pp) 14%, transparent); color: color-mix(in srgb, var(--pp) 75%, var(--text)); font-weight: 600; }
.prs-pv-link.hl::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pa); margin-inline-start: auto; flex: none; }
.prs-pv-hero { padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 12px; color: var(--prs-ink); min-width: 0;
  background: radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--prs-ink) 14%, transparent), transparent 45%), linear-gradient(150deg, var(--pp), var(--pa)); }
.prs-pv-hero h4 { font-size: 17px; font-weight: 700; }
.prs-pv-banner { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; padding: 8px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--prs-ink) 14%, transparent); border: 1px solid color-mix(in srgb, var(--prs-ink) 26%, transparent); }
.prs-pv-banner .ic { width: 15px; height: 15px; margin-top: 2px; }
.prs-pv-banner b { display: block; font-size: 13.5px; }
.prs-pv-banner span { display: block; opacity: .85; font-size: 11.5px; }
.prs-pv-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; opacity: .92; }
.prs-pv-meta span { display: inline-flex; align-items: center; gap: 4px; }
.prs-pv-meta .ic { width: 13px; height: 13px; }

/* قائمة التحضير */
.prs-checks { display: flex; flex-direction: column; }
.prs-check { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.prs-check:last-child { border-bottom: 0; }
.prs-check label { flex: 1; min-width: 0; color: var(--text); font-size: 13.5px; }
.prs-check.done label span { color: var(--muted); text-decoration: line-through; }
.prs-check .icon-btn { width: 30px; height: 30px; }
.prs-check .icon-btn .ic { width: 15px; height: 15px; }

/* رابط وضع التسجيل */
.prs-url { font-family: ui-monospace, Consolas, monospace; font-size: 12px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); overflow-wrap: anywhere; text-align: start; }

/* تمييز الموديولات المختارة في القائمة الجانبية */
.nav-link.prs-hl::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }

/* لافتة العميل في صفحة الدخول ولوحة التحكم */
.prs-auth { display: inline-flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 14px; margin-bottom: 22px; max-width: 460px; position: relative; z-index: 1;
  background: color-mix(in srgb, var(--prs-ink) 14%, transparent); border: 1px solid color-mix(in srgb, var(--prs-ink) 28%, transparent); font-size: 13px; }
.prs-auth .ic { width: 20px; height: 20px; margin-top: 2px; }
.prs-auth b { display: block; font-size: 17px; }
.prs-auth span { display: block; opacity: .85; font-size: 12.5px; }
.prs-auth-m { display: none; align-items: flex-start; gap: 8px; width: min(420px, 100%); padding: 10px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; }
.prs-auth-m .ic { width: 16px; height: 16px; margin-top: 2px; }
.prs-auth-m b { display: block; font-size: 14px; }
.prs-auth-m span { display: block; color: var(--muted); }
.prs-welcome { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 4px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); color: var(--primary); font-size: 12.5px; }
.prs-welcome .ic { width: 14px; height: 14px; }
.prs-welcome div, .prs-welcome b, .prs-welcome span { display: inline; }
.prs-welcome span { color: var(--muted); }
.prs-welcome span::before { content: ' · '; }

/* المعاينة في عمود ضيق: القائمة تصبح شريطاً أعلى البطاقة */
#prs-preview { container-type: inline-size; }
@container (max-width: 480px) {
  .prs-preview { grid-template-columns: minmax(0, 1fr); }
  .prs-pv-side { border-inline-end: 0; border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; align-items: center; }
  .prs-pv-side > .row { width: 100%; margin-bottom: 4px; }
  .prs-pv-link { padding: 3px 8px; }
}
@media (max-width: 900px) { .prs-auth-m { display: flex; } }

/* ============ وضع التسجيل ============ */
html.record-mode, html.record-mode body { scrollbar-width: none; }
html.record-mode::-webkit-scrollbar, html.record-mode body::-webkit-scrollbar, body.record-mode *::-webkit-scrollbar { display: none; }
body.record-mode, body.record-mode * { cursor: none !important; }
body.record-mode .tour-tip { display: none !important; }
body.record-mode #demo-player { width: min(1080px, calc(100vw - 48px)); bottom: 28px; padding: 18px 32px 20px; text-align: center;
  background: var(--text); color: var(--surface); border-color: transparent; border-radius: 20px; }
body.record-mode #demo-player .dp-top, body.record-mode #demo-player .dp-ctrl { display: none; }
body.record-mode #demo-player h4 { font-size: clamp(22px, 2.5vw, 34px); font-weight: 700; margin: 0 0 6px; color: var(--surface); }
body.record-mode #demo-player p { font-size: clamp(15px, 1.5vw, 21px); line-height: 1.7; color: color-mix(in srgb, var(--surface) 86%, transparent); max-width: 920px; margin: 0 auto 14px; max-height: none; overflow: visible; }
body.record-mode .dp-steps { max-width: 420px; margin: 0 auto; }
body.record-mode .dp-steps button { background: color-mix(in srgb, var(--surface) 22%, transparent); outline: 0; }
body.record-mode .dp-steps button.past { background: color-mix(in srgb, var(--surface) 55%, transparent); }
body.record-mode .dp-steps button.on { background: var(--surface); }
body.record-mode .dp-timer { background: transparent; }
body.record-mode .dp-timer i { background: color-mix(in srgb, var(--surface) 45%, transparent); }
body.record-mode.demo-on .view { padding-bottom: 320px; }
body.record-mode.demo-on .toasts { bottom: 260px; }

/* البطاقة الختامية */
#prs-endcard { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--prs-ink);
  background: radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--prs-ink) 16%, transparent), transparent 45%), linear-gradient(150deg, var(--pp), var(--pa));
  animation: prsfade .9s ease both; overflow: hidden; }
#prs-endcard::after { content: ''; position: absolute; inset-inline-end: -160px; bottom: -160px; width: 520px; height: 520px; border-radius: 50%; border: 80px solid color-mix(in srgb, var(--prs-ink) 7%, transparent); }
.prs-end { position: relative; z-index: 1; }
.prs-end > * { animation: prsup .8s ease both; }
.prs-end > :nth-child(2) { animation-delay: .25s; }
.prs-end > :nth-child(3) { animation-delay: .5s; }
.prs-end > :nth-child(4) { animation-delay: .8s; }
.prs-end-mark { width: 124px; height: 124px; border-radius: 32px; margin: 0 auto 28px; display: grid; place-items: center; overflow: hidden;
  font-size: 62px; font-weight: 700; background: color-mix(in srgb, var(--prs-ink) 18%, transparent); box-shadow: 0 0 0 10px color-mix(in srgb, var(--prs-ink) 8%, transparent); }
.prs-end-mark.has-logo { background: var(--surface); padding: 14px; }
.prs-end-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.prs-end h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 700; line-height: 1.15; }
.prs-end p { font-size: clamp(18px, 2.3vw, 30px); opacity: .92; margin: 14px 0 36px; }
.prs-end-url { display: inline-flex; align-items: center; gap: 10px; padding: 10px 24px; border-radius: 40px; font-size: clamp(16px, 1.7vw, 22px); font-weight: 600; direction: ltr;
  background: color-mix(in srgb, var(--prs-ink) 12%, transparent); border: 1px solid color-mix(in srgb, var(--prs-ink) 35%, transparent); }
.prs-end-url .ic { width: 22px; height: 22px; }
@keyframes prsfade { from { opacity: 0; } }
@keyframes prsup { from { opacity: 0; transform: translateY(14px); } }
