:root {
  --accent: #6A3F8E;
  --accent-dark: #4E2C6B;
  --accent-soft: #EFE7F5;
  --ink: #2A2233;
  --body: #4A4155;
  --muted: #5A5066;
  --faint: #6B6176;
  --ground: #F6F3F8;
  --card: #FFFFFF;
  --line: #E2D8EB;
  --line-strong: #D8CDE3;
  --ok: #1F5F59;
  --ok-soft: #E6F2EF;
  --ok-dot: #2F8F7F;
  --warn: #5C2A0A;
  --warn-soft: #FFF4EC;
  --warn-line: #F0C9AE;
  --danger: #C0392B;
  --night: #2A2233;
  --radius: 22px;
  --head: 'Alexandria', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
  --text: 'IBM Plex Sans Arabic', Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 1.7; }
h1, h2, h3 { font-family: var(--head); line-height: 1.35; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; color: var(--faint); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ltr { direction: ltr; unicode-bidi: embed; }
:focus-visible { outline: 3px solid #B48BD6; outline-offset: 2px; }

/* أزرار */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 1.5px solid transparent; font-family: inherit; font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); font-weight: 600; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ok { background: var(--ok-dot); color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn-block { width: 100%; border-radius: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon { width: 22px; height: 22px; flex: none; }

/* شارات */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-off { background: #EEE9F2; color: var(--muted); }
.pill-busy { background: #FFF1DB; color: #7A4A00; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.pill-ok .dot { background: var(--ok-dot); }

/* الهيدر */
.site-header { background: #fff; border-bottom: 1px solid #E7E0EE; position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 700; font-size: 23px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.nav { display: flex; flex-wrap: wrap; gap: 22px; }
.nav a { color: var(--body); text-decoration: none; }
.nav a:hover { color: var(--accent); }

/* الأقسام */
.section { padding: 72px 0; }
.section-white { background: #fff; }
.section-title { font-size: 34px; text-align: center; }
.section-sub { font-size: 18px; color: var(--muted); text-align: center; margin-top: 8px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 32px; }
.card { background: #fff; border-radius: var(--radius); padding: 26px; }
.card-soft { background: var(--ground); }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { color: var(--body); }
.step-num { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--head); font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }

/* البداية */
.hero { display: flex; flex-wrap: wrap; gap: 44px; align-items: center; padding: 64px 0; }
.hero-text { flex: 999 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: clamp(36px, 6vw, 54px); }
.hero-lead { font-size: 20px; color: var(--body); max-width: 560px; }
.trust { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 15px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.listener-card { flex: 1 1 340px; min-width: 0; background: #fff; border-radius: 28px; padding: 30px; box-shadow: 0 20px 50px rgba(74, 44, 107, .12); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.avatar { width: 116px; height: 116px; border-radius: 50%; background: var(--accent-soft); border: 6px solid #F7F2FA; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.avatar svg { width: 56px; height: 56px; }
.price-rows { width: 100%; background: var(--ground); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.price-rows div { display: flex; justify-content: space-between; gap: 10px; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.chip { background: #fff; border: 1px solid var(--line); padding: 10px 20px; border-radius: 999px; font-size: 17px; }

.about { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.about-img { flex: 1 1 260px; min-height: 280px; border-radius: 28px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.about-text { flex: 999 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.plans { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 32px; }
.plan { flex: 1 1 320px; min-width: 0; border-radius: 26px; padding: 30px; display: flex; flex-direction: column; gap: 14px; background: #fff; border: 1.5px solid var(--line); }
.plan-dark { background: var(--night); color: #fff; border-color: var(--night); }
.plan-dark .plan-list { color: #E6DDF0; }
.plan-price { font-family: var(--head); font-size: 42px; font-weight: 700; }
.plan-list { margin: 0; padding: 0 20px 0 0; line-height: 2; color: var(--body); }
.plan .btn { margin-top: auto; }
.pay-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.pay-step { display: flex; gap: 12px; align-items: flex-start; }
.pay-step b.n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }

details.faq { background: var(--ground); border-radius: 16px; padding: 16px 22px; }
details.faq summary { font-weight: 600; font-size: 18px; cursor: pointer; }
details.faq p { margin-top: 10px; color: var(--body); }

.crisis { background: var(--warn-soft); border: 1.5px solid var(--warn-line); border-radius: 20px; padding: 20px 24px; color: var(--warn); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.crisis strong { font-size: 20px; }

.site-footer { border-top: 1px solid #E7E0EE; background: #fff; }
.site-footer .wrap { padding-top: 26px; padding-bottom: 26px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; color: var(--muted); font-size: 15px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { text-decoration: none; }

/* النماذج */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.field input, .field textarea, .field select { min-height: 50px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; font-family: inherit; font-size: 16px; background: #fff; color: var(--ink); font-weight: 400; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field .hint { font-weight: 400; font-size: 13px; color: var(--faint); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.alert { border-radius: 14px; padding: 14px 16px; font-size: 15px; }
.alert-error { background: #FDECEA; color: #8A1F14; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-info { background: var(--accent-soft); color: var(--accent-dark); }
.upload { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; border: 1.5px dashed #CDBFDB; border-radius: 12px; color: var(--accent); font-weight: 600; cursor: pointer; padding: 10px; text-align: center; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload.has-file { border-style: solid; background: var(--ok-soft); color: var(--ok); }

/* صفحات التطبيق (مكالمة، حجز) */
.app-page { min-height: 100vh; display: flex; flex-direction: column; }
.app-main { flex: 1; padding: 28px 0 48px; }
.panel { background: #fff; border-radius: var(--radius); padding: 22px; }
.panel h2 { font-size: 19px; margin-bottom: 12px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.day { flex: none; width: 70px; min-height: 64px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-family: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.3; }
.day small { font-size: 12px; }
.day b { font-size: 19px; }
.day[aria-pressed="true"], .slot[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot { min-height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; }
.wallet-box { background: var(--ground); border: 1.5px dashed #CDBFDB; border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.wallet-number { font-family: var(--head); font-size: 22px; font-weight: 600; letter-spacing: 1px; direction: ltr; }
.summary-bar { background: var(--night); color: #fff; border-radius: 20px; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.summary-bar .plan-price { font-size: 26px; }

/* شاشة المكالمة */
.call-screen { background: var(--night); color: #fff; min-height: 100vh; display: flex; flex-direction: column; }
.call-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; gap: 10px; }
.call-top .tiny { color: #D9D0E3; }
.call-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; max-width: 460px; width: 100%; margin: 0 auto; }
.ring { width: 190px; height: 190px; border-radius: 50%; background: rgba(176, 140, 210, .14); display: flex; align-items: center; justify-content: center; }
.ring > div { width: 146px; height: 146px; border-radius: 50%; background: rgba(176, 140, 210, .22); display: flex; align-items: center; justify-content: center; }
.ring > div > div { width: 108px; height: 108px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.ring.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .ring.pulse { animation: none; } }
.call-name { font-size: 25px; }
.call-state { color: #A8E0D4; display: flex; align-items: center; gap: 8px; }
.call-clock { font-family: var(--head); font-size: 32px; font-weight: 600; direction: ltr; }
.meter { width: 100%; background: rgba(255,255,255,.08); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.meter-head { display: flex; justify-content: space-between; font-size: 14px; color: #E6DDF0; }
.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: #4FC1A9; border-radius: 3px; transition: width 1s linear; }
.bar.low i { background: #F2A65A; }
.call-controls { display: flex; justify-content: center; gap: 28px; padding: 10px 20px 8px; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: #D9D0E3; }
.ctl button { width: 64px; height: 64px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; }
.ctl button[aria-pressed="true"] { background: #fff; color: var(--night); }
.ctl .end { width: 76px; height: 76px; background: #D2453B; }
.call-crisis { margin: 12px 20px 22px; background: rgba(255,255,255,.07); border-radius: 16px; padding: 12px 16px; font-size: 13px; color: #E6DDF0; text-align: center; }
.call-crisis b { color: #fff; font-size: 15px; }
.call-form { width: 100%; background: #fff; color: var(--ink); border-radius: var(--radius); padding: 22px; text-align: right; }
.toast { position: fixed; inset-inline: 16px; bottom: 20px; max-width: 460px; margin: 0 auto; background: #FFF1DB; color: #6A3B00; border-radius: 14px; padding: 14px 16px; font-weight: 600; text-align: center; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.2); }

/* لوحة التحكم */
.admin-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.admin-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.admin-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; }
.switch input { width: 54px; height: 30px; appearance: none; background: #D6CDE0; border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: right .2s; }
.switch input:checked { background: var(--ok-dot); }
.switch input:checked::after { right: 27px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--ground); border-radius: 14px; padding: 12px 14px; }
.item-booked { background: #EEE6F6; border: 1.5px solid #CDB7E2; }
.empty { color: var(--faint); font-size: 15px; padding: 10px 0; }
.table-box { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
table.data th, table.data td { padding: 10px 8px; border-bottom: 1px solid #EEE7F3; text-align: right; vertical-align: middle; }
table.data th { color: var(--muted); font-weight: 600; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.st-pending { background: #FFF1DB; color: #7A4A00; }
.st-confirmed { background: var(--ok-soft); color: var(--ok); }
.st-rejected, .st-cancelled, .st-no_show { background: #F3EEF6; color: var(--muted); }
.st-completed { background: #E7EEFA; color: #23457A; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-family: inherit; cursor: pointer; min-height: 40px; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.days-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.days-pick label { display: flex; align-items: center; gap: 6px; background: var(--ground); padding: 8px 12px; border-radius: 10px; font-weight: 400; }
dialog { border: none; border-radius: 20px; padding: 22px; max-width: 520px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(20, 10, 30, .5); }
dialog img { border-radius: 12px; max-height: 70vh; display: block; margin: 0 auto 14px; }
.stat { background: var(--ground); border-radius: 14px; padding: 12px 14px; }
.stat b { font-family: var(--head); font-size: 22px; display: block; }

@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .nav { display: none; }
  .hero { padding: 36px 0; }
  .section-title { font-size: 28px; }
}
.ok-text { color: var(--ok); }
article.panel h2 { font-size: 20px; margin-top: 8px; }
.hero-text .pill, .plan .pill { align-self: flex-start; }
.plan-dark .pill-off { background: rgba(255,255,255,.14); color: #fff; }
#faq details.faq { background: #fff; }
.plans + .card { margin-top: 24px; }
.summary-bar .plan-price { white-space: nowrap; }
#stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; gap: 10px; }
.call-body > .stack { align-items: center; width: 100%; }
