:root {
  --ink: #1B2430;
  --ink-soft: #2C3A4C;
  --muted: #5E6672;
  --paper: #F5F1E8;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(27, 36, 48, 0.12);
  --brand: #0F2238;
  --brand-deep: #0A1726;
  --gold: #B08A3E;
  --gold-soft: #D6B46A;
  --ok: #1f6b4a;
  --bad: #8f2f2f;
  --warn: #7a5b12;
  --shadow: 0 18px 50px rgba(10, 23, 38, 0.14);
  --radius: 22px;
  --font: "IBM Plex Sans Arabic", "Tahoma", sans-serif;
  --display: "Amiri", "Traditional Arabic", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.7;
  background:
    radial-gradient(900px 420px at 100% -5%, rgba(176, 141, 62, 0.18), transparent 55%),
    radial-gradient(700px 380px at 0% 10%, rgba(15, 34, 56, 0.16), transparent 50%),
    linear-gradient(165deg, #ECEEF2 0%, #F8F6F1 42%, #EAECF1 100%);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.035;
  background-image:
    linear-gradient(rgba(15, 34, 56, 0.7) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 34, 56, 0.7) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
}

.wrap {
  position: relative; z-index: 1;
  max-width: 820px; margin: 0 auto;
  padding: 22px 16px 48px;
}

/* Hero brand */
.hero {
  position: relative;
  padding: 28px 22px 24px;
  margin-bottom: 18px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(10, 23, 38, 0.96), rgba(15, 34, 56, 0.92) 55%, rgba(22, 48, 78, 0.9)),
    radial-gradient(500px 220px at 90% 0%, rgba(212, 181, 106, 0.25), transparent 60%);
  color: #F5F1E8;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise 0.7s ease both;
}
.hero::after {
  content: "";
  position: absolute; inset: auto -20% -40% auto;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 181, 106, 0.18), transparent 70%);
  animation: drift 10s ease-in-out infinite alternate;
}
.hero-top {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  position: relative; z-index: 1;
}
.mark {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  color: var(--brand-deep);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  animation: pop 0.8s cubic-bezier(.2,1.4,.3,1) both;
  flex: 0 0 auto;
}
.mark svg { display: block; }

.sub-grid { display: grid; gap: 10px; margin-top: 12px; }
.sub-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; border-radius: 14px;
  background: linear-gradient(180deg, #FAF8F3, #F1EEE6);
  border: 1px solid var(--line);
}
.sub-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-weight: 800; font-size: 0.85rem; flex: 0 0 auto;
}
.sub-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 14px; padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(176, 141, 62, 0.14), rgba(15, 34, 56, 0.08));
  border: 1px solid rgba(176, 141, 62, 0.35);
}
@media (max-width: 640px) {
  .sub-banner { flex-direction: column; align-items: stretch; }
  .sub-banner button { width: 100%; }
}
.brand-block { flex: 1; min-width: 0; }
.brand-block h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.55rem, 4.2vw, 2.15rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.2);
}
.brand-block .tagline {
  margin: 10px 0 0;
  color: rgba(245, 241, 232, 0.82);
  font-size: 0.98rem;
  max-width: 36ch;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 18px; position: relative; z-index: 1;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 0.84rem; color: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
}
.chip .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #8aa39b;
}
.chip.on .dot {
  background: #5dcf9a;
  box-shadow: 0 0 0 0 rgba(93, 207, 154, 0.7);
  animation: pulse 1.8s infinite;
}
.chip.off .dot { background: #e08a8a; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(27, 36, 48, 0.06);
  padding: 20px;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
  animation: rise 0.65s ease both;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.panel:hover {
  border-color: rgba(15, 34, 56, 0.22);
  box-shadow: 0 14px 34px rgba(27, 36, 48, 0.1);
}
.panel.delay-1 { animation-delay: 0.08s; }
.panel.delay-2 { animation-delay: 0.16s; }
.panel h2 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  color: var(--brand);
}
.muted { color: var(--muted); font-size: 0.93rem; }
.tiny { font-size: 0.82rem; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.space-between { justify-content: space-between; }

label {
  display: block; margin: 12px 0 6px;
  font-weight: 600; font-size: 0.94rem; color: var(--ink-soft);
}
input, textarea, select, button { font: inherit; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(15, 34, 56, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 34, 56, 0.1);
  transform: translateY(-1px);
}
textarea { min-height: 120px; resize: vertical; }

button, .btn {
  border: 0; border-radius: 14px; padding: 12px 18px; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), #14564c);
  color: #fff; font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 34, 56, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
button:hover { transform: translateY(-1px); filter: brightness(1.05); }
button:active { transform: translateY(0); }
button.secondary, .btn.secondary {
  background: #e7efeb; color: var(--brand);
  box-shadow: none;
}
button.accent {
  background: linear-gradient(135deg, #9a7832, var(--gold));
  color: #1a1608;
}
button.danger { background: var(--bad); box-shadow: none; }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; filter: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.msg {
  border-radius: 14px; padding: 11px 13px; margin-top: 12px; font-size: 0.93rem;
  animation: rise 0.35s ease both;
}
.msg.err { background: #f7e6e6; color: var(--bad); }
.msg.ok { background: #e6f5ee; color: var(--ok); }
.msg.warn { background: #fff5d9; color: var(--warn); }

.thread { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.bubble {
  border-radius: 18px; padding: 13px 15px; max-width: 100%;
  white-space: pre-wrap; word-break: break-word;
  animation: slideIn 0.35s ease both;
  border: 1px solid var(--line);
}
.bubble.q {
  background: linear-gradient(135deg, #e8f1ee, #f3f8f6);
  border-color: rgba(15, 34, 56, 0.12);
}
.bubble.a {
  background: #fff;
  box-shadow: 0 6px 16px rgba(27, 36, 48, 0.05);
}
.bubble .who {
  font-size: 0.78rem; color: var(--muted); margin-bottom: 5px; font-weight: 700;
  letter-spacing: 0.02em;
}

.pay-box {
  background: linear-gradient(180deg, #FAF8F3, #F1EEE6);
  border: 1px dashed rgba(176, 141, 62, 0.55);
  border-radius: 16px; padding: 14px; margin: 12px 0;
}
.code {
  font-size: 1.4rem; font-weight: 800; letter-spacing: 0.05em; color: var(--brand);
  background: #fff; display: inline-block; padding: 8px 14px; border-radius: 12px;
  border: 1px solid var(--line); margin: 8px 0;
  box-shadow: 0 4px 12px rgba(27, 36, 48, 0.05);
}
.hidden { display: none !important; }

.contact-chip {
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: inherit;
  font: inherit;
}
.contact-chip:hover { background: rgba(255,255,255,0.22); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 18px;
  background: rgba(10, 23, 38, 0.55);
  backdrop-filter: blur(3px);
}
.modal-card {
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  animation: rise 0.25s ease both;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 6px; text-align: right; vertical-align: top; }
th { color: var(--muted); font-weight: 700; }
.status-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.78rem; background: #eee;
}
.status-pill.awaiting_review { background: #fff2cc; }
.status-pill.activated { background: #d9f2e5; }
.status-pill.pending_payment { background: #e8eef0; }
.status-pill.rejected { background: #f6d6d6; }

.footer-note {
  text-align: center; color: var(--muted); font-size: 0.82rem; margin-top: 8px;
  animation: rise 0.8s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(93, 207, 154, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(93, 207, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(93, 207, 154, 0); }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-24px, -12px, 0); }
}

@media (max-width: 640px) {
  .hero { padding: 22px 16px 18px; border-radius: 22px; }
  .brand-block h1 { font-size: 1.45rem; }
  .hero-top { flex-direction: column; }
  .mark { width: 42px; height: 42px; }
}

/* ===== هوية 2026-10-20: الختم الذهبي + صفحة التعريف القانوني ===== */
.mark{width:58px;height:58px;border-radius:50%;background:transparent;color:var(--gold-soft);box-shadow:none;border:0}
.brand-en{margin-top:4px;font-family:"Cormorant Garamond","Palatino Linotype","Book Antiqua",Georgia,serif;letter-spacing:.16em;text-transform:uppercase;font-size:.78rem;color:var(--gold-soft);direction:ltr;text-align:right}
.learn h2{font-family:var(--display);font-size:1.45rem;margin-bottom:8px}
.learn h3{font-family:var(--display);font-size:1.18rem;color:var(--brand);margin:22px 0 10px;padding-bottom:6px;border-bottom:1px solid rgba(176,138,62,.35)}
.learn-head p{max-width:62ch}
.facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}
.fact{background:var(--brand);color:#F5F1E8;border-radius:16px;padding:14px 12px;display:grid;gap:2px}
.fact b{font-size:1.45rem;color:var(--gold-soft);font-variant-numeric:tabular-nums;direction:ltr;text-align:right}
.fact span{font-size:.84rem;opacity:.9;line-height:1.55}
.sources{margin:0;padding-inline-start:1.2em;display:grid;gap:6px;line-height:1.85}
.sources strong{color:var(--brand)}
.how{margin:0;padding:0;list-style:none;counter-reset:hw;display:grid;gap:8px}
.how li{counter-increment:hw;position:relative;padding:10px 46px 10px 12px;border-radius:12px;background:rgba(15,34,56,.035);border:1px solid var(--line);line-height:1.75}
.how li::before{content:counter(hw);position:absolute;right:12px;top:10px;width:24px;height:24px;border-radius:50%;background:var(--gold);color:#fff;font-weight:700;font-size:.85rem;display:grid;place-items:center}
.notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.note-card{background:#fff;border:1px solid var(--line);border-top:3px solid var(--gold);border-radius:14px;padding:14px;display:grid;gap:6px;align-content:start}
.note-card h4{margin:0;font-size:1rem;color:var(--brand);line-height:1.5}
.note-card p{margin:0;font-size:.9rem;line-height:1.85;color:var(--ink-soft)}
.note-card cite{font-style:normal;font-size:.78rem;color:var(--gold);font-weight:600}
.who{margin:0;line-height:1.9;color:var(--ink-soft)}
.learn-cta{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
@media (max-width:640px){.facts{grid-template-columns:1fr}.notes{grid-template-columns:1fr}.learn-cta button{width:100%}}

/* قائمة «ما تضمّه القاعدة» (بلا أعداد) — 2026-10-20 */
.learn .corpus{list-style:none;margin:10px 0 18px;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.learn .corpus li{position:relative;padding:12px 14px 12px 12px;padding-inline-start:34px;border-radius:12px;background:linear-gradient(180deg,#FBF8F1,#F3EDE0);border:1px solid rgba(176,138,62,.35);font-weight:600;color:var(--ink,#1B2430)}
.learn .corpus li::before{content:"";position:absolute;inset-inline-start:13px;top:50%;width:9px;height:9px;transform:translateY(-50%) rotate(45deg);background:#B08A3E}

/* الفيديو التعريفي (للزائر وغير المشترك فقط) — 2026-10-20 */
.intro-video{padding:0;overflow:hidden;background:#0F2238}
.intro-video video{display:block;width:100%;max-width:600px;margin:0 auto;aspect-ratio:1/1;height:auto;background:#0F2238}

/* لوحة المالك: أسئلة العملاء (البنود 6 و21 و30) */
.qcard { border: 1px solid rgba(127,127,127,.25); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.qtext { white-space: pre-wrap; margin-top: 6px; font-size: 15px; line-height: 1.7; }
.qstage { margin-top: 6px; font-size: 13px; opacity: .85; }
.qanswer { white-space: pre-wrap; margin-top: 8px; padding: 10px; border-radius: 10px; background: rgba(127,127,127,.08); font-size: 14px; line-height: 1.8; max-height: 420px; overflow: auto; }
.qcard textarea { width: 100%; box-sizing: border-box; margin-top: 8px; }

/* (2026-11-07) إرشاد صياغة السؤال داخل المربع: أوضح من النص الباهت المعتاد */
#question { min-height: 170px; line-height: 1.8; }
#question::placeholder { color: var(--ink-soft); opacity: 0.85; font-size: 1rem; line-height: 1.8; }

/* (2026-11-09) تفاصيل الجواب الطويل تُفتح بالضغط */
.ans details.ans-more { margin-top: 12px; border-top: 1px dashed rgba(127,127,127,.45); padding-top: 8px; }
.ans details.ans-more > summary { cursor: pointer; font-weight: 700; padding: 6px 0; list-style-position: inside; }
.ans details.ans-more[open] > summary { margin-bottom: 6px; }

/* (2026-11-09) تقييم العميل للجواب */
.fb-box { margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(127,127,127,.35); border-radius: 12px; }
.fb-title { font-weight: 700; margin-bottom: 4px; }
.fb-stars { display: flex; gap: 4px; direction: ltr; justify-content: flex-end; }
.fb-star { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: #b8860b; padding: 2px; min-width: 36px; min-height: 36px; }
.fb-star.on { color: #d4a017; }
.fb-comment { width: 100%; box-sizing: border-box; margin-top: 6px; }
.qfeedback { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(212,160,23,.12); }
