/* =========================================================
   Blue AI — Design System
   RTL · Light / Dark · Mobile-first
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --font: 'Alexandria', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-head: 'Alexandria', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-read: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --bg: #F6F8FC;
  --bg-soft: #EEF2F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFD;
  --border: #E4E9F2;
  --border-2: #D2DAE7;
  --text: #0D1730;
  --text-2: #4A5672;
  --text-3: #7C879F;

  --primary: #1B2CD8;
  --primary-hover: #1422AE;
  --primary-soft: #ECEEFF;
  --primary-text: #1B2CD8;
  --ring: rgba(27, 44, 216, .28);
  --mint: #13D98C;
  --mint-soft: #E3FBF0;
  --sun: #FFD60A;
  --ink: #0E0B0D;
  --lav: #F1EFFF;
  --sky: #E9F9FD;

  --success: #0F9D6B;  --success-soft: #E5F6EE;
  --warn: #A86A12;     --warn-soft: #FFF4DE;
  --danger: #D23434;   --danger-soft: #FDECEC;

  --navy: #0E0B0D;
  --navy-2: #1A1619;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --sh-1: 0 1px 2px rgba(13, 23, 48, .06), 0 1px 1px rgba(13, 23, 48, .03);
  --sh-2: 0 6px 20px -6px rgba(13, 23, 48, .12), 0 2px 4px rgba(13, 23, 48, .04);
  --sh-3: 0 30px 70px -24px rgba(13, 23, 48, .35);

  --container: 1180px;
  --nav-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090F1F;  --bg-soft: #0D1428;  --surface: #111930;  --surface-2: #151E37;
    --border: #212B46;  --border-2: #2C3757;
    --text: #E8EDF8;  --text-2: #A6B1C9;  --text-3: #74809B;
    --primary: #5263FF;  --primary-hover: #6C7BFF;  --primary-soft: rgba(82, 99, 255, .16);  --primary-text: #9DA7FF;  --lav: #17162B;  --sky: #0F2128;  --mint-soft: rgba(19, 217, 140, .14);
    --ring: rgba(74, 123, 255, .4);
    --success: #34C48D; --success-soft: rgba(52, 196, 141, .13);
    --warn: #E5A43B;    --warn-soft: rgba(229, 164, 59, .13);
    --danger: #F06464;  --danger-soft: rgba(240, 100, 100, .13);
    --sh-1: 0 1px 2px rgba(0, 0, 0, .3);
    --sh-2: 0 8px 24px -8px rgba(0, 0, 0, .5);
    --sh-3: 0 30px 70px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #090F1F;  --bg-soft: #0D1428;  --surface: #111930;  --surface-2: #151E37;
  --border: #212B46;  --border-2: #2C3757;
  --text: #E8EDF8;  --text-2: #A6B1C9;  --text-3: #74809B;
  --primary: #5263FF;  --primary-hover: #6C7BFF;  --primary-soft: rgba(82, 99, 255, .16);  --primary-text: #9DA7FF;  --lav: #17162B;  --sky: #0F2128;  --mint-soft: rgba(19, 217, 140, .14);
  --ring: rgba(74, 123, 255, .4);
  --success: #34C48D; --success-soft: rgba(52, 196, 141, .13);
  --warn: #E5A43B;    --warn-soft: rgba(229, 164, 59, .13);
  --danger: #F06464;  --danger-soft: rgba(240, 100, 100, .13);
  --sh-1: 0 1px 2px rgba(0, 0, 0, .3);
  --sh-2: 0 8px 24px -8px rgba(0, 0, 0, .5);
  --sh-3: 0 30px 70px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
.ic { display: inline-block; flex-shrink: 0; vertical-align: middle; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
ul, ol { padding: 0; list-style: none; }
code, pre { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary); color: #fff; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container-sm { max-width: 760px; }
.section { padding-block: 96px; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.sec-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.sec-head h2 { font-size: clamp(28px, 4vw, 40px); margin-block: 14px 14px; }
.sec-head p { color: var(--text-2); font-size: 18px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--primary-text);
  background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  padding: 5px 12px; border-radius: 99px;
}
.eyebrow-dark { color: #BFD0FF; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand-name { font-family: var(--font-head); font-size: 20px; font-weight: 600; letter-spacing: -.02em; direction: ltr; }
.brand-name b { color: var(--primary); font-weight: 700; }
a:hover .brand { text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding-inline: 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
  text-decoration: none !important; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn .ic { margin-block: -2px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(13, 23, 48, .15), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border-2); box-shadow: var(--sh-1); }
.btn-outline:hover { border-color: var(--text-3); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-white { background: #fff; color: #0B1430; }
.btn-white:hover { background: #E9EEFF; }
.btn-glass { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .18); }
.btn-glass:hover { background: rgba(255, 255, 255, .14); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { height: 38px; padding-inline: 18px; font-size: 14px; }
.btn-xs { height: 30px; padding-inline: 12px; font-size: 13px; }
.btn-lg { height: 52px; padding-inline: 30px; font-size: 16px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  color: var(--text-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: inline-block; }
:root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: inline-block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s;
}
.nav[data-scrolled] { border-bottom-color: var(--border); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: 12px; }
.nav-links > a, .nav-link {
  color: var(--text-2); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 10px;
}
.nav-links > a:hover, .nav-link:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav-links > a[aria-current] { color: var(--text); }
.nav-act { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.nav-burger, .nav-mobile-act { display: none; }

/* شريط التنقل فوق الهيرو الغامق */
.nav-dark:not([data-scrolled]) { background: transparent; }
.nav-dark:not([data-scrolled]) .brand, .nav-dark:not([data-scrolled]) .nav-links > a,
.nav-dark:not([data-scrolled]) .nav-link, .nav-dark:not([data-scrolled]) .icon-btn { color: #DCE4F7; }
.nav-dark:not([data-scrolled]) .nav-links > a:hover, .nav-dark:not([data-scrolled]) .nav-link:hover,
.nav-dark:not([data-scrolled]) .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-dark:not([data-scrolled]) .brand-name b { color: #8EAFFF; }

@media (max-width: 920px) {
  .hide-sm { display: none !important; }
  .nav-burger { display: inline-grid; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; margin: 0; padding: 16px 20px 24px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--sh-2);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s;
  }
  .nav-links > a { padding: 12px; font-size: 16px; color: var(--text) !important; }
  .nav[data-open] .nav-links { transform: none; opacity: 1; visibility: visible; }
  .nav[data-open] { background: var(--surface) !important; }
  .nav[data-open] .brand, .nav[data-open] .icon-btn { color: var(--text) !important; }
  .nav-mobile-act { display: grid; gap: 10px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
}

/* ---------- Hero (فاتح، نص + معاينة جنب بعض) ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: 72px 88px;
  background:
    radial-gradient(700px 420px at 12% 18%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 65%),
    radial-gradient(520px 360px at 95% 90%, rgba(20, 184, 166, .10), transparent 65%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 10%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 60% 70% at 20% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 20% 40%, #000 20%, transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.2; font-weight: 700; margin-block: 20px 18px; letter-spacing: -.02em; }
.hero h1 .grad { background: linear-gradient(90deg, var(--primary), #14B8A6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); max-width: 560px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-tags li { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); box-shadow: var(--sh-1); }
.hero-tags .ic { color: var(--primary-text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-trust { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--text-3); font-size: 14px; }
.hero-trust .ic { color: var(--success); }
.hero-visual { position: relative; min-width: 0; }
.hero-copy { min-width: 0; }
.hero-visual::before { content: ""; position: absolute; inset: 8% -4% -6% 6%; border-radius: 32px; background: linear-gradient(135deg, var(--primary), #14B8A6); opacity: .12; transform: rotate(-3deg); }

/* ---------- Product mockup ---------- */
.mock {
  position: relative; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--sh-3); overflow: hidden;
}
.mock-bar { display: flex; align-items: center; gap: 14px; height: 42px; padding-inline: 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mock-dots { display: flex; gap: 6px; direction: ltr; }
.mock-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-2); }
.mock-url { flex: 1; max-width: 260px; margin-inline: auto; height: 24px; border-radius: 7px; background: var(--bg-soft); color: var(--text-3); font-size: 12px; display: grid; place-items: center; direction: ltr; }
.mock-tabs { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.mock-tabs::-webkit-scrollbar { display: none; }
.mock-tab {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 11px; border-radius: 99px;
  font-size: 13px; font-weight: 500; color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; transition: .15s;
}
.mock-tab:hover { color: var(--text); border-color: var(--border-2); }
.mock-tab[aria-selected="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.mock-chat { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 16px; min-height: 330px; }
.mock-q { align-self: flex-start; max-width: 85%; background: var(--primary); color: #fff; padding: 11px 15px; border-radius: 16px 16px 16px 4px; font-size: 14.5px; }
.mock-a { display: flex; gap: 10px; align-items: flex-start; }
.mock-a-body { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; padding: 14px 16px; font-size: 14px; line-height: 1.85; white-space: pre-line; min-height: 180px; color: var(--text); }
.mock-a-body.typing::after { content: ""; display: inline-block; width: 7px; height: 15px; background: var(--primary); margin-inline-start: 2px; vertical-align: -2px; animation: blink 1s steps(2) infinite; }
.mock-input { margin: 0 22px 20px; display: flex; align-items: center; gap: 10px; height: 46px; border: 1px solid var(--border-2); border-radius: 13px; padding-inline: 14px 6px; color: var(--text-3); font-size: 14px; }
.mock-input span { flex: 1; }
.mock-input i { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); display: grid; place-items: center; color: #fff; }
@keyframes blink { 50% { opacity: 0; } }

.float-card { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-2); font-size: 13px; line-height: 1.4; animation: floaty 6s ease-in-out infinite; }
.float-card strong { display: block; font-size: 13.5px; }
.float-card small { color: var(--text-3); }
.fc-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.fc-ic.ok { background: var(--success-soft); color: var(--success); }
.fc-1 { inset-inline-end: -22px; top: 92px; }
.fc-2 { inset-inline-start: -26px; bottom: 54px; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-tags, .hero-cta, .hero-trust { justify-content: center; }
  .hero-visual { max-width: 620px; margin-inline: auto; width: 100%; }
}
@media (max-width: 600px) {
  .hero { padding-block: 40px 56px; }
  .float-card { display: none; }
  .mock-chat { padding: 16px; min-height: 0; }
  .mock-input { margin: 0 16px 16px; }
  .hero-trust { flex-wrap: wrap; font-size: 13px; }
}

/* ---------- شريط المهن ---------- */
.prof-strip { padding-block: 34px; border-block: 1px solid var(--border); background: var(--surface); }
.prof-strip p { text-align: center; color: var(--text-3); font-size: 14px; font-weight: 500; margin-bottom: 18px; }
.prof-strip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; }
.prof-strip-row a { display: inline-flex; align-items: center; gap: 9px; color: var(--text-2); font-weight: 600; font-size: 15px; opacity: .85; transition: .15s; }
.prof-strip-row a:hover { color: var(--primary-text); opacity: 1; text-decoration: none; }
.prof-strip-row .ic { color: var(--primary-text); }

/* ---------- Stats band ---------- */
.stats-band {
  border-radius: var(--r-xl); padding: 44px 32px; color: #fff;
  background: radial-gradient(500px 260px at 0% 100%, rgba(20, 184, 166, .35), transparent 60%), linear-gradient(120deg, #1D47D6, #2F64F5);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center;
}
.stats-band strong { display: block; font-family: var(--font-head); font-size: clamp(30px, 4vw, 42px); font-weight: 700; line-height: 1.1; }
.stats-band span { color: #D6E1FF; font-size: 15px; }
@media (max-width: 760px) { .stats-band { grid-template-columns: 1fr 1fr; padding: 32px 18px; gap: 28px 12px; } }

/* ---------- Professions ---------- */
.prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.prof {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px;
  transition: border-color .2s, box-shadow .2s, transform .2s; color: var(--text); text-decoration: none !important;
}
.prof:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: var(--sh-2); transform: translateY(-2px); }
.prof-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.prof h3 { font-size: 18px; }
.prof p { color: var(--text-2); font-size: 14.5px; line-height: 1.65; }
.prof-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.prof-tags span { font-size: 12.5px; padding: 3px 9px; border-radius: 99px; background: var(--bg-soft); color: var(--text-2); }
.prof-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 14px; }
.prof-foot strong { font-family: var(--font-head); color: var(--text); }
.prof-foot .go { color: var(--primary-text); display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.prof-cta { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; background: linear-gradient(150deg, var(--primary), #1C3BB0); color: #fff; border: 0; }
.prof-cta p { color: #D7E1FF; }
.prof-cta .prof-ic { background: rgba(255, 255, 255, .15); color: #fff; }

/* ---------- Features ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.feat { background: var(--surface); padding: 34px 30px; }
.feat-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); margin-bottom: 18px; }
.feat h3 { font-size: 18px; margin-bottom: 8px; }
.feat p { color: var(--text-2); font-size: 15px; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feat-grid { grid-template-columns: 1fr; } .feat { padding: 26px 22px; } }

/* ---------- Showcase (split) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split h2 { font-size: clamp(26px, 3.4vw, 36px); margin-block: 14px; }
.split > div > p { color: var(--text-2); font-size: 17px; }
.check-list { display: grid; gap: 14px; margin-top: 26px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .ic { color: var(--success); margin-top: 4px; }
.check-list strong { display: block; }
.check-list span { color: var(--text-2); font-size: 15px; }
.tpl-demo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 24px; box-shadow: var(--sh-2); }
.tpl-demo-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tpl-demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl-chip { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); font-weight: 500; font-size: 14.5px; background: var(--surface-2); }
.tpl-chip .ic { color: var(--primary-text); }
.tpl-demo-input { margin-top: 14px; padding: 14px 16px; border-radius: var(--r); border: 1.5px solid var(--primary); background: var(--primary-soft); font-size: 14.5px; line-height: 1.8; }
.tpl-demo-input mark { background: color-mix(in srgb, var(--primary) 22%, transparent); color: var(--primary-text); border-radius: 4px; padding: 0 4px; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.step-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; background: var(--text); color: var(--surface); margin-bottom: 18px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--text-2); font-size: 15px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.seg-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.seg-pick a {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding-inline: 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 500; font-size: 14.5px; text-decoration: none;
}
.seg-pick a:hover { color: var(--text); border-color: var(--border-2); }
.seg-pick a[aria-current] { background: var(--text); color: var(--surface); border-color: var(--text); }
.period { display: flex; width: max-content; margin: 0 auto 40px; padding: 4px; border-radius: 99px; background: var(--bg-soft); border: 1px solid var(--border); }
.period button { height: 38px; padding-inline: 20px; border-radius: 99px; font-weight: 600; font-size: 14.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; }
.period button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.period .save { font-size: 12px; font-weight: 600; color: var(--success); background: var(--success-soft); padding: 2px 8px; border-radius: 99px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 30px; }
.plan-star { border: 2px solid var(--primary); box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--primary) 50%, transparent); }
.plan-badge { position: absolute; top: -13px; inset-inline-start: 28px; background: var(--primary); color: #fff; font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 99px; }
.plan h3 { font-size: 20px; }
.plan-desc { color: var(--text-2); font-size: 14.5px; margin-top: 4px; }
.plan-price { margin-block: 22px 6px; display: flex; align-items: baseline; gap: 6px; }
.plan-price strong { font-family: var(--font-head); font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.plan-price span { color: var(--text-2); font-size: 15px; }
.plan-note { color: var(--text-3); font-size: 13.5px; min-height: 22px; }
.plan-note s { opacity: .8; }
.plan .btn { margin-block: 22px 24px; }
.plan-feat { display: grid; gap: 12px; padding-top: 22px; border-top: 1px solid var(--border); }
.plan-feat li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan-feat .ic { color: var(--primary-text); margin-top: 4px; }
.plans [data-y] { display: none; }
.plans[data-period="yearly"] [data-m] { display: none; }
.plans[data-period="yearly"] [data-y] { display: initial; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

.trial-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 28px; padding: 22px 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px dashed var(--border-2); }
.trial-band strong { font-family: var(--font-head); font-size: 17px; }
.trial-band p { color: var(--text-2); font-size: 15px; }

.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--border); }
.compare thead th { font-family: var(--font-head); font-size: 15px; color: var(--text); }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare tbody th { font-weight: 500; color: var(--text-2); }
.compare .ic.yes { color: var(--success); margin-inline: auto; }
.compare .ic.no { color: var(--text-3); margin-inline: auto; opacity: .6; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); transition: border-color .2s; }
.faq details[open] { border-color: var(--border-2); box-shadow: var(--sh-1); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; font-weight: 600; font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--text-3); transition: transform .2s; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details > div { padding: 0 22px 20px; color: var(--text-2); }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 64px 32px; text-align: center; color: #fff;
  background: radial-gradient(600px 300px at 90% 0%, rgba(111, 227, 240, .25), transparent 60%), linear-gradient(135deg, #1C3FD0, #0B1638);
}
.cta h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 12px; }
.cta p { color: #C6D2F2; font-size: 17px; margin-bottom: 28px; }
.cta .hero-cta { margin-top: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding-top: 64px; margin-top: 96px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand p { color: var(--text-2); font-size: 15px; margin-block: 14px 18px; max-width: 320px; }
.footer h3 { font-size: 14.5px; margin-bottom: 14px; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { color: var(--text-2); font-size: 14.5px; }
.footer ul a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-block: 22px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 13.5px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.wa-float { position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 40; width: 54px; height: 54px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px -6px rgba(37, 211, 102, .6); transition: transform .2s; }
.wa-float:hover { transform: scale(1.06); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 16px; inset-inline: 0; z-index: 300; display: grid; justify-items: center; gap: 8px; padding-inline: 16px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 520px; width: max-content;
  padding: 12px 12px 12px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--sh-2); font-size: 15px; animation: toast-in .3s ease;
}
.toast-ok .ic:first-child { color: var(--success); }
.toast-err .ic:first-child { color: var(--danger); }
.toast-info .ic:first-child { color: var(--primary); }
.toast-x { color: var(--text-3); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; }
.toast-x:hover { background: var(--bg-soft); }
.toast.out { opacity: 0; transform: translateY(-8px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field > label, .label { font-weight: 600; font-size: 14.5px; }
.field .hint { color: var(--text-3); font-size: 13px; font-weight: 400; }
.input, .form input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]), .form select, .form textarea {
  width: 100%; height: 46px; padding-inline: 14px; border-radius: var(--r); border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font-size: 15.5px; transition: border-color .15s, box-shadow .15s;
}
.form textarea { height: auto; padding-block: 12px; resize: vertical; }
.form select { appearance: none; -webkit-appearance: none; padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C879F' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--text-3); }
.form input:focus, .form select:focus, .form textarea:focus, .input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.form input[dir="ltr"] { text-align: left; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-start: 46px !important; }
.pw-wrap button { position: absolute; inset-inline-start: 4px; top: 4px; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; color: var(--text-3); }
.pw-wrap button:hover { color: var(--text); background: var(--bg-soft); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: end; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 14.5px; }
.alert .ic { margin-top: 3px; }
.alert-err { background: var(--danger-soft); color: var(--danger); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--primary-soft); color: var(--primary-text); }
.alert-ok { background: var(--success-soft); color: var(--success); }
.alert ul { display: grid; gap: 2px; }

/* اختيار المهنة في التسجيل */
.seg-radio { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.seg-radio label { position: relative; cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span {
  display: flex; align-items: center; gap: 10px; height: 48px; padding-inline: 12px; border-radius: var(--r);
  border: 1px solid var(--border-2); background: var(--surface); font-size: 14.5px; font-weight: 500; transition: .15s;
}
.seg-radio span .ic { color: var(--text-3); }
.seg-radio label:hover span { border-color: var(--text-3); }
.seg-radio input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); box-shadow: 0 0 0 1px var(--primary); }
.seg-radio input:checked + span .ic { color: var(--primary-text); }
.seg-radio input:focus-visible + span { box-shadow: 0 0 0 4px var(--ring); }

/* ---------- Auth ---------- */
.auth-body { background: var(--surface); }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; min-height: 100dvh; }
.auth-form { display: flex; flex-direction: column; padding: 28px clamp(20px, 5vw, 64px); }
.auth-top { display: flex; align-items: center; justify-content: space-between; }
.auth-card { width: 100%; max-width: 420px; margin: auto; padding-block: 40px; }
.auth-card h1 { font-size: 30px; margin-bottom: 6px; }
.auth-sub { color: var(--text-2); margin-bottom: 28px; }
.auth-alt { margin-top: 22px; text-align: center; color: var(--text-2); font-size: 15px; }
.auth-legal { text-align: center; color: var(--text-3); font-size: 13px; }
.auth-aside {
  position: relative; overflow: hidden; color: #fff; margin: 12px; border-radius: 24px;
  background: radial-gradient(700px 400px at 100% 0%, rgba(59, 108, 255, .55), transparent 60%),
              radial-gradient(500px 300px at 0% 100%, rgba(38, 200, 220, .2), transparent 60%), #0A1230;
  display: flex; align-items: center;
}
.auth-aside::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(180deg, #000, transparent); -webkit-mask-image: linear-gradient(180deg, #000, transparent);
}
.auth-aside-in { position: relative; padding: 56px; max-width: 560px; }
.auth-aside h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.3; margin-block: 20px 28px; }
.auth-points { display: grid; gap: 14px; color: #C6D2F2; }
.auth-points li { display: flex; gap: 10px; align-items: flex-start; }
.auth-points .ic { color: #6FE3F0; margin-top: 4px; }
.auth-preview { margin-top: 40px; padding: 18px; border-radius: 18px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(8px); display: grid; gap: 14px; }
.ap-q { display: flex; align-items: center; gap: 8px; align-self: start; width: max-content; max-width: 100%; background: #2D5BFF; padding: 10px 14px; border-radius: 14px 14px 14px 4px; font-size: 14.5px; }
.ap-a { display: flex; gap: 10px; }
.ap-a > div { flex: 1; display: grid; gap: 8px; padding-top: 4px; }
.sk { display: block; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .16); }
.w90 { width: 90%; } .w75 { width: 75%; } .w60 { width: 60%; }
@media (max-width: 960px) { .auth { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* ---------- Generic cards / page ---------- */
.page-head { padding-block: 56px 28px; }
.page-head h1 { font-size: clamp(28px, 4vw, 38px); }
.page-head p { color: var(--text-2); margin-top: 6px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; }
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.card-head h2 .ic { color: var(--text-3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

.meter { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #5B8CFF); transition: width .4s; }
.meter.warn > span { background: var(--warn); }
.meter.full > span { background: var(--danger); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding-inline: 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--bg-soft); color: var(--text-2); white-space: nowrap; }
.badge-primary { background: var(--primary-soft); color: var(--primary-text); }
.badge-ok, .s-active { background: var(--success-soft); color: var(--success); }
.badge-warn, .s-pending { background: var(--warn-soft); color: var(--warn); }
.badge-err, .s-cancelled { background: var(--danger-soft); color: var(--danger); }
.s-expired { background: var(--bg-soft); color: var(--text-3); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: start; font-weight: 600; font-size: 13px; color: var(--text-3); background: var(--surface-2); padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { font-variant-numeric: tabular-nums; }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.cell-user strong { display: block; font-weight: 600; }
.cell-user small { color: var(--text-3); font-size: 13px; }
.avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: 14px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.inline { display: inline; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty-state .ic { margin: 0 auto 14px; color: var(--text-3); }
.empty-state h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.summary-list { display: grid; gap: 14px; }
.summary-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.summary-list dt { color: var(--text-2); }
.summary-list dd { font-weight: 600; text-align: end; }
.summary-total { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: baseline; }
.summary-total strong { font-family: var(--font-head); font-size: 30px; }
.pay-steps { display: grid; gap: 0; }
.pay-step { display: grid; grid-template-columns: 40px 1fr; gap: 16px; position: relative; padding-bottom: 28px; }
.pay-step:last-child { padding-bottom: 0; }
.pay-step::before { content: ""; position: absolute; inset-inline-start: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--border); }
.pay-step:last-child::before { display: none; }
.pay-step .step-n { margin: 0; width: 40px; height: 40px; }
.pay-step h3 { font-size: 17px; margin-bottom: 4px; }
.pay-step p { color: var(--text-2); font-size: 15px; }
.copy-box { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 6px 6px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--border-2); }
.copy-box code { flex: 1; font-size: 15.5px; font-weight: 600; direction: ltr; text-align: left; overflow-wrap: anywhere; }
.order-ref { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 700; background: var(--primary-soft); color: var(--primary-text); padding: 4px 12px; border-radius: 8px; direction: ltr; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }

/* ---------- Prose (privacy) ---------- */
.prose h2 { font-size: 22px; margin-block: 36px 12px; }
.prose p, .prose li { color: var(--text-2); font-size: 16.5px; }
.prose ul { list-style: disc; padding-inline-start: 22px; display: grid; gap: 6px; margin-top: 8px; }

/* =========================================================
   App (Dashboard / Chat)
   ========================================================= */
.app-body { height: 100vh; height: 100dvh; overflow: hidden; background: var(--bg); }
.app { display: grid; grid-template-columns: 280px 1fr; height: 100%; }
.side { display: flex; flex-direction: column; background: var(--surface); border-inline-end: 1px solid var(--border); min-height: 0; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px; }
.side-new { margin: 4px 14px 10px; }
.side-search { margin: 0 14px 8px; position: relative; }
.side-search input { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); padding-inline: 36px 12px; font-size: 14px; }
.side-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.side-search .ic { position: absolute; inset-inline-start: 11px; top: 10px; color: var(--text-3); }
.side-label { padding: 12px 18px 6px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.convs { flex: 1; overflow-y: auto; padding: 0 10px 10px; min-height: 0; }
.conv { position: relative; display: flex; align-items: center; border-radius: 10px; }
.conv a { flex: 1; min-width: 0; padding: 9px 10px; color: var(--text-2); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.conv:hover { background: var(--bg-soft); }
.conv:hover a { color: var(--text); }
.conv.is-on { background: var(--primary-soft); }
.conv.is-on a { color: var(--primary-text); font-weight: 600; }
.conv .icon-btn { width: 30px; height: 30px; margin-inline-end: 4px; opacity: 0; color: var(--text-3); }
.conv:hover .icon-btn, .conv .icon-btn:focus-visible, .conv .icon-btn[data-armed="1"] { opacity: 1; }
.conv .icon-btn[data-armed="1"] { color: var(--danger); background: var(--danger-soft); width: auto; padding-inline: 8px; font-size: 12.5px; font-weight: 600; }
.side-foot { border-top: 1px solid var(--border); padding: 14px; display: grid; gap: 12px; }
.quota-card { padding: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.quota-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; margin-bottom: 8px; }
.quota-row strong { font-weight: 600; }
.quota-card .meter { height: 6px; }
.quota-card p { font-size: 12.5px; color: var(--text-3); margin-top: 8px; }
.quota-card .btn { margin-top: 10px; }
.user-menu { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r); }
.user-menu > div { flex: 1; min-width: 0; line-height: 1.35; }
.user-menu strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu small { color: var(--text-3); font-size: 12.5px; }
.user-links { display: flex; gap: 2px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-top { display: flex; align-items: center; gap: 10px; height: 60px; padding-inline: 18px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); }
.main-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; min-width: 0; }
.main-title .prof-ic { width: 32px; height: 32px; border-radius: 9px; }
.main-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-top-act { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.side-open, .side-close { display: none; }
.model-pick { display: flex; padding: 3px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border); }
.model-pick label { position: relative; cursor: pointer; }
.model-pick input { position: absolute; opacity: 0; }
.model-pick span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.model-pick input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.model-pick input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }
.model-lock { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding-inline: 10px; border-radius: 10px; font-size: 13px; color: var(--text-3); border: 1px dashed var(--border-2); text-decoration: none !important; }
.model-lock:hover { color: var(--primary-text); border-color: var(--primary); }

.thread { flex: 1; overflow-y: auto; min-height: 0; scroll-behavior: smooth; }
.thread-in { max-width: 820px; margin-inline: auto; padding: 32px 22px 24px; display: flex; flex-direction: column; gap: 26px; }

.welcome { text-align: center; padding-top: 4vh; }
.welcome-ic { width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 18px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.welcome h2 { font-size: clamp(24px, 3vw, 30px); margin-bottom: 8px; }
.welcome > p { color: var(--text-2); }
.tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 28px; text-align: start; }
.tpl { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); text-align: start; transition: .15s; }
.tpl:hover { border-color: var(--primary); box-shadow: var(--sh-2); transform: translateY(-1px); }
.tpl strong { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.tpl strong .ic { color: var(--primary-text); }
.tpl span { color: var(--text-3); font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-lock { margin-top: 24px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); padding: 10px 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); }
.disclaimer { display: inline-flex; align-items: flex-start; gap: 8px; margin-top: 28px; padding: 12px 16px; border-radius: var(--r); background: var(--warn-soft); color: var(--warn); font-size: 13.5px; text-align: start; max-width: 640px; }
.disclaimer .ic { margin-top: 3px; }

.msg { display: flex; gap: 14px; }
.msg-user { justify-content: flex-end; }
.msg-user .msg-body { max-width: 80%; background: var(--primary); color: #fff; padding: 12px 16px; border-radius: 18px 18px 18px 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.msg-ai .msg-av { flex-shrink: 0; margin-top: 2px; }
.msg-ai .msg-col { flex: 1; min-width: 0; }
.msg-ai .msg-body { font-size: 15.5px; line-height: 1.9; overflow-wrap: anywhere; }
.msg-tools { display: flex; gap: 4px; margin-top: 8px; opacity: 0; transition: opacity .15s; }
.msg-ai:hover .msg-tools, .msg-ai:focus-within .msg-tools, .msg-ai:last-child .msg-tools { opacity: 1; }
.msg-tools button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 10px; border-radius: 8px; font-size: 13px; color: var(--text-3); }
.msg-tools button:hover { background: var(--bg-soft); color: var(--text); }
.msg-err .msg-body { color: var(--danger); background: var(--danger-soft); padding: 12px 16px; border-radius: var(--r); font-size: 15px; }
.msg-err .msg-body .btn { margin-top: 10px; }
.typing { display: inline-flex; gap: 5px; padding: 12px 0; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); animation: dot 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.streaming > :last-child::after { content: ""; display: inline-block; width: 7px; height: 1.05em; background: var(--primary); margin-inline-start: 3px; vertical-align: -3px; animation: blink 1s steps(2) infinite; }

/* Markdown */
.md > * + * { margin-top: 12px; }
.md h3, .md h4 { font-size: 17px; margin-top: 22px; }
.md h3:first-child, .md h4:first-child { margin-top: 0; }
.md ul, .md ol { padding-inline-start: 22px; display: grid; gap: 4px; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li::marker { color: var(--text-3); }
.md strong { font-weight: 700; color: var(--text); }
.md code { font-size: .88em; background: var(--bg-soft); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.md pre { position: relative; background: #0D1526; color: #E3E9F6; border-radius: var(--r); padding: 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; direction: ltr; text-align: left; }
.md pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.md blockquote { border-inline-start: 3px solid var(--primary); padding: 4px 14px; color: var(--text-2); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.md hr { border: 0; border-top: 1px solid var(--border); }
.md table { border-collapse: collapse; width: 100%; font-size: 14.5px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--border); padding: 8px 12px; text-align: start; }
.md th { background: var(--surface-2); font-weight: 600; }

.composer-wrap { padding: 0 22px 18px; }
.composer {
  max-width: 820px; margin-inline: auto; display: flex; align-items: flex-end; gap: 10px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px; padding: 10px 10px 10px 10px;
  box-shadow: var(--sh-2); transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring), var(--sh-2); }
.composer textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; min-height: 28px; max-height: 240px; padding: 6px 8px; font-size: 15.5px; line-height: 1.7; }
.composer .send { width: 42px; height: 42px; padding: 0; border-radius: 12px; flex-shrink: 0; }
.composer .send .ic { transform: scaleX(-1); }
.composer-note { max-width: 820px; margin: 8px auto 0; display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--text-3); }
.counter.over { color: var(--danger); }

.no-plan { flex: 1; display: grid; place-items: center; padding: 24px; }
.no-plan .card { max-width: 480px; text-align: center; padding: 40px 32px; }
.no-plan .welcome-ic { background: var(--warn-soft); color: var(--warn); }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 86vw); z-index: 60; transform: translateX(100%); transition: transform .25s; box-shadow: var(--sh-3); }
  .side.is-open { transform: none; }
  .side-open, .side-close { display: inline-grid; }
  .thread-in { padding: 22px 16px; }
  .composer-wrap { padding: 0 12px 12px; }
  .msg-user .msg-body { max-width: 90%; }
  .composer-note .hide-m { display: none; }
  .main-title small { display: none; }
}
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(5, 10, 25, .45); opacity: 0; visibility: hidden; transition: .2s; }
.side.is-open ~ .scrim, .shell-side.is-open ~ .shell-main ~ .scrim, body[data-side-open] .scrim { opacity: 1; visibility: visible; }

/* =========================================================
   Admin shell
   ========================================================= */
.admin-body { background: var(--bg); }
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.shell-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-inline-end: 1px solid var(--border); padding: 18px 14px; }
.shell-brand { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 14px; }
.shell-close, .shell-open { display: none; }
.shell-label { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 18px 10px 6px; }
.shell-nav { display: grid; gap: 2px; }
.shell-nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding-inline: 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 14.5px; text-decoration: none; }
.shell-nav a:hover { background: var(--bg-soft); color: var(--text); }
.shell-nav a[aria-current] { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.shell-nav a .badge { margin-inline-start: auto; }
.shell-user { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 12px 8px 0; border-top: 1px solid var(--border); }
.shell-user > div { min-width: 0; line-height: 1.4; }
.shell-user strong { display: block; font-size: 14px; }
.shell-user small { color: var(--text-3); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; }
.shell-main { min-width: 0; }
.shell-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 64px; padding-inline: 28px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.shell-top h1 { font-size: 19px; }
.shell-top-act { margin-inline-start: auto; }
.shell-content { padding: 28px; max-width: 1280px; }
.shell-content > * + * { margin-top: 24px; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .shell-side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; z-index: 60; transform: translateX(100%); transition: transform .25s; box-shadow: var(--sh-3); }
  .shell-side.is-open { transform: none; }
  .shell-close, .shell-open { display: inline-grid; }
  .shell-content { padding: 18px 16px; }
  .shell-top { padding-inline: 16px; }
}

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-size: 14px; font-weight: 500; }
.kpi-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.kpi-ic.ok { background: var(--success-soft); color: var(--success); }
.kpi-ic.warn { background: var(--warn-soft); color: var(--warn); }
.kpi strong { display: block; font-family: var(--font-head); font-size: 30px; font-weight: 700; margin-top: 12px; line-height: 1.1; }
.kpi small { color: var(--text-3); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.search-box { position: relative; flex: 1; max-width: 420px; }
.search-box input { width: 100%; height: 42px; border-radius: var(--r); border: 1px solid var(--border-2); background: var(--surface); padding-inline: 40px 14px; }
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.search-box .ic { position: absolute; inset-inline-start: 13px; top: 12px; color: var(--text-3); }
.grant { display: flex; gap: 6px; flex-wrap: wrap; }
.grant select { height: 32px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface); padding-inline: 8px; font-size: 13px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 70px; gap: 12px; align-items: center; font-size: 14px; padding-block: 6px; }
.bar-row .meter { height: 10px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 600px) {
  .section { padding-block: 64px; }
  .sec-head { margin-bottom: 36px; }

  .card { padding: 20px; }
  .plan { padding: 24px; }
  .seg-radio { grid-template-columns: 1fr; }
  .footer { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Landing (الرئيسية) — أبيض/أسود/أزرق ملكي + أخضر نعناعي وأصفر
   ========================================================= */
.chat-font, .md, .msg-body, .composer textarea, .mock-a-body { font-family: var(--font-read); }

.btn-mint { background: var(--mint); color: var(--ink); }
.btn-mint:hover { background: #0FC07B; }
.btn-ink { background: var(--primary); color: #fff; }
.btn-ink:hover { background: var(--primary-hover); }
.btn-sun { background: var(--sun); color: var(--ink); font-weight: 600; }
.btn-sun:hover { background: #F5C800; }
.btn-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-line:hover { border-color: #fff; background: rgba(255, 255, 255, .06); }

/* النافبار أبيض دايمًا زي المرجع */
.nav { background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom-color: var(--border); }
.nav-links > a { font-size: 14.5px; }

/* ---------- Hero أسود ---------- */
.h-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding-block: 72px 80px; text-align: center; }
.h-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 380px at 50% 62%, rgba(27, 44, 216, .38), transparent 70%);
}
.h-hero > .container { position: relative; }
.h-tag { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .28); font-size: 14.5px; color: #E9E9F2; }
.h-tag .ic { color: var(--mint); }
.h-hero h1 { font-weight: 400; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.45; margin-top: 26px; letter-spacing: 0; }
.h-hero h1 b { font-weight: 600; color: #fff; }
.h-hero h1 .hl { color: var(--mint); font-weight: 600; }

.h-stage { position: relative; display: grid; grid-template-columns: 1fr 300px 1fr; align-items: center; gap: 28px; margin-top: 46px; }
.h-pills { display: grid; gap: 30px; }
.h-pills-r { justify-items: end; }
.h-pills-l { justify-items: start; }
.h-pills-r .h-pill:nth-child(2) { margin-inline-end: 70px; }
.h-pills-l .h-pill:nth-child(2) { margin-inline-start: 60px; }
.h-pills-l .h-pill:nth-child(3) { margin-inline-start: 20px; }
.h-pill {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding-inline: 18px 20px; border-radius: 99px;
  border: 1.5px solid currentColor; background: rgba(255, 255, 255, .02); font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background .2s, transform .2s, box-shadow .2s; cursor: pointer;
}
.h-pill:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .06); }
.h-pill[aria-selected="true"] { background: currentColor; box-shadow: 0 8px 30px -6px currentColor; }
.h-pill[aria-selected="true"] span, .h-pill[aria-selected="true"] .ic { color: var(--ink); }
.h-pill.c1 { color: #FF5C93; } .h-pill.c2 { color: #13D98C; } .h-pill.c3 { color: #39D5F2; }
.h-pill.c4 { color: #FFD60A; } .h-pill.c5 { color: #EDEDF5; } .h-pill.c6 { color: #A99BFF; } .h-pill.c7 { color: #FF9F45; }

/* الموبايل */
.phone {
  position: relative; width: 300px; height: 610px; margin-inline: auto; border-radius: 46px; padding: 11px;
  background: #1D1A1C; border: 2px solid #4A4549; box-shadow: 0 0 0 7px #0A080A, 0 40px 90px -20px rgba(27, 44, 216, .65);
}
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #000; z-index: 3; }
.phone-screen { height: 100%; border-radius: 36px; overflow: hidden; background: #fff; color: #0E0B0D; display: flex; flex-direction: column; text-align: start; }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 52px 16px 12px; background: #F4F4F8; border-bottom: 1px solid #E7E7EE; }
.phone-head strong { font-size: 14px; display: block; line-height: 1.3; }
.phone-head small { font-size: 11.5px; color: #13A86E; display: flex; align-items: center; gap: 5px; }
.phone-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #13D98C; }
.phone-chat { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; justify-content: flex-end; }
.phone .mock-q { align-self: flex-start; max-width: 88%; background: var(--primary); color: #fff; padding: 9px 12px; border-radius: 14px 14px 14px 4px; font-size: 13px; line-height: 1.6; }
.phone .mock-a-body { align-self: flex-end; width: 94%; background: #F2F2F7; border: 0; border-radius: 4px 14px 14px 14px; padding: 11px 13px; font-size: 12.5px; line-height: 1.8; white-space: pre-line; color: #1A1A22; min-height: 210px; max-height: 300px; overflow: hidden; }
.phone .mock-a-body.typing::after { content: ""; display: inline-block; width: 6px; height: 13px; background: var(--primary); margin-inline-start: 2px; vertical-align: -2px; animation: blink 1s steps(2) infinite; }
.phone-input { margin: 0 12px 14px; display: flex; align-items: center; gap: 8px; height: 40px; border-radius: 99px; border: 1px solid #E2E2EA; padding-inline: 14px 4px; font-size: 12px; color: #9A9AA8; }
.phone-input span { flex: 1; }
.phone-input i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--ink); }
.phone-input i .ic { transform: scaleX(-1); }

.h-powered { display: inline-flex; align-items: center; gap: 10px; margin-top: 46px; font-size: 20px; font-weight: 500; color: #fff; }
.h-powered .ic { color: var(--mint); }
.h-sub { margin-top: 14px; font-size: clamp(17px, 2vw, 21px); color: #E2E2EC; }
.h-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.h-note { margin-top: 14px; color: #BDBDC9; font-size: 14.5px; }

@media (max-width: 1080px) {
  .h-stage { grid-template-columns: 1fr; }
  .h-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; order: 2; }
  .h-pills-l { order: 3; margin-top: -18px; }
  .h-pills .h-pill { margin: 0 !important; height: 40px; font-size: 14px; padding-inline: 14px 16px; }
  .phone { order: 1; }
}
@media (max-width: 420px) {
  .phone { width: 272px; height: 560px; }
  .h-hero { padding-block: 48px 60px; }
}

/* ---------- شريط الاستخدامات المتحرك ---------- */
.h-trust { padding-block: 80px 70px; background: var(--surface); text-align: center; overflow: hidden; }
.h-trust h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 500; line-height: 1.6; }
.marquee { margin-top: 44px; display: grid; gap: 18px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-row { display: flex; gap: 18px; width: max-content; animation: slide 46s linear infinite; }
.marquee-row.rev { animation-direction: reverse; animation-duration: 52s; }
.marquee:hover .marquee-row { animation-play-state: paused; }
.use-chip { display: inline-flex; align-items: center; gap: 12px; height: 64px; padding-inline: 18px 24px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 500; font-size: 15px; white-space: nowrap; }
.use-chip .uc-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.use-chip small { display: block; font-size: 12px; color: var(--text-3); font-weight: 400; }
@keyframes slide { to { transform: translateX(50%); } }

/* ---------- قسم الأزرق والأسود المائل ---------- */
.h-diag { position: relative; overflow: hidden; color: #fff; padding-block: 96px 110px;
  background:
    linear-gradient(155deg, transparent 0 38%, var(--ink) 38% 62%, transparent 62%),
    radial-gradient(140% 90% at 85% 115%, #231E21 0 45%, transparent 45.2%),
    #0A10B5;
}
.h-diag .sec-head { max-width: 900px; }
.h-diag .sec-head h2 { color: #fff; font-weight: 500; line-height: 1.6; }
.h-diag .sec-head p { color: #D3D6FF; }
.h-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; max-width: 1220px; margin-inline: auto; }
.h-card { background: #fff; color: #0E0B0D; border-radius: 22px; padding: 30px 36px 26px; display: flex; flex-direction: column; min-height: 290px; }
.h-card .h-card-ic { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #fff; margin-bottom: 18px; }
.h-card h3 { font-size: 22px; font-weight: 600; margin-bottom: 14px; }
.h-card p { color: #3B3840; font-size: 16px; line-height: 1.85; }
.h-card a { margin-top: auto; padding-top: 22px; font-size: 13.5px; color: #0E0B0D; text-decoration: underline; text-underline-offset: 4px; align-self: flex-end; }
@media (max-width: 820px) { .h-cards { grid-template-columns: 1fr; gap: 18px; } .h-card { min-height: 0; padding: 26px 24px; } }

/* ---------- كروت المهن (بنفسجي فاتح) ---------- */
.h-prof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.h-prof-card { display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 22px; border-radius: 20px; background: var(--lav); color: var(--text); text-decoration: none !important; transition: transform .2s, box-shadow .2s; }
.h-prof-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.h-prof-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; margin-bottom: 6px; }
.h-prof-card h3 { font-size: 19px; font-weight: 600; }
.h-prof-card p { color: var(--text-2); font-size: 14.5px; line-height: 1.75; flex: 1; }
.h-prof-card .go { font-size: 13.5px; color: var(--text); text-decoration: underline; text-underline-offset: 4px; display: flex; justify-content: space-between; align-items: center; }
.h-prof-card .go b { text-decoration: none; font-weight: 600; color: var(--primary-text); }
.h-prof-card.cta { background: var(--primary); color: #fff; }
.h-prof-card.cta p { color: #D9DCFF; }
.h-prof-card.cta .h-prof-ic { background: var(--mint); color: var(--ink); }
.h-prof-card.cta .go { color: #fff; }
@media (max-width: 1000px) { .h-prof { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .h-prof { grid-template-columns: 1fr; } }

/* ---------- قسم سماوي فاتح ---------- */
.h-sky { background: var(--sky); }
.h-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.h-step { background: var(--surface); border-radius: 22px; padding: 30px; border: 1px solid var(--border); }
.h-step-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 600; font-size: 18px; margin-bottom: 18px; }
.h-step h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.h-step p { color: var(--text-2); font-size: 15px; }
.h-step .tpl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.h-step .tpl-chips span { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: var(--sky); color: #0B7287; }
@media (max-width: 860px) { .h-steps { grid-template-columns: 1fr; } }

/* ---------- ليه تختار (كروت سودا) ---------- */
.sec-head h2 .brand-word { color: var(--primary-text); }
.h-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.h-why-card { background: var(--ink); color: #fff; border-radius: 22px; padding: 30px 32px; }
.h-why-card .ic { color: var(--mint); margin-bottom: 18px; }
.h-why-card h3 { font-size: 21px; font-weight: 600; margin-bottom: 14px; }
.h-why-card p { color: #D5D3DA; font-size: 15.5px; line-height: 1.85; }
:root[data-theme="dark"] .h-why-card { background: var(--surface-2); border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .h-why-card { background: var(--surface-2); border: 1px solid var(--border); } }
@media (max-width: 900px) { .h-why { grid-template-columns: 1fr; } }

/* ---------- الأسعار في الرئيسية ---------- */
.plan-star { border-color: var(--primary); }
.plan-badge { background: var(--mint); color: var(--ink); }

/* ---------- CTA الأخير ---------- */
.h-final { background: var(--ink); color: #fff; border-radius: 28px; padding: 64px 28px; text-align: center; position: relative; overflow: hidden; }
.h-final::before { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%; background: radial-gradient(closest-side, rgba(27, 44, 216, .55), transparent); }
.h-final > * { position: relative; }
.h-final h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 500; }
.h-final p { color: #CFCFDA; margin-top: 12px; font-size: 17px; }

/* ---------- الفوتر غامق ---------- */
.footer { background: var(--ink); color: #fff; border-top: 0; }
.footer .brand { color: #fff; }
.footer .brand-name b { color: #8E98FF; }
.footer-brand p, .footer ul a { color: #B9B6C0; }
.footer ul a:hover { color: #fff; }
.footer h3 { color: #fff; }
.footer-bottom { border-top-color: rgba(255, 255, 255, .1); color: #8F8C96; }
.footer .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); box-shadow: none; }

/* =========================================================
   v3 — هوية Blue AI الخاصة (هيرو كحلي مقسوم، bento، كروت ملونة)
   ========================================================= */

/* ---------- Hero كحلي مقسوم ---------- */
.h-hero {
  text-align: start; padding-block: 76px 84px;
  background:
    radial-gradient(700px 460px at 18% 40%, rgba(82, 110, 255, .45), transparent 65%),
    radial-gradient(520px 360px at 100% 0%, rgba(110, 231, 249, .16), transparent 60%),
    linear-gradient(160deg, #0B1340 0%, #0A0F2E 100%);
}
.h-hero::before {
  background: none;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 55% 70% at 20% 45%, #000 15%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 55% 70% at 20% 45%, #000 15%, transparent 70%);
}
.h-split { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.h-tag { border: 0; background: rgba(255, 255, 255, .08); color: #DCE2FF; font-size: 13.5px; padding: 7px 14px; }
.h-tag .ic { color: #7DE3F9; }
.h-hero h1 { font-weight: 600; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.22; margin-top: 22px; letter-spacing: -.01em; }
.h-hero h1 .hl { background: linear-gradient(90deg, #8FA3FF, #6EE7F9); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.h-hero .h-sub { color: #C3CAEE; font-size: clamp(16.5px, 1.6vw, 18.5px); max-width: 560px; margin-top: 18px; line-height: 1.9; }
.h-pick-label { margin-top: 30px; font-size: 13.5px; color: #8E99CC; font-weight: 500; }
.h-hero .h-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; max-width: 600px; }
.h-hero .h-pill {
  height: 38px; padding-inline: 12px 14px; gap: 7px; font-size: 14px; font-weight: 500;
  color: #E4E8FB; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .13); border-radius: 12px; box-shadow: none; margin: 0;
}
.h-hero .h-pill:hover { background: rgba(255, 255, 255, .12); transform: none; }
.h-hero .h-pill[aria-selected="true"] { background: #fff; color: #0B1340; border-color: #fff; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .6); }
.h-hero .h-pill.c1 .ic { color: #FF7AA8; } .h-hero .h-pill.c2 .ic { color: #34E0A1; } .h-hero .h-pill.c3 .ic { color: #5EDCF5; }
.h-hero .h-pill.c4 .ic { color: #FFCF40; } .h-hero .h-pill.c5 .ic { color: #C7CEEA; } .h-hero .h-pill.c6 .ic { color: #B3A6FF; } .h-hero .h-pill.c7 .ic { color: #FFA65C; }
.h-hero .h-pill[aria-selected="true"].c5 .ic { color: #475569; }
.h-hero .h-cta { justify-content: flex-start; margin-top: 32px; }
.h-hero .h-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #AAB3DD; font-size: 14px; margin-top: 16px; }
.h-hero .h-note .ic { color: #34E0A1; }
.h-hero .h-note > span { opacity: .4; margin-inline: 4px; }

.h-device { position: relative; display: grid; place-items: center; padding-block: 10px; }
.h-device::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(110, 231, 249, .22), transparent 65%); }
.h-device .phone { box-shadow: 0 0 0 7px #070B22, 0 50px 90px -25px rgba(0, 0, 0, .75); background: #151A36; border-color: #2E3560; }
.h-device .phone-input i { background: var(--primary); color: #fff; }
.h-float { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 14px; background: #fff; color: #0E0B0D; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .5); font-size: 13px; line-height: 1.4; animation: floaty 6s ease-in-out infinite; }
.h-float strong { display: block; font-size: 13.5px; }
.h-float small { color: #6B7280; }
.hf-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #ECEEFF; color: var(--primary); }
.hf-ic.ok { background: #E3FBF0; color: #0E9F6E; }
.hf-1 { top: 70px; inset-inline-end: 4%; }
.hf-2 { bottom: 90px; inset-inline-start: 2%; animation-delay: -3s; }

@media (max-width: 1000px) {
  .h-split { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .h-copy { text-align: center; }
  .h-hero .h-sub, .h-hero .h-pills { margin-inline: auto; }
  .h-hero .h-pills, .h-hero .h-cta, .h-hero .h-note { justify-content: center; }
}
@media (max-width: 560px) {
  .h-hero { padding-block: 44px 56px; }
  .h-float { display: none; }
  .h-hero .h-pill { height: 36px; font-size: 13.5px; }
}

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
.bento-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 28px; transition: box-shadow .2s, transform .2s; }
.bento-card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.bento-big { grid-row: span 2; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--surface), var(--primary-soft)); }
.bento-wide { grid-column: span 2; display: flex; align-items: center; gap: 20px; }
.bento-wide .bento-ic { margin-bottom: 0; }
.bento-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); margin-bottom: 18px; flex-shrink: 0; }
.bento-ic.c-mint { background: var(--mint-soft); color: #0E9F6E; }
.bento-ic.c-amber { background: var(--warn-soft); color: var(--warn); }
.bento-ic.c-violet { background: #F1ECFF; color: #7C3AED; }
.bento-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.bento-card p { color: var(--text-2); font-size: 15px; line-height: 1.85; }
.bento-tpl { margin-top: auto; padding-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bento-tpl > span { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 500; }
.bento-tpl > span .ic { color: var(--primary-text); }
.bento-input { grid-column: 1 / -1; margin-top: 4px; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--primary); background: var(--surface); font-size: 14px; line-height: 1.8; font-family: var(--font-read); }
.bento-input mark { background: var(--primary-soft); color: var(--primary-text); border-radius: 4px; padding: 0 4px; }
.bento-avatars { margin-inline-start: auto; display: flex; }
.bento-avatars span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 15px; color: #fff; border: 3px solid var(--surface); margin-inline-start: -10px; }
.bento-avatars span:nth-child(1) { background: #1B2CD8; } .bento-avatars span:nth-child(2) { background: #0E9F6E; }
.bento-avatars span:nth-child(3) { background: #E0457B; } .bento-avatars span:nth-child(4) { background: #CA8A04; }
.bento-avatars span:nth-child(5) { background: var(--bg-soft); color: var(--text-2); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento-big, .bento-wide { grid-row: auto; grid-column: auto; }
  .bento-wide { flex-wrap: wrap; }
  .bento-avatars { margin-inline-start: 10px; }
}

/* ---------- المهن: لون لكل مهنة ---------- */
.h-prof-card { --pc: var(--primary); background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--pc); }
.h-prof-card .h-prof-ic { background: color-mix(in srgb, var(--pc) 13%, transparent); color: var(--pc); border-radius: 14px; }
.h-prof-card .go b { color: var(--pc); }
.p-c1 { --pc: #E0457B; } .p-c2 { --pc: #0E9F6E; } .p-c3 { --pc: #0891B2; } .p-c4 { --pc: #C28100; }
.p-c5 { --pc: #475569; } .p-c6 { --pc: #7C3AED; } .p-c7 { --pc: #EA580C; }
.h-prof-card.cta { border: 0; }
.h-prof-card.cta .h-prof-ic { background: rgba(255, 255, 255, .16); color: #fff; }

/* ---------- الخطوات بخط واصل ---------- */
.h-sky { background: var(--surface); border-block: 1px solid var(--border); }
.h-steps { position: relative; }
.h-steps::before { content: ""; position: absolute; top: 52px; inset-inline: 12%; border-top: 2px dashed var(--border-2); }
.h-step { position: relative; background: var(--bg); text-align: center; }
.h-step-n { margin-inline: auto; width: 46px; height: 46px; box-shadow: 0 0 0 6px var(--bg); }
.h-step .tpl-chips { justify-content: center; }
.h-step .tpl-chips span { background: var(--primary-soft); color: var(--primary-text); }
@media (max-width: 860px) { .h-steps::before { display: none; } }

/* ---------- ليه Blue AI: كروت فاتحة ---------- */
.h-why-card, :root[data-theme="dark"] .h-why-card { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.h-why-card p { color: var(--text-2); }
.h-why-card > .ic { width: 52px; height: 52px; padding: 12px; border-radius: 15px; background: var(--primary-soft); color: var(--primary-text); }
.h-why-card:nth-child(2) > .ic { background: var(--mint-soft); color: #0E9F6E; }
.h-why-card:nth-child(3) > .ic { background: var(--warn-soft); color: var(--warn); }

/* ---------- CTA وفوتر كحلي ---------- */
.h-final { background: linear-gradient(135deg, #1B2CD8 0%, #0B1340 100%); }
.h-final::before { background: radial-gradient(closest-side, rgba(110, 231, 249, .3), transparent); }
.footer { background: #0A0F2E; }
.plan-badge { background: var(--primary); color: #fff; }

/* ---------- الدفع الإلكتروني ---------- */
.pay-result { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin-inline: auto; }
.pay-result.ok { background: var(--success-soft); color: var(--success); }
.pay-result.warn { background: var(--warn-soft); color: var(--warn); }
.pay-result.err { background: var(--danger-soft); color: var(--danger); }
.pay-options { display: grid; gap: 12px; }
.pay-option { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-lg); border: 1.5px solid var(--border); background: var(--surface); }
.pay-option.main { border-color: var(--primary); background: var(--primary-soft); }
.pay-option .po-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--surface); color: var(--primary-text); flex-shrink: 0; box-shadow: var(--sh-1); }
.pay-option > div { flex: 1; min-width: 0; }
.pay-option strong { display: block; font-size: 16px; }
.pay-option small { color: var(--text-2); font-size: 13.5px; }
.pay-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13.5px; margin-block: 22px 18px; }
.pay-or::before, .pay-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.secure-note { display: flex; align-items: center; gap: 8px; justify-content: center; color: var(--text-3); font-size: 13px; margin-top: 12px; }

/* اختيار المهنة في صفحة الحساب */
.seg-radio-3 { grid-template-columns: repeat(3, 1fr); }
.seg-radio label.is-locked { cursor: not-allowed; }
.seg-radio label.is-locked span { opacity: .55; background: var(--surface-2); }
.seg-radio .lock-ic { margin-inline-start: auto; color: var(--text-3); }
@media (max-width: 760px) { .seg-radio-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .seg-radio-3 { grid-template-columns: 1fr; } }
.seg-switch { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding-inline: 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--primary-text); background: var(--primary-soft); text-decoration: none !important; white-space: nowrap; }
.seg-switch:hover { background: var(--primary); color: #fff; }

/* ---------- صفحة الطباعة / PDF ---------- */
.print-body { background: var(--bg-soft); }
.print-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.sheet { width: min(210mm, 100% - 24px); margin: 24px auto 48px; background: #fff; color: #0D1730; padding: 18mm 18mm 14mm; box-shadow: var(--sh-2); border-radius: 6px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; margin-bottom: 22px; border-bottom: 2px solid #1B2CD8; }
.sheet-head h1 { font-size: 22px; line-height: 1.5; color: #0D1730; }
.sheet-head p { color: #7C879F; font-size: 13px; margin-top: 4px; }
.sheet-head .brand { color: #0D1730; flex-shrink: 0; }
.sheet-body { font-size: 15px; line-height: 2; }
.sheet-body h2 { font-size: 19px; margin-top: 22px; }
.sheet-body h3 { font-size: 16.5px; margin-top: 18px; }
.sheet-body table { display: table; }
.sheet-body pre { background: #F1F3F8; color: #0D1730; border: 1px solid #E1E5EE; white-space: pre-wrap; }
.sheet-foot { margin-top: 30px; padding-top: 10px; border-top: 1px solid #E4E9F2; color: #9AA3B5; font-size: 12px; text-align: center; }
@page { size: A4; margin: 14mm; }
@media print {
  .no-print { display: none !important; }
  .print-body { background: #fff; }
  .sheet { width: auto; margin: 0; padding: 0; box-shadow: none; border-radius: 0; }
  .sheet-body h2, .sheet-body h3 { break-after: avoid; }
  .sheet-body pre, .sheet-body table, .sheet-body blockquote { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* أزرار التصدير تحت الرد */
.msg-tools .tool-sep { width: 1px; height: 18px; background: var(--border); margin-inline: 2px; align-self: center; }
.msg-tools a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 10px; border-radius: 8px; font-size: 13px; color: var(--text-3); text-decoration: none !important; }
.msg-tools a:hover { background: var(--bg-soft); color: var(--text); }
.msg-tools a .doc-badge { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; color: #fff; background: #2B579A; }
.msg-tools a .doc-badge.pdf { background: #D93025; }

/* =========================================================
   لوحة العميل (Client shell) — ألوان باستيل زي المرجع
   ========================================================= */
.cs-body {
  --c-blue: #3B82F6; --c-purple: #8B5CF6; --c-pink: #EC4899; --c-orange: #F97316;
  --c-green: #10B981; --c-teal: #14B8A6; --c-indigo: #6366F1; --c-amber: #F59E0B; --c-red: #EF4444;
  --cs-bg: #F5F7FB; --cs-line: #E8ECF3;
  background: var(--cs-bg);
}
:root[data-theme="dark"] .cs-body { --cs-bg: var(--bg); --cs-line: var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cs-body { --cs-bg: var(--bg); --cs-line: var(--border); } }

/* ألوان مساعدة: .tone-blue وغيرها بتحدد --tc */
.tone-blue { --tc: var(--c-blue); } .tone-purple { --tc: var(--c-purple); } .tone-pink { --tc: var(--c-pink); }
.tone-orange { --tc: var(--c-orange); } .tone-green { --tc: var(--c-green); } .tone-teal { --tc: var(--c-teal); }
.tone-indigo { --tc: var(--c-indigo); } .tone-amber { --tc: var(--c-amber); } .tone-red { --tc: var(--c-red); }

.cs { display: grid; grid-template-columns: 286px minmax(0, 1fr); min-height: 100vh; }

/* ---------- القايمة الجانبية ---------- */
.cs-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-inline-end: 1px solid var(--cs-line); padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.cs-brand { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 14px; border-bottom: 1px solid var(--cs-line); }
.cs-close { display: none; }
.cs-label { font-size: 12px; font-weight: 600; color: var(--text-3); padding-inline: 8px; }
.cs-nav { display: grid; gap: 4px; }
.cs-nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding-inline: 14px; border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: 14.5px; text-decoration: none !important; transition: background .15s, color .15s; }
.cs-nav a .ic { color: var(--text-3); }
.cs-nav a:hover { background: var(--bg-soft); color: var(--text); }
.cs-nav a[aria-current] { background: color-mix(in srgb, var(--c-blue) 11%, var(--surface)); color: #2563EB; font-weight: 600; }
.cs-nav a[aria-current] .ic { color: #2563EB; }
.cs-nav a .cnt { margin-inline-start: auto; font-size: 12px; font-weight: 600; color: var(--text-3); }
.cs-nav a .new { margin-inline-start: auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; color: #fff; background: var(--c-red); }

.cs-promo { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; color: #fff; text-decoration: none !important;
  background: linear-gradient(135deg, #8B5CF6, #6D28D9); box-shadow: 0 12px 26px -12px rgba(109, 40, 217, .7); }
.cs-promo .ic { color: #FDE68A; flex-shrink: 0; }
.cs-promo strong { display: block; font-size: 14.5px; }
.cs-promo small { display: block; font-size: 12px; color: #E4DAFF; }
.cs-promo > span:last-child { margin-inline-start: auto; background: #FDE047; color: #422006; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.cs-promo:hover { filter: brightness(1.05); }

.cs-group { border: 1px solid var(--cs-line); border-radius: 16px; padding: 8px; background: var(--surface); }
.cs-group-head { display: flex; align-items: center; gap: 10px; height: 42px; padding-inline: 12px; margin-bottom: 4px; border-radius: 11px; font-weight: 700; font-size: 14.5px;
  background: color-mix(in srgb, var(--tc) 12%, var(--surface)); color: color-mix(in srgb, var(--tc) 75%, var(--text)); border-inline-start: 3px solid var(--tc); }
.cs-group-head .ic { color: var(--tc); }
.cs-group .cs-nav a { height: 40px; font-size: 14px; }
.cs-group .cs-nav a.danger, .cs-group .cs-nav a.danger .ic { color: var(--c-red); }
.cs-group .cs-nav a.warn, .cs-group .cs-nav a.warn .ic { color: #D97706; }
.cs-group .cs-nav a.ok .ic { color: #16A34A; }

.cs-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid var(--cs-line); background: var(--surface-2); }
.cs-user > div { flex: 1; min-width: 0; line-height: 1.35; }
.cs-user strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-user small { color: var(--text-3); font-size: 12px; }
.cs-user .avatar { width: 40px; height: 40px; background: linear-gradient(135deg, #DBEAFE, #EDE9FE); color: #4338CA; }
.cs-side-note { text-align: center; font-size: 11.5px; color: var(--text-3); }
.cs-side-note b { color: #D97706; }

/* ---------- الشريط العلوي ---------- */
.cs-main { min-width: 0; display: flex; flex-direction: column; }
.cs-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 28px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--cs-line); }
.cs-hello h1 { font-size: 21px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cs-hello p { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.cs-top-act { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.cs-sq { position: relative; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--cs-line); background: var(--surface); color: var(--text-2); text-decoration: none !important; }
.cs-sq:hover { background: var(--bg-soft); color: var(--text); }
.cs-sq.theme-toggle { color: #F59E0B; }
.cs-sq .dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-red); border: 2px solid var(--surface); }
.cs-search { position: relative; }
.cs-search input { width: 260px; height: 40px; border-radius: 11px; border: 1px solid var(--cs-line); background: var(--surface-2); padding-inline: 38px 12px; font-size: 14px; color: var(--text); }
.cs-search input:focus { outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-blue) 25%, transparent); }
.cs-search .ic { position: absolute; inset-inline-start: 12px; top: 11px; color: var(--text-3); }
.cs-burger { display: none; }
.cs-content { padding: 24px 28px 40px; display: grid; gap: 22px; max-width: 1400px; width: 100%; align-content: start; }

/* ---------- شريط الرصيد (خوخي) ---------- */
.cs-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; border-radius: 18px;
  background: linear-gradient(90deg, #FFF5EE, #FDECEC); border: 1px solid #F9DCCB; }
:root[data-theme="dark"] .cs-banner { background: linear-gradient(90deg, #2A1D17, #2A1A1D); border-color: #4A3026; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cs-banner { background: linear-gradient(90deg, #2A1D17, #2A1A1D); border-color: #4A3026; } }
.cs-banner-ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #FB923C, #F43F5E); box-shadow: 0 10px 20px -10px #F43F5E; flex-shrink: 0; }
.cs-banner-val small { display: block; font-size: 12.5px; color: var(--text-3); }
.cs-banner-val strong { font-size: 26px; font-weight: 700; color: #EA580C; font-variant-numeric: tabular-nums; }
.cs-banner-val strong span { font-size: 14px; font-weight: 500; color: var(--text-2); }
.cs-banner-meter { flex: 1; min-width: 180px; max-width: 360px; }
.cs-banner-meter .meter { height: 8px; background: color-mix(in srgb, #F97316 15%, var(--surface)); }
.cs-banner-meter .meter > span { background: linear-gradient(90deg, #FB923C, #F43F5E); }
.cs-banner-meter p { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.cs-plan { margin-inline-start: auto; text-align: end; }
.cs-plan strong { display: inline-flex; align-items: center; gap: 6px; color: #D97706; font-size: 15px; }
.cs-plan small { display: flex; align-items: center; gap: 5px; justify-content: flex-end; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.cs-plan small .ic { color: var(--c-green); }
.cs-plan a { font-size: 12.5px; font-weight: 600; }

/* ---------- كروت الأرقام ---------- */
.cs-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cs-stat { background: var(--surface); border: 1px solid var(--cs-line); border-radius: 18px; padding: 20px 22px; display: grid; grid-template-columns: 1fr auto; transition: box-shadow .2s, transform .2s; }
.cs-stat:hover { box-shadow: 0 14px 30px -18px rgba(15, 23, 42, .25); transform: translateY(-2px); }
.cs-stat-ic { grid-column: 1; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, var(--surface)); }
.cs-pill { grid-column: 2; align-self: start; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding-inline: 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, var(--tc) 80%, var(--text)); background: color-mix(in srgb, var(--tc) 12%, var(--surface)); white-space: nowrap; }
.cs-stat strong { grid-column: 1 / -1; font-size: 30px; font-weight: 700; margin-top: 18px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cs-stat > span:last-child { grid-column: 1 / -1; color: var(--text-2); font-size: 14px; margin-top: 4px; }

/* ---------- عناوين الأقسام ---------- */
.cs-sec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cs-sec-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.cs-sec-head h2 .ic { color: var(--c-blue); align-self: center; }
.cs-sec-head p { color: var(--text-3); font-size: 13px; }
.cs-sec-head a { margin-inline-start: auto; font-size: 13.5px; font-weight: 600; }

/* ---------- كروت الأقسام / القوالب ---------- */
.cs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.cs-tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 18px; text-decoration: none !important; color: var(--text); text-align: start;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 9%, var(--surface)), var(--surface) 75%); border: 1px solid color-mix(in srgb, var(--tc) 22%, var(--cs-line)); transition: transform .2s, box-shadow .2s, border-color .2s; }
.cs-tile:hover { transform: translateY(-3px); border-color: var(--tc); box-shadow: 0 16px 30px -18px color-mix(in srgb, var(--tc) 70%, transparent); }
.cs-tile-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 70%, #fff), var(--tc)); box-shadow: 0 8px 18px -8px var(--tc); margin-bottom: 4px; }
.cs-tile h3 { font-size: 16px; font-weight: 700; }
.cs-tile p { font-size: 12.5px; color: var(--text-3); line-height: 1.7; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cs-tile-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--tc) 25%, var(--cs-line)); font-size: 12.5px; font-weight: 600; color: var(--tc); }
.cs-chips { display: flex; gap: 4px; }
.cs-chips i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-style: normal; }
.cs-chips i:nth-child(1) { background: var(--c-purple); } .cs-chips i:nth-child(2) { background: var(--c-blue); }
.cs-chips i:nth-child(3) { background: var(--c-green); } .cs-chips i:nth-child(4) { background: var(--c-orange); }

/* ---------- آخر المحادثات + النشاط ---------- */
.cs-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.cs-card { background: var(--surface); border: 1px solid var(--cs-line); border-radius: 18px; padding: 20px 22px; }
.cs-card > .cs-sec-head { margin-bottom: 14px; }
.cs-list { display: grid; }
.cs-list a { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--cs-line); color: var(--text); text-decoration: none !important; border-radius: 10px; }
.cs-list a:last-child { border-bottom: 0; }
.cs-list a:hover { background: var(--surface-2); }
.cs-list .li-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, var(--surface)); flex-shrink: 0; }
.cs-list .li-txt { flex: 1; min-width: 0; }
.cs-list .li-txt strong { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-list .li-txt small { color: var(--text-3); font-size: 12.5px; }
.cs-list .chev { color: var(--text-3); }
.cs-bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; direction: ltr; }
.cs-bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.cs-bars span { width: 100%; max-width: 22px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #A78BFA, #6366F1); min-height: 4px; }
.cs-bars span.zero { background: var(--bg-soft); }
.cs-bars small { font-size: 10.5px; color: var(--text-3); }
.cs-bars-sum { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.cs-bars-sum b { color: var(--text); }

/* ---------- كارت النصايح (بنفسجي فاتح) ---------- */
.cs-tips { position: relative; overflow: hidden; border-radius: 20px; padding: 24px 26px; border: 1px solid #E4DCFF;
  background: radial-gradient(500px 220px at 0% 100%, rgba(167, 139, 250, .28), transparent 60%), linear-gradient(120deg, #F6F2FF, #EEF2FF); }
:root[data-theme="dark"] .cs-tips { background: linear-gradient(120deg, #1E1A33, #161C33); border-color: #2E2850; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cs-tips { background: linear-gradient(120deg, #1E1A33, #161C33); border-color: #2E2850; } }
.cs-tips h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; }
.cs-tips h2 .play { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6366F1, #3B82F6); }
.cs-tips > p { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.cs-tips ol { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cs-tips li { background: color-mix(in srgb, var(--surface) 85%, transparent); border-radius: 14px; padding: 14px 16px; font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.cs-tips li b { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 2px; }

/* ---------- صفحات جوه اللوحة (حسابي) ---------- */
.cs-content .card { border-radius: 18px; border-color: var(--cs-line); }
.cs-content .card + .card { margin-top: 0; }
.cs-content .grid-2 { margin-top: 0 !important; }

/* ---------- موبايل ---------- */
@media (max-width: 1200px) { .cs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cs-two { grid-template-columns: minmax(0, 1fr); } .cs-search input { width: 200px; } }
@media (max-width: 960px) {
  .cs { grid-template-columns: minmax(0, 1fr); }
  .cs-side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 290px; z-index: 60; transform: translateX(100%); transition: transform .25s; box-shadow: var(--sh-3); }
  .cs-side.is-open { transform: none; }
  .cs-burger, .cs-close { display: grid; }
  .cs-top { padding: 10px 16px; min-height: 64px; }
  .cs-content { padding: 18px 16px 32px; }
  .cs-search { display: none; }
  .cs-tips ol { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cs-stats { gap: 12px; }
  .cs-stat { padding: 16px; }
  .cs-stat strong { font-size: 24px; margin-top: 12px; }
  .cs-hello h1 { font-size: 17px; }
  .cs-hello p { display: none; }
  .cs-plan { margin-inline-start: 0; text-align: start; }
  .cs-plan small { justify-content: flex-start; }
  .cs-top-act .hide-xs { display: none; }
}
.side-home { display: flex; align-items: center; gap: 8px; margin: 0 14px 6px; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); text-decoration: none !important; }
.side-home:hover { background: var(--bg-soft); color: var(--text); }
.plan-feat li.off { color: var(--text-3); }
.plan-feat li.off span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-3) 50%, transparent); }
.plan-feat li.off .ic { color: var(--text-3); opacity: .6; }

/* ---------- قراءة الصور (OCR) في الشات ---------- */
.composer .attach { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--text-3); transition: background .15s, color .15s; }
.composer .attach:hover { background: var(--primary-soft); color: var(--primary-text); }
.composer .attach:disabled { opacity: .5; cursor: progress; }
.composer.is-drop { border-color: var(--primary); border-style: dashed; background: var(--primary-soft); }
.ocr-bar { max-width: 820px; margin: 0 auto 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border-2); font-size: 14px; color: var(--text-2); box-shadow: var(--sh-1); }
.ocr-bar > span:not(.ocr-acts):not(.spin):not(.ok-ic) { flex: 1; min-width: 180px; }
.ocr-bar b { color: var(--text); font-weight: 600; }
.ocr-bar > button[data-ocr-close] { width: 28px; height: 28px; border-radius: 8px; font-size: 18px; line-height: 1; color: var(--text-3); }
.ocr-bar > button[data-ocr-close]:hover { background: var(--bg-soft); color: var(--text); }
.ocr-bar.is-ok { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); background: var(--success-soft); }
.ocr-bar.is-err { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: var(--danger-soft); color: var(--danger); }
.ocr-bar .ok-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.ocr-bar .spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--primary-soft); border-top-color: var(--primary); animation: spin .8s linear infinite; flex-shrink: 0; }
.ocr-acts { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.ocr-acts button { height: 32px; padding-inline: 12px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--border-2); color: var(--text); }
.ocr-acts button:hover { border-color: var(--primary); color: var(--primary-text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- لوحة الإدارة بنفس شكل لوحة العميل ---------- */
.admin-cs .kpis { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.admin-cs .kpi { --tc: var(--c-blue); background: var(--surface); border: 1px solid var(--cs-line); border-radius: 18px; padding: 20px 22px; transition: box-shadow .2s, transform .2s; }
.admin-cs .kpi:hover { box-shadow: 0 14px 30px -18px rgba(15, 23, 42, .25); transform: translateY(-2px); }
.admin-cs .kpis .kpi:nth-child(6n+1) { --tc: var(--c-purple); }
.admin-cs .kpis .kpi:nth-child(6n+2) { --tc: var(--c-green); }
.admin-cs .kpis .kpi:nth-child(6n+3) { --tc: var(--c-orange); }
.admin-cs .kpis .kpi:nth-child(6n+4) { --tc: var(--c-blue); }
.admin-cs .kpis .kpi:nth-child(6n+5) { --tc: var(--c-pink); }
.admin-cs .kpis .kpi:nth-child(6n+6) { --tc: var(--c-teal); }
.admin-cs .kpi-top { font-size: 14px; color: var(--text-2); }
.admin-cs .kpi-ic, .admin-cs .kpi-ic.ok, .admin-cs .kpi-ic.warn { width: 46px; height: 46px; border-radius: 13px; color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, var(--surface)); }
.admin-cs .kpi strong { font-size: 30px; margin-top: 14px; }
.admin-cs .kpi small { display: inline-flex; margin-top: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--tc) 80%, var(--text)); background: color-mix(in srgb, var(--tc) 11%, var(--surface)); }
.admin-cs .card { border-radius: 18px; border-color: var(--cs-line); }
.admin-cs .card-head h2 .ic { color: var(--c-blue); }
.admin-cs .table th { background: color-mix(in srgb, var(--c-blue) 5%, var(--surface)); }
.admin-cs .bar-row .meter > span { background: linear-gradient(90deg, #A78BFA, #6366F1); }
.admin-cs .alert-info { background: color-mix(in srgb, var(--c-blue) 10%, var(--surface)); color: #1D4ED8; border: 1px solid color-mix(in srgb, var(--c-blue) 22%, transparent); }
.admin-cs .alert-warn { border: 1px solid color-mix(in srgb, var(--c-amber) 30%, transparent); }
.admin-cs .alert-err { border: 1px solid color-mix(in srgb, var(--c-red) 25%, transparent); }
.admin-cs .seg-pick a[aria-current] { background: #2563EB; border-color: #2563EB; color: #fff; }
.admin-cs .search-box input { border-radius: 12px; border-color: var(--cs-line); }
.admin-cs .grid-2 { gap: 18px; }
.admin-cs .grid-2 > .card { margin-top: 0; }
.admin-cs .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .admin-cs .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .admin-cs .kpis { grid-template-columns: minmax(0, 1fr); } }

/* ---------- الشعار الجديد ---------- */
.brand { gap: 10px; }
.brand .logo-mark { border-radius: 24%; box-shadow: 0 6px 14px -6px rgba(18, 87, 230, .55); }
.brand-name { font-weight: 800; letter-spacing: -.03em; color: #0E1B3F; }
.brand-name b { font-weight: 800; background: linear-gradient(180deg, #1E8BFF, #0B4FE0); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .brand-name { color: #EAF0FF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-name { color: #EAF0FF; } }
.footer .brand-name, .sheet-head .brand-name { color: inherit; }
.footer .brand-name b { background: linear-gradient(180deg, #7CC4FF, #4C8DFF); -webkit-background-clip: text; background-clip: text; }

/* ---------- صفحة «قراءة الصور» ---------- */
.scan { display: grid; gap: 22px; }
.scan-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: stretch; }
.scan-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; min-height: 300px; padding: 30px 20px; border-radius: 20px; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--c-teal) 45%, var(--cs-line)); background: linear-gradient(160deg, color-mix(in srgb, var(--c-teal) 8%, var(--surface)), var(--surface) 70%); transition: border-color .2s, background .2s, transform .2s; }
.scan-drop:hover, .scan-drop.is-over { border-color: var(--c-teal); background: color-mix(in srgb, var(--c-teal) 12%, var(--surface)); }
.scan-drop.is-over { transform: scale(1.01); }
.scan-drop.is-off { cursor: not-allowed; opacity: .6; }
.scan-drop.is-busy { pointer-events: none; opacity: .7; }
.scan-drop-ic { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2DD4BF, #0D9488); box-shadow: 0 14px 28px -12px #0D9488; margin-bottom: 6px; }
.scan-drop strong { font-size: 19px; font-weight: 700; color: var(--text); }
.scan-drop small { font-size: 13.5px; color: var(--text-3); max-width: 420px; }
.scan-drop-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
.scan-side { display: grid; gap: 14px; align-content: start; }
.scan-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-3); line-height: 1.7; padding: 4px 6px; }
.scan-note .ic { color: var(--c-green); margin-top: 3px; }

.scan-result.is-loading .scan-text textarea { background: repeating-linear-gradient(90deg, var(--surface-2) 0 40%, var(--bg-soft) 50%, var(--surface-2) 60% 100%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.scan-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; margin-top: 14px; }
.scan-body:has(.scan-preview[hidden]) { grid-template-columns: minmax(0, 1fr); }
.scan-preview { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--cs-line); background: var(--surface-2); align-self: start; max-height: 420px; }
.scan-preview img { width: 100%; height: 100%; object-fit: contain; max-height: 420px; }
.scan-text textarea { width: 100%; min-height: 260px; max-height: 520px; resize: vertical; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--cs-line); background: var(--surface-2); color: var(--text); font-family: var(--font-read); font-size: 15px; line-height: 1.9; }
.scan-text textarea:focus { outline: none; border-color: var(--c-teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-teal) 25%, transparent); }
.scan-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.scan-tools .doc-badge { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; color: #fff; background: #2B579A; }
.scan-tools .doc-badge.pdf { background: #D93025; }
.scan-acts { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--cs-line); }
.scan-acts > p { font-weight: 700; margin-bottom: 12px; }
.scan-act-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.scan-act-tiles .cs-tile { align-items: center; text-align: center; padding: 16px 12px; cursor: pointer; font: inherit; }
.scan-act-tiles .cs-tile h3 { font-size: 14.5px; }
.scan-act-tiles .cs-tile-ic { width: 42px; height: 42px; margin-bottom: 2px; }
.scan-row { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--cs-line); }
.scan-row:last-child { border-bottom: 0; }
.scan-row > a { flex: 1; min-width: 0; border-bottom: 0 !important; }
.scan-row .icon-btn { color: var(--text-3); }
.scan-row .icon-btn:hover { color: var(--danger); background: var(--danger-soft); }
@media (max-width: 960px) { .scan-top { grid-template-columns: minmax(0, 1fr); } .scan-side { grid-template-columns: 1fr 1fr; } .scan-note { grid-column: 1 / -1; } .scan-body { grid-template-columns: minmax(0, 1fr); } .scan-preview { max-height: 260px; } }

/* ---------- لوحة الإدارة: الأجزاء الجديدة ---------- */
a.cs-stat { color: var(--text); text-decoration: none !important; }
.trend { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--bg-soft); color: var(--text-2); }
.trend.up { background: var(--success-soft); color: var(--success); }
.trend.down { background: var(--danger-soft); color: var(--danger); }
.cs-banner-meter .trend + p { margin-top: 8px; }
.cs-bars-30 { gap: 3px; }
.cs-bars-30 span { max-width: 14px; }
.cs-bars span.rev { background: linear-gradient(180deg, #34D399, #10B981); }

.dist { display: grid; gap: 10px; }
.dist-row { display: grid; grid-template-columns: 30px minmax(90px, 160px) 1fr 40px; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; font-size: 14px; }
.dist-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, var(--surface)); font-size: 12px; font-weight: 700; }
.dist-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dist-bar { height: 10px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 60%, #fff), var(--tc)); }
.dist-row b { text-align: left; font-variant-numeric: tabular-nums; }
a.dist-row:hover .dist-name { color: var(--tc); }
.tier-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--cs-line); }
.tier-split > div { padding: 12px; border-radius: 14px; text-align: center; background: color-mix(in srgb, var(--tc) 10%, var(--surface)); }
.tier-split strong { display: block; font-size: 24px; color: var(--tc); line-height: 1.2; }
.tier-split span { font-size: 12.5px; color: var(--text-2); }

.health { display: grid; gap: 8px; }
.health-row { display: grid; grid-template-columns: 12px minmax(120px, 190px) 1fr; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--cs-line); font-size: 14px; }
.health-row .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-green) 20%, transparent); }
.health-row.is-warn .dot { background: var(--c-amber); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-amber) 22%, transparent); }
.health-row.is-err .dot { background: var(--c-red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-red) 22%, transparent); }
.health-row span { color: var(--text-2); font-size: 13px; }
.health-row.is-warn span { color: #B45309; }
.health-row.is-err span { color: var(--danger); }

.exp-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--cs-line); }
.exp-row:last-child { border-bottom: 0; }
.exp-row > a:first-child { flex: 1; min-width: 0; border-bottom: 0 !important; }
.cs-list .li-ic { font-size: 13px; font-weight: 700; }

.user-head { align-items: center; }
.user-head .cs-banner-val { display: grid; gap: 2px; }
.user-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.user-head .cs-plan { display: flex; gap: 8px; }
.mini-h { font-size: 14.5px; font-weight: 700; margin: 20px 0 10px; }
@media (max-width: 560px) { .dist-row { grid-template-columns: 28px 1fr 34px; } .dist-bar { grid-column: 2 / -1; grid-row: 2; } .health-row { grid-template-columns: 12px 1fr; } .health-row span { grid-column: 2; } }
.admin-cs .cs-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .admin-cs .cs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- تقارير الأشعة ---------- */
.rad { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.rad-note strong { color: inherit; }
.rad-label { font-weight: 600; font-size: 14.5px; margin: 6px 0 10px; }
.rad-exams { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rad-exam { cursor: pointer; }
.rad-exam input { position: absolute; opacity: 0; pointer-events: none; }
.rad-exam span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; text-align: center; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--cs-line); background: var(--surface); color: var(--text-2); transition: .15s; }
.rad-exam span i { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, var(--surface)); }
.rad-exam:hover span { border-color: color-mix(in srgb, var(--tc) 50%, var(--cs-line)); }
.rad-exam input:checked + span { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 9%, var(--surface)); color: var(--text); box-shadow: 0 8px 18px -12px var(--tc); }
.rad-exam input:checked + span i { background: var(--tc); color: #fff; }
.rad-exam input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 30%, transparent); }
.rad-fields { margin-top: 18px; }
.rad-fields textarea { font-family: var(--font-read); direction: ltr; text-align: left; line-height: 1.8; }
.rad-fields textarea:placeholder-shown { direction: rtl; text-align: right; }
.rad-quick { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.rad-opts { align-items: center; }
.rad-lang { width: max-content; }
.rad-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.rad-check input { width: 18px; height: 18px; accent-color: var(--c-blue); }
.rad-out { position: sticky; top: 92px; min-height: 420px; }
.rad-empty { display: grid; place-items: center; gap: 12px; text-align: center; padding: 60px 20px; color: var(--text-3); }
.rad-empty-ic { width: 70px; height: 70px; border-radius: 20px; display: grid; place-items: center; color: var(--c-blue); background: color-mix(in srgb, var(--c-blue) 10%, var(--surface)); }
.rad-report { margin-top: 12px; padding: 18px 20px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--cs-line); font-family: var(--font-read); font-size: 15px; line-height: 1.9; max-height: 640px; overflow-y: auto; }
.rad-report .typing { padding: 4px 0; }
#rad-tools { margin-top: 12px; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .8s linear infinite; }
@media (max-width: 1100px) { .rad { grid-template-columns: minmax(0, 1fr); } .rad-out { position: static; } }
@media (max-width: 560px) { .rad-exams { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rad-tasks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rad-tasks .cs-tile[aria-current] { border-color: var(--tc); border-width: 2px; box-shadow: 0 14px 28px -16px var(--tc); }
.rad-tasks .cs-tile p { -webkit-line-clamp: 2; }
.rad-common { margin-top: 14px; }
#rad-report-in { font-family: var(--font-read); line-height: 1.8; }
@media (max-width: 900px) { .rad-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-cs .cs-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .admin-cs .cs-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .admin-cs .cs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.new-user { display: grid; gap: 16px; }

/* ---------- كود الخصم ---------- */
.coupon-form { display: flex; gap: 8px; margin-top: 16px; }
.coupon-form input { flex: 1; min-width: 0; height: 38px; border-radius: 10px; border: 1px dashed var(--border-2); background: var(--surface-2); padding-inline: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.coupon-form input:focus { outline: none; border-style: solid; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.coupon-err { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--danger); font-size: 13.5px; }
.coupon-ok { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--success-soft); color: var(--success); font-size: 13.5px; font-weight: 600; }
.coupon-ok a { margin-inline-start: auto; font-weight: 500; color: var(--text-3); }
.coupon-line dd, .coupon-line dt { color: var(--success) !important; font-weight: 600; }
.coupon-line dt { display: inline-flex; align-items: center; gap: 6px; }
.old-price { font-size: 16px; color: var(--text-3); font-weight: 500; margin-inline-end: 6px; }
.offer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 10px 16px; text-align: center; font-size: 14.5px; font-weight: 600; color: #fff; background: linear-gradient(90deg, #1B2CD8, #7C3AED); }
.offer-bar code { background: rgba(255,255,255,.18); border: 1px dashed rgba(255,255,255,.6); padding: 2px 10px; border-radius: 8px; font-family: var(--font-mono); font-weight: 700; letter-spacing: .05em; }
.offer-bar small { opacity: .85; font-weight: 500; }
.offer-bar a { color: #FDE68A; text-decoration: underline; }
.row-off td { opacity: .55; }
.price-in { display: flex; align-items: center; gap: 6px; }
.price-in input { width: 110px; height: 40px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); padding-inline: 10px; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.price-in input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.price-in span { color: var(--text-3); font-size: 13px; }
.yearly-hint { display: block; margin-top: 4px; font-size: 12px; }
.prices-form { display: grid; gap: 16px; }
.bento-tpl > span small { margin-inline-start: auto; font-size: 11.5px; font-weight: 500; color: var(--text-3); background: var(--bg-soft); padding: 1px 8px; border-radius: 99px; }

/* ---------- مستعرض القوالب في الرئيسية ---------- */
.tplx { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; overflow: hidden; box-shadow: var(--sh-2); margin-bottom: 20px; }
.tplx-side { padding: 28px 22px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-inline-end: 1px solid var(--border); }
.tplx-side h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.tplx-side > p { color: var(--text-2); font-size: 14px; line-height: 1.8; margin-bottom: 18px; }
.tplx-tabs { display: grid; gap: 6px; }
.tplx-tab { --pc: var(--primary); display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 14px; text-align: start; color: var(--text-2); font-weight: 600; font-size: 14.5px; border: 1.5px solid transparent; transition: background .18s, border-color .18s, color .18s, transform .18s; }
.tplx-tab:hover { background: color-mix(in srgb, var(--pc) 7%, var(--surface)); color: var(--text); }
.tplx-tab[aria-selected="true"] { background: color-mix(in srgb, var(--pc) 11%, var(--surface)); border-color: color-mix(in srgb, var(--pc) 45%, transparent); color: var(--text); transform: translateX(-4px); }
.tplx-tab-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, var(--surface)); transition: .18s; }
.tplx-tab[aria-selected="true"] .tplx-tab-ic { background: var(--pc); color: #fff; box-shadow: 0 8px 16px -8px var(--pc); }
.tplx-tab-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tplx-tab-n { font-size: 12px; font-weight: 700; min-width: 26px; height: 22px; padding-inline: 7px; border-radius: 99px; display: grid; place-items: center; color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, var(--surface)); }

.tplx-stage { position: relative; padding: 26px 28px; min-width: 0; }
.tplx-panel { --pc: var(--primary); animation: tplx-in .35s ease; }
@keyframes tplx-in { from { opacity: 0; transform: translateY(8px); } }
.tplx-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; margin-bottom: 18px; color: #fff;
  background: radial-gradient(260px 120px at 0% 100%, rgba(255, 255, 255, .22), transparent 70%), linear-gradient(120deg, var(--pc), color-mix(in srgb, var(--pc) 70%, #0B1340)); }
.tplx-head-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); flex-shrink: 0; }
.tplx-head h4 { font-size: 18px; font-weight: 700; }
.tplx-head p { font-size: 13.5px; opacity: .9; }
.tplx-count { margin-inline-start: auto; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .2); white-space: nowrap; }
.tplx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tplx-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; text-align: start; border: 1.5px solid var(--border); background: var(--surface); transition: border-color .18s, transform .18s, box-shadow .18s; }
.tplx-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pc) 50%, var(--border)); box-shadow: 0 12px 24px -16px var(--pc); }
.tplx-card[aria-pressed="true"] { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 6%, var(--surface)); }
.tplx-card-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, var(--surface)); }
.tplx-card strong { font-size: 15px; }
.tplx-card-txt { font-family: var(--font-read); font-size: 12.5px; color: var(--text-3); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tplx mark { background: color-mix(in srgb, var(--pc) 14%, transparent); color: color-mix(in srgb, var(--pc) 85%, var(--text)); border-radius: 5px; padding: 0 3px; font-weight: 600; }
.tplx-compose { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 12px 12px 14px; border-radius: 18px; border: 1.5px solid var(--pc); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 12%, transparent); }
.tplx-av { flex-shrink: 0; margin-top: 2px; }
.tplx-typed { flex: 1; min-height: 52px; font-family: var(--font-read); font-size: 15px; line-height: 1.85; color: var(--text); }
.tplx-typed.typing::after { content: ""; display: inline-block; width: 2px; height: 1.1em; background: var(--pc); margin-inline-start: 2px; vertical-align: -3px; animation: blink 1s steps(2) infinite; }
.tplx-send { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; align-self: flex-end; color: #fff; background: var(--pc); }
.tplx-send .ic { transform: scaleX(-1); }
.tplx-hint { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }

.bento-row { grid-template-columns: 1fr 1fr 1.6fr; }
.bento-row .bento-wide { grid-column: auto; }
@media (max-width: 980px) {
  .tplx { grid-template-columns: minmax(0, 1fr); }
  .tplx-side { border-inline-end: 0; border-bottom: 1px solid var(--border); padding: 22px 18px; }
  .tplx-tabs { display: flex; overflow-x: auto; scrollbar-width: none; gap: 8px; padding-bottom: 2px; }
  .tplx-tabs::-webkit-scrollbar { display: none; }
  .tplx-tab { width: auto; flex-shrink: 0; transform: none !important; }
  .tplx-stage { padding: 20px 16px; }
  .bento-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) { .tplx-head { flex-wrap: wrap; } .tplx-count { margin-inline-start: 0; } }
.tplx .p-c1 { --pc: #E0457B; } .tplx .p-c2 { --pc: #0E9F6E; } .tplx .p-c3 { --pc: #0891B2; } .tplx .p-c4 { --pc: #C28100; }
.tplx .p-c5 { --pc: #475569; } .tplx .p-c6 { --pc: #7C3AED; } .tplx .p-c7 { --pc: #EA580C; }
.admin-cs .table td.num { white-space: nowrap; }
#coupon-form.is-editing { border: 2px solid var(--c-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-blue) 14%, transparent); }
#coupon-form { scroll-margin-top: 90px; }

/* ---------- مسافات أقل بين الأقسام ---------- */
.section { padding-block: 56px; }
.sec-head { margin-bottom: 32px; }
.sec-head h2 { margin-block: 10px 8px; }
.h-trust { padding-block: 48px 44px; }
.marquee { margin-top: 28px; }
.footer { margin-top: 56px; padding-top: 48px; }
.footer-bottom { margin-top: 32px; }
.h-final { padding: 48px 24px; }
@media (max-width: 600px) {
  .section { padding-block: 40px; }
  .sec-head { margin-bottom: 24px; }
  .h-trust { padding-block: 36px 32px; }
  .footer { margin-top: 40px; }
}

/* ---------- مسافات أقل في باقي الصفحات (اللوحات، الحساب، الدفع، الدخول) ---------- */
.cs-content { padding: 18px 24px 32px; gap: 16px; }
.cs-top { min-height: 66px; padding-block: 10px; }
.cs-banner { padding: 14px 18px; }
.cs-stats, .admin-cs .kpis { gap: 14px; }
.cs-stat { padding: 16px 18px; }
.cs-stat strong { margin-top: 12px; }
.cs-two { gap: 14px; }
.cs-tiles { gap: 12px; }
.cs-tile { padding: 16px; }
.cs-card { padding: 18px 20px; }
.cs-card > .cs-sec-head { margin-bottom: 10px; }
.cs-side { gap: 10px; padding: 14px 14px 12px; }
.scan, .scan-top, .rad { gap: 14px; }
.scan-drop { min-height: 250px; }
.tier-split { margin-top: 14px; padding-top: 12px; }
.mini-h { margin: 14px 0 8px; }

.page-head { padding-block: 28px 16px; }
.card { padding: 20px 22px; }
.card + .card { margin-top: 14px; }
.card-head { margin-bottom: 12px; }
.checkout, .grid-2 { gap: 14px; }
.plan .btn { margin-block: 16px 18px; }
.plan-price { margin-block: 16px 4px; }
.plan-feat { gap: 9px; padding-top: 16px; }
.trial-band { margin-top: 18px; padding: 16px 20px; }

.auth-card { padding-block: 24px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-sub { margin-bottom: 18px; }
.auth .form { gap: 14px; }
.auth-aside-in { padding: 40px; }
.auth-aside h2 { margin-block: 16px 20px; }
.auth-preview { margin-top: 28px; }

.thread-in { padding-block: 22px 18px; gap: 20px; }
.welcome { padding-top: 2vh; }
.tpls { margin-top: 20px; }

@media (max-width: 960px) {
  .cs-content { padding: 14px 14px 26px; gap: 12px; }
  .cs-stats, .cs-two, .cs-tiles { gap: 10px; }
}
@media (max-width: 600px) {
  .page-head { padding-block: 20px 12px; }
  .card, .cs-card { padding: 16px; }
  .cs-stat { padding: 14px; }
}

/* ---------- تعديل الباقات ---------- */
.plans-edit { display: grid; gap: 14px; }
.tier-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.tier-card { border-top: 4px solid var(--tc); display: grid; gap: 12px; }
.tier-card .form { gap: 10px; }
.tier-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tier-card-head .cs-tile-ic { width: 40px; height: 40px; margin: 0; }
.tier-card-head strong { display: block; font-size: 17px; }
.tier-card-head small { color: var(--text-3); font-size: 12.5px; }
.tier-star { margin-inline-start: auto; cursor: pointer; }
.tier-star input { position: absolute; opacity: 0; }
.tier-star span { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--text-3); border: 1px dashed var(--border-2); }
.tier-star input:checked + span { color: #92400E; background: #FEF3C7; border: 1px solid #FCD34D; }
.tier-star input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }
.tier-preview { padding-top: 12px; border-top: 1px dashed var(--cs-line); }
.tier-preview > p { font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; }
.tier-preview .plan-feat { padding-top: 0; border-top: 0; gap: 6px; }
.tier-preview .plan-feat li { font-size: 13.5px; }
.plans-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.plans-actions .btn { margin-inline-start: auto; }
.plans-actions a { margin-inline: 3px; padding: 2px 8px; border-radius: 99px; }
.plans-actions a.is-on { background: var(--primary-soft); font-weight: 600; }
@media (max-width: 1100px) { .tier-cards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- باقة واحدة ---------- */
.plans.plans-single { grid-template-columns: minmax(0, 520px); justify-content: center; }
.plans-single .plan-price strong { font-size: 54px; }
/* الكارت بالعرض على الشاشات الكبيرة: السعر والزرار ناحية، والمميزات ناحية */
@media (min-width: 861px) {
  .plans.plans-single { grid-template-columns: minmax(0, 1fr); max-width: none; }
  .plans-single .plan { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); column-gap: 44px; align-items: start; padding: 36px 40px; }
  .plans-single .plan > :not(.plan-feat):not(.plan-badge) { grid-column: 1; }
  .plans-single .plan .btn { margin-block: 22px 0; }
  .plans-single .plan-feat { grid-column: 2; grid-row: 1 / span 6; align-self: center; grid-template-columns: 1fr 1fr; gap: 16px 24px; padding-top: 0; border-top: 0; padding-inline-start: 40px; border-inline-start: 1px solid var(--border); }
}

/* ---------- ألوان المهن الجديدة (مبرمجين، موظفين، طبخ) ---------- */
.h-pill.c8 { color: #8B85FF; } .h-pill.c9 { color: #2DD4BF; } .h-pill.c10 { color: #FF7A7A; }
.h-hero .h-pill.c8 .ic { color: #9D97FF; } .h-hero .h-pill.c9 .ic { color: #3FE0CA; } .h-hero .h-pill.c10 .ic { color: #FF8F8F; }
.p-c8 { --pc: #4F46E5; } .p-c9 { --pc: #0D9488; } .p-c10 { --pc: #DC2626; }
.tplx .p-c8 { --pc: #4F46E5; } .tplx .p-c9 { --pc: #0D9488; } .tplx .p-c10 { --pc: #DC2626; }
/* ---------- ألوان المهن الجديدة (طلبة، صناع محتوى، صيادلة، HR، مدربين) ---------- */
.h-pill.c11 { color: #7AA7FF; } .h-pill.c12 { color: #FF7AC0; } .h-pill.c13 { color: #34D399; } .h-pill.c14 { color: #C79BFF; } .h-pill.c15 { color: #FFB45C; }
.h-hero .h-pill.c11 .ic { color: #8DB4FF; } .h-hero .h-pill.c12 .ic { color: #FF8FCB; } .h-hero .h-pill.c13 .ic { color: #4ADEAA; } .h-hero .h-pill.c14 .ic { color: #D2AEFF; } .h-hero .h-pill.c15 .ic { color: #FFC070; }
.p-c11 { --pc: #2563EB; } .p-c12 { --pc: #DB2777; } .p-c13 { --pc: #059669; } .p-c14 { --pc: #9333EA; } .p-c15 { --pc: #D97706; }
.tplx .p-c11 { --pc: #2563EB; } .tplx .p-c12 { --pc: #DB2777; } .tplx .p-c13 { --pc: #059669; } .tplx .p-c14 { --pc: #9333EA; } .tplx .p-c15 { --pc: #D97706; }

/* ---------- مستعرض القوالب: قايمة المهن بتاخد نفس طول المحتوى وتعمل سكرول ---------- */
@media (min-width: 981px) {
  .tplx-side { contain: size; display: flex; flex-direction: column; min-height: 0; }
  .tplx-tabs { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; padding: 2px 4px 18px 12px;
    scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--primary) 35%, transparent) transparent;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
  .tplx-tabs::-webkit-scrollbar { width: 6px; }
  .tplx-tabs::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--primary) 35%, transparent); border-radius: 99px; }
  .tplx-tabs::-webkit-scrollbar-track { background: transparent; }
}

/* زرار «اعرض كل المهن» تحت صف المهن */
.h-prof-more { display: flex; justify-content: center; margin-top: 26px; }

/* ---------- مستعرض القوالب على الموبايل: سلايد للمهن بأسهم وتلاشي على الأطراف ---------- */
.tplx-tabs-wrap { display: contents; }
.tplx-arrow, .tplx-swipe { display: none; }
@media (max-width: 980px) {
  .tplx-tabs-wrap { display: block; position: relative; margin-inline: -4px; }
  .tplx-tabs { scroll-snap-type: x proximity; scroll-behavior: smooth; padding: 4px 4px 6px; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
    mask-image: linear-gradient(to left, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%); }
  .tplx-tabs-wrap.at-start .tplx-tabs { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent 100%); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent 100%); }
  .tplx-tabs-wrap.at-end .tplx-tabs { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 36px); mask-image: linear-gradient(to left, transparent 0, #000 36px); }
  .tplx-tabs-wrap.at-start.at-end .tplx-tabs { -webkit-mask-image: none; mask-image: none; }
  .tplx-tab { scroll-snap-align: center; }
  .tplx-arrow { display: grid; place-items: center; position: absolute; top: 50%; z-index: 2; width: 34px; height: 34px; margin-top: -19px; border-radius: 50%;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 6px 16px -6px rgba(15, 23, 42, .35); transition: opacity .2s; }
  .tplx-arrow.prev { right: -2px; }
  .tplx-arrow.prev .ic { transform: scaleX(-1); }
  .tplx-arrow.next { left: -2px; }
  .tplx-tabs-wrap.at-start .tplx-arrow.prev, .tplx-tabs-wrap.at-end .tplx-arrow.next { opacity: 0; pointer-events: none; }
  .tplx-swipe { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font-size: 12.5px; color: var(--text-3); }
  .tplx-swipe-hand { display: inline-block; animation: tplx-swipe 1.8s ease-in-out infinite; }
  .tplx-tabs-wrap.moved + .tplx-swipe { visibility: hidden; }
}
@keyframes tplx-swipe { 0%, 100% { transform: translateX(6px); } 50% { transform: translateX(-6px); } }
@media (prefers-reduced-motion: reduce) { .tplx-swipe-hand { animation: none; } .tplx-tabs { scroll-behavior: auto; } }

/* ---------- ChatGPT: شارة «جديد» في اختيار الموديل ---------- */
.model-new { margin-inline-start: 5px; font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 99px; background: #10A37F; color: #fff; }
.model-pick { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.model-pick::-webkit-scrollbar { display: none; }
.model-pick label span { white-space: nowrap; }

/* ---------- لوحة التحكم: مفاتيح الخدمات ---------- */
.keys-list { display: grid; gap: 10px; }
.key-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto; gap: 10px 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.key-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.key-info strong { width: 100%; }
.key-info code { font-size: 13px; }
.key-form { display: flex; gap: 8px; align-items: center; min-width: 0; }
.key-form .pw-wrap { flex: 1; min-width: 0; }
.key-form input { width: 100%; height: 40px; }
.key-acts { display: flex; gap: 6px; }
@media (max-width: 860px) { .key-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- لوحة التحكم: الموديلات (تعديل ومسح) ---------- */
.models-list { display: grid; gap: 12px; }
.model-card { padding: 16px 18px; }
.model-card.is-off { opacity: .75; }
.model-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(150px, 1fr) 130px 130px auto; gap: 10px 16px; align-items: center; }
.model-name { display: grid; gap: 2px; min-width: 0; }
.model-row code { font-size: 13px; overflow-wrap: anywhere; word-break: normal; text-align: start; }
.model-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start; padding-top: 10px; border-top: 1px dashed var(--border); }
.model-acts form { display: contents; }
.model-acts .icon-btn { margin-inline-start: auto; }
.model-edit { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.model-edit summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--primary-text); list-style: none; }
.model-edit summary::-webkit-details-marker { display: none; }
.model-edit[open] summary { margin-bottom: 12px; }
@media (max-width: 980px) { .model-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .model-acts { justify-content: flex-start; } }

/* ---------- أعلام الدول ---------- */
.country { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cflag { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(15, 23, 42, .12); flex: none; }
.cflag-none { display: inline-grid; place-items: center; box-shadow: none; font-size: 14px; }

/* ---------- كتابة الروشتات ---------- */
.rx-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.rx-in { display: grid; gap: 12px; }
.rx-clinic { border: 1px dashed var(--border); border-radius: 14px; padding: 10px 14px; }
.rx-clinic summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.rx-clinic[open] summary { margin-bottom: 10px; }
.rx-in textarea { font-family: var(--font-mono, monospace); line-height: 1.8; }
.rx-out { display: grid; gap: 12px; position: sticky; top: 16px; }
.rx-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rx-review { background: var(--warn-soft); border-radius: 14px; padding: 12px 16px; font-size: 14.5px; }
.rx-review ul { margin: 6px 0 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.rx-paper { background: #fff; color: #111827; border-radius: 16px; border: 1px solid #E5E7EB; box-shadow: 0 18px 40px -24px rgba(15, 23, 42, .35); padding: 28px 30px 22px; min-height: 520px; display: flex; flex-direction: column; gap: 14px; }
.rx-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #1B2CD8; padding-bottom: 12px; }
.rx-head div { display: grid; gap: 2px; }
.rx-head strong { font-family: var(--font-head); font-size: 22px; color: #0B1440; }
.rx-head span { color: #4B5563; font-size: 14px; }
.rx-logo { font-size: 46px; line-height: 1; color: #1B2CD8; font-family: Georgia, 'Times New Roman', serif; }
.rx-patient { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14.5px; color: #374151; border-bottom: 1px dashed #D1D5DB; padding-bottom: 10px; }
.rx-items { margin: 0; padding-inline-start: 22px; display: grid; gap: 14px; flex: 1; align-content: start; }
.rx-items li::marker { font-weight: 700; color: #1B2CD8; }
.rx-name { font-weight: 700; font-size: 16.5px; text-align: left; direction: ltr; unicode-bidi: plaintext; }
.rx-dose { color: #1F2937; font-size: 15px; margin-top: 2px; }
.rx-name:focus, .rx-dose:focus { outline: 2px dashed #93A3F8; outline-offset: 3px; border-radius: 4px; }
.rx-empty { list-style: none; color: #6B7280; margin-inline-start: -22px; }
.rx-extra { margin: 0; padding: 10px 12px; background: #F3F4F6; border-radius: 10px; font-size: 14.5px; }
.rx-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; border-top: 1px solid #E5E7EB; padding-top: 10px; font-size: 13px; color: #4B5563; }
.rx-sign { margin-inline-start: auto; }
@media (max-width: 1100px) { .rx-grid { grid-template-columns: minmax(0, 1fr); } .rx-out { position: static; } }
@media print {
  body.rx-printing * { visibility: hidden !important; }
  body.rx-printing .rx-paper, body.rx-printing .rx-paper * { visibility: visible !important; }
  body.rx-printing .rx-paper { position: fixed; inset: 0; margin: 0; border: 0; box-shadow: none; border-radius: 0; min-height: 100vh; padding: 14mm 14mm 10mm; }
  body.rx-printing .rx-name:focus, body.rx-printing .rx-dose:focus { outline: none; }
  @page { size: A5; margin: 0; }
}
.rx-tools[hidden], .rx-review[hidden], .rx-extra[hidden] { display: none; }
.rx-head .rx-logo { font-size: 46px; line-height: 1; color: #1B2CD8; font-family: Georgia, 'Times New Roman', serif; }

/* ---------- الروشتات الجاهزة ---------- */
.rx-saved { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); }
.rx-saved-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; margin-inline-end: 4px; }
.rx-chip { display: inline-flex; align-items: center; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.rx-chip button { padding: 5px 12px; font-size: 13.5px; font-weight: 600; color: var(--primary-text); }
.rx-chip button:hover { background: var(--primary-soft); }
.rx-chip .rx-chip-x { padding: 5px 9px; color: var(--text-3); font-weight: 400; border-inline-start: 1px solid var(--border); }
.rx-chip .rx-chip-x:hover { color: var(--danger); background: var(--danger-soft); }

/* ---------- الشهادات الطبية ---------- */
.cert-types { margin-bottom: 4px; }
.cert-title { text-align: center; font-size: 22px; color: #0B1440; margin: 6px 0 2px; text-decoration: underline; text-underline-offset: 8px; text-decoration-color: #1B2CD8; }
.cert-body { flex: 1; font-size: 16px; line-height: 2.1; color: #111827; }
.cert-body p { margin: 0 0 10px; }
.cert-body:focus, .cert-title:focus { outline: 2px dashed #93A3F8; outline-offset: 4px; border-radius: 4px; }
.cert-sign { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; font-size: 14.5px; color: #374151; padding: 8px 0 14px; }
.cert-sign span:last-child { text-align: center; line-height: 2; }
@media print { body.rx-printing .cert-paper { padding: 18mm 16mm 12mm; } }

/* ---------- لوحة التحكم والحساب على الموبايل: مفيش حاجة تزق الصفحة لبره ---------- */
.cs-content { grid-template-columns: minmax(0, 1fr); }
.cs-content > *, .cs-card, .cs-two > *, .cs-stats > *, .cs-tiles > *, .models-list > *, .keys-list > * { min-width: 0; }
.cs-card .table-wrap, .cs-content .table-wrap { max-width: 100%; }
@media (max-width: 700px) {
  .cs-content .table th, .cs-content .table td { padding: 10px 10px; font-size: 13px; }
  .cs-content .table td { white-space: nowrap; }
  .cs-content .table td .cell-user, .cs-content .table td small { white-space: normal; }
  .cs-sec-head { gap: 6px 10px; }
  .cs-sec-head > span[style*="margin-inline-start:auto"] { margin-inline-start: 0 !important; width: 100%; }
  .dist-row { grid-template-columns: 28px minmax(70px, 120px) minmax(0, 1fr) 34px; gap: 8px; }
  .cs-banner { grid-template-columns: minmax(0, 1fr) !important; }
  .model-row { grid-template-columns: minmax(0, 1fr); }
  .key-form { flex-wrap: wrap; }
}

/* =================== صفحات الهبوط (الأطباء / المدرسين) =================== */
.lp { --pc: var(--primary); }
.lp-hero { position: relative; overflow: hidden; background: radial-gradient(900px 520px at 85% 10%, color-mix(in srgb, var(--pc) 30%, transparent), transparent 70%), linear-gradient(160deg, #0B1440, #070D2B 70%); color: #fff; }
.lp-hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding-block: 64px 70px; }
.lp-tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: color-mix(in srgb, var(--pc) 25%, rgba(255,255,255,.06)); border: 1px solid color-mix(in srgb, var(--pc) 60%, transparent); font-weight: 600; font-size: 14px; }
.lp-copy h1 { font-size: clamp(34px, 5.2vw, 58px); line-height: 1.2; margin: 18px 0 16px; color: #fff; text-wrap: balance; }
.lp-copy h1 .hl { color: color-mix(in srgb, var(--pc) 45%, #fff); }
.lp-sub { font-size: 18px; line-height: 1.9; color: #C9D0F2; max-width: 56ch; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.lp-cta .btn-primary { background: var(--pc); border-color: var(--pc); }
.lp-price-pill { margin-inline-start: 10px; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.2); font-size: 13.5px; font-weight: 600; }
.lp-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 22px 0 0; padding: 0; color: #DCE1FA; font-size: 14.5px; }
.lp-trust li { display: inline-flex; align-items: center; gap: 6px; }
.lp-trust .ic { color: color-mix(in srgb, var(--pc) 50%, #fff); }
.lp-visual { position: relative; justify-self: center; width: min(100%, 420px); }
.lp-photo { display: block; width: 100%; height: auto; aspect-ratio: 720 / 964; object-fit: cover; border-radius: 28px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.6); border: 6px solid rgba(255,255,255,.08); }
.lp-float { position: absolute; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: #fff; color: #0B1440; box-shadow: 0 18px 40px -12px rgba(0,0,0,.45); }
.lp-float > span { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--pc); color: #fff; flex: none; }
.lp-float strong { display: block; font-size: 15px; }
.lp-float small { display: block; font-size: 12.5px; color: #5b6390; }
.lp-float-1 { top: 14%; inset-inline-start: -40px; }
.lp-float-2 { bottom: 12%; inset-inline-end: -36px; }
.lp-sec { padding-block: 72px; }
.lp-alt { background: var(--bg-soft); }
.lp-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.lp-head h2 { font-size: clamp(26px, 3.6vw, 38px); text-wrap: balance; }
.lp-head p { color: var(--text-2); font-size: 17px; margin-top: 10px; }
.lp-eyebrow { display: inline-block; font-weight: 700; font-size: 13.5px; color: var(--pc); letter-spacing: .3px; margin-bottom: 8px; }
.lp-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--pc); background: color-mix(in srgb, var(--pc) 13%, var(--surface)); flex: none; }
.lp-pains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lp-pain { padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); display: grid; gap: 10px; }
.lp-pain h3 { font-size: 19px; }
.lp-pain p, .lp-feat p { color: var(--text-2); line-height: 1.85; margin: 0; }
.lp-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lp-feat { padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); display: grid; gap: 10px; align-content: start; transition: transform .2s, box-shadow .2s; }
.lp-feat:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.lp-feat.is-star { border: 2px solid color-mix(in srgb, var(--pc) 55%, var(--border)); }
.lp-feat h3 { font-size: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lp-new { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--pc); color: #fff; }
.lp-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.lp-demo-copy h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 12px; }
.lp-demo-copy > p { color: var(--text-2); font-size: 17px; line-height: 1.9; }
.lp-steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.lp-steps li { counter-increment: s; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; }
.lp-steps li::before { content: counter(s); grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--pc); color: #fff; font-weight: 700; }
.lp-steps span { color: var(--text-2); font-size: 15px; }
.lp-chat { border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 60px -30px rgba(15,23,42,.4); padding: 18px; display: grid; gap: 12px; }
.lp-chat-top { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text-2); padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.lp-dot { width: 9px; height: 9px; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 4px rgba(16,185,129,.18); }
.lp-q { justify-self: end; max-width: 85%; background: var(--primary); color: #fff; padding: 12px 16px; border-radius: 18px 18px 6px 18px; white-space: pre-line; unicode-bidi: plaintext; font-size: 15px; }
.lp-a { background: var(--bg-soft); padding: 14px 16px; border-radius: 18px 18px 18px 6px; line-height: 1.9; font-size: 15px; }
.lp-chat-tools { display: flex; gap: 8px; }
.lp-chat-tools span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--border); color: var(--text-2); }
.lp-safe { display: flex; gap: 18px; align-items: flex-start; padding: 26px 28px; border-radius: 22px; background: color-mix(in srgb, var(--pc) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--pc) 30%, var(--border)); }
.lp-safe h3 { font-size: 20px; margin-bottom: 6px; }
.lp-safe p { margin: 0; color: var(--text-2); line-height: 1.9; }
.lp-plan { max-width: 520px; margin: 0 auto; padding: 32px; border-radius: 26px; background: var(--surface); border: 2px solid var(--pc); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--pc) 60%, transparent); display: grid; gap: 18px; }
.lp-plan-price { text-align: center; }
.lp-plan-price strong { font-size: 64px; font-family: var(--font-head); color: var(--pc); line-height: 1; }
.lp-plan-price span { font-size: 18px; color: var(--text-2); margin-inline-start: 6px; }
.lp-plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lp-plan li { display: flex; gap: 10px; align-items: flex-start; }
.lp-plan li .ic { color: var(--pc); margin-top: 4px; flex: none; }
.lp-plan .btn-primary { background: var(--pc); border-color: var(--pc); }
.lp-plan-note { text-align: center; font-size: 13px; color: var(--text-3); margin: 0; }
.lp-final { background: linear-gradient(135deg, #0B1440, color-mix(in srgb, var(--pc) 70%, #0B1440)); margin-block: 20px 60px; }
.lp-sticky { display: none; }
@media (max-width: 980px) {
  .lp-hero-in { grid-template-columns: minmax(0, 1fr); padding-block: 40px 50px; gap: 34px; }
  .lp-visual { width: min(100%, 340px); }
  .lp-float-1 { inset-inline-start: -10px; }
  .lp-float-2 { inset-inline-end: -10px; }
  .lp-pains, .lp-feats { grid-template-columns: minmax(0, 1fr); }
  .lp-demo { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .lp-sec { padding-block: 48px; }
  .lp-sticky { display: block; position: fixed; z-index: 40; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); text-align: center; padding: 14px; border-radius: 16px; background: var(--primary); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 14px 30px -10px rgba(0,0,0,.45); }
  .lp-body .wa-float { bottom: 84px; }
  .lp-body { padding-bottom: 70px; }
}
@media (min-width: 600px) and (max-width: 980px) { .lp-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lp-a p { margin: 0; }
.lp-a p[dir="auto"] { text-align: start; }

/* ---------- صفحات الهبوط: الدفع السريع ---------- */
.lp-quick { display: grid; gap: 10px; }
.lp-quick-fields { display: grid; gap: 10px; }
.lp-quick input { height: 52px; border-radius: 14px; border: 1.5px solid var(--border); padding-inline: 16px; font-size: 16px; background: var(--surface); color: var(--text); width: 100%; }
.lp-quick input:focus { outline: none; border-color: var(--pc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 18%, transparent); }
.lp-quick .btn { gap: 8px; }
.lp-plan-note .ic { vertical-align: -2px; color: var(--success); }
html { scroll-behavior: smooth; }
#start { scroll-margin-top: 90px; }.lp-quick label { font-weight: 600; font-size: 14.5px; margin-bottom: -4px; }
.lp-quick label small { font-weight: 400; color: var(--text-3); }

/* ---------- صفحات الهبوط: اختيار المحفظة أو الكارت ---------- */
.lp-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lp-methods label { position: relative; cursor: pointer; }
.lp-methods input { position: absolute; opacity: 0; }
.lp-methods span { display: grid; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); transition: border-color .15s, background .15s; }
.lp-methods b { font-size: 15.5px; }
.lp-methods small { font-size: 12px; color: var(--text-3); }
.lp-methods input:checked + span { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 9%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 15%, transparent); }
.lp-methods input:focus-visible + span { outline: 3px solid var(--pc); outline-offset: 2px; }
.lp-quick:has(input[value="card"]:checked) .lp-wallet-note { display: none; }.pay-wallet { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; width: 100%; margin-top: 8px; }
.pay-wallet input[name="wallet_phone"] { flex: 1 1 200px; height: 42px; border: 1px solid var(--border); border-radius: 10px; padding-inline: 12px; background: var(--surface); color: var(--text); }
.pay-option.main { flex-wrap: wrap; }

/* ---------- المحفظة بس + صفحة انتظار التأكيد ---------- */
.lp-wallets { display: grid; gap: 2px; text-align: center; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--pc) 9%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--pc) 40%, var(--border)); }
.lp-wallets b { font-size: 16px; }
.lp-wallets span { font-size: 13px; color: var(--text-2); }
.pw-card { max-width: 520px; margin: 48px auto; padding: 36px 28px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.pw-phone { width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); position: relative; }
.pw-phone::after { content: ""; position: absolute; inset: -8px; border-radius: 34px; border: 3px solid var(--primary); opacity: .35; animation: pw-pulse 1.6s ease-out infinite; }
@keyframes pw-pulse { from { transform: scale(.9); opacity: .5; } to { transform: scale(1.15); opacity: 0; } }
.pw-card h1 { font-size: 24px; }
.pw-steps { text-align: start; display: grid; gap: 8px; margin: 4px 0; padding-inline-start: 22px; color: var(--text-2); }
.pw-state { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; padding: 10px 16px; border-radius: 99px; background: var(--bg-soft); }
.pw-state.ok { background: var(--success-soft); color: var(--success); }
.pw-state.err { background: var(--danger-soft); color: var(--danger); }
.pw-state .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--primary-soft); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .pw-phone::after { animation: none; } }
/* =================== الشات بوت بتاعي (لوحة المشترك) =================== */
.bot-link-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.bot-link-av { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: 22px; flex: none; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--primary-soft); }
.bot-link-av.big { width: 88px; height: 88px; font-size: 30px; }
.bot-link-av img { width: 100%; height: 100%; object-fit: cover; }
.bot-link-main { display: grid; gap: 8px; min-width: 0; }
.bot-link-main h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bot-link-main .copy-box code { overflow-wrap: anywhere; }
.bot-link-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.bot-stats { display: grid; gap: 8px; }
.bot-stats div { padding: 8px 14px; border-radius: 12px; background: var(--bg-soft); display: grid; text-align: center; min-width: 120px; }
.bot-stats strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.bot-stats span { font-size: 12px; color: var(--text-3); }
.bot-av-row { display: flex; gap: 14px; align-items: center; }
.bot-drop { display: grid; justify-items: center; gap: 4px; padding: 22px; border: 2px dashed var(--border); border-radius: 16px; background: var(--bg-soft); cursor: pointer; text-align: center; color: var(--text-2); transition: border-color .15s, background .15s; }
.bot-drop:hover, .bot-drop.is-over { border-color: var(--primary); background: var(--primary-soft); }
.bot-drop.is-busy { opacity: .6; pointer-events: none; }
.bot-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.bot-drop small { color: var(--text-3); }
.bot-up-state { margin: 8px 0 0; font-size: 14px; min-height: 1em; }
.bot-up-state.err { color: var(--danger); }
.bot-files { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; gap: 8px; }
.bot-files li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.bot-files li > span { flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.bot-files small { color: var(--text-3); font-size: 12px; }
.bot-qs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bot-qs li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); }
.bot-qs li span { min-width: 0; overflow-wrap: anywhere; }
.bot-qs small { color: var(--text-3); white-space: nowrap; }
@media (max-width: 860px) { .bot-link-card { grid-template-columns: minmax(0, 1fr); justify-items: start; } .bot-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; } .bot-stats div { min-width: 0; } }

/* =================== صفحة الشات العامة =================== */
.botp-body { margin: 0; background: radial-gradient(800px 500px at 100% 0%, rgba(27,44,216,.10), transparent 70%), var(--bg); color: var(--text); }
.botp { max-width: 760px; margin: 0 auto; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
.botp-head { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.botp-av { position: relative; width: 52px; height: 52px; flex: none; }
.botp-av img, .botp-av > span { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: 20px; }
.botp-online { position: absolute; bottom: 1px; inset-inline-end: 1px; width: 13px; height: 13px; border-radius: 50%; background: #10B981; border: 2px solid var(--bg); }
.botp-online.off { background: #9CA3AF; }
.botp-who { flex: 1; min-width: 0; }
.botp-who h1 { font-size: 18px; line-height: 1.3; }
.botp-who p { margin: 0; font-size: 13px; color: var(--text-2); }
.botp-ai { color: var(--primary-text); font-weight: 600; }
.botp-new { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); }
.botp-msgs { flex: 1; overflow-y: auto; padding: 18px 4px; display: flex; flex-direction: column; gap: 12px; }
.botp-msg { display: flex; }
.botp-msg.me { justify-content: flex-start; }
.botp-msg.ai { justify-content: flex-end; }
.botp-bubble { max-width: 85%; padding: 12px 16px; border-radius: 18px; line-height: 1.85; font-size: 15.5px; overflow-wrap: anywhere; }
.botp-msg.me .botp-bubble { background: var(--primary); color: #fff; border-end-start-radius: 6px; white-space: pre-wrap; }
.botp-msg.ai .botp-bubble { background: var(--surface); border: 1px solid var(--border); border-end-end-radius: 6px; }
.botp-bubble.err { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.botp-bubble p { margin: 0 0 6px; }
.botp-bubble p:last-child { margin: 0; }
.botp-bubble ul, .botp-bubble ol { margin: 4px 0; padding-inline-start: 20px; }
.botp-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border: 1.5px solid var(--border); border-radius: 20px; background: var(--surface); }
.botp-form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.botp-form textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); font: inherit; font-size: 16px; line-height: 1.6; padding: 6px 4px; max-height: 140px; }
.botp-send { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--primary); color: #fff; flex: none; }
.botp-send .ic { transform: scaleX(-1); }
.botp-send:disabled { opacity: .5; }
.botp-foot { text-align: center; font-size: 12px; color: var(--text-3); margin: 8px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }
.botp-foot a { color: var(--primary-text); }
.botp-missing { max-width: 480px; margin: 20vh auto; text-align: center; padding: 0 16px; }

/* =================== الصفحة الشخصية العامة (p.php) =================== */
.pp { max-width: 560px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-left, 0px)) 32px; }
.pp-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 0 22px 22px; text-align: center; overflow: hidden; box-shadow: 0 20px 50px -30px rgba(11,20,48,.35); }
.pp-cover { height: 120px; margin: 0 -22px; background: radial-gradient(260px 160px at 85% 0%, rgba(255,255,255,.22), transparent 70%), linear-gradient(135deg, #0B1430, #1B2CD8 70%, #3B82F6); }
.pp-av { width: 120px; height: 120px; margin: -60px auto 12px; border-radius: 50%; overflow: hidden; border: 5px solid var(--surface); background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; font-size: 40px; font-weight: 700; box-shadow: 0 8px 24px -10px rgba(11,20,48,.4); }
.pp-av img { width: 100%; height: 100%; object-fit: cover; }
.pp-card h1 { font-size: 24px; line-height: 1.35; }
.pp-title { margin: 4px 0 0; color: var(--text-2); font-size: 15px; }
.pp-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 6px; }
.pp-btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); text-decoration: none; transition: transform .15s; }
.pp-btn:hover { transform: translateY(-1px); }
.pp-btn.wa { background: #1FA855; color: #fff; border-color: transparent; }
.pp-btn.ai { background: var(--primary); color: #fff; border-color: transparent; }
.pp-sec { text-align: start; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.pp-sec h2 { font-size: 15px; color: var(--text-3); font-weight: 600; margin-bottom: 10px; }
.pp-bio { margin: 0; line-height: 1.9; color: var(--text); overflow-wrap: anywhere; }
.pp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pp-chips li { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-size: 14px; font-weight: 500; }
.pp-info { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pp-info li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--bg-soft); }
.pp-info li > .ic { color: var(--primary-text); flex: none; margin-top: 3px; }
.pp-info span { display: grid; min-width: 0; overflow-wrap: anywhere; }
.pp-info small { color: var(--text-3); font-size: 12px; }
.pp-info a { color: var(--text); text-decoration: none; }
.pp-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pp-links a { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 500; min-width: 0; }
.pp-links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-links a:hover { border-color: var(--primary); color: var(--primary-text); }
.pp-share { margin-top: 22px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 12px; color: var(--text-2); border: 1px dashed var(--border); background: transparent; font: inherit; font-size: 14px; cursor: pointer; }
.pp-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-3); }
.pp-foot a { color: var(--primary-text); font-weight: 600; }
@media (max-width: 420px) { .pp-btn { flex: 1 1 100%; justify-content: center; } .pp-links { grid-template-columns: minmax(0, 1fr); } }

/* =================== باركود الصفحة + السوشيال (my-profile.php) =================== */
.qr-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: center; }
.qr-canvas { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 16px 40px -20px rgba(11,20,48,.45); background: #fff; }
.qr-side { display: grid; gap: 12px; }
.qr-side p { margin: 0; }
#qr-print-img { display: none; }
@media print {
  body * { visibility: hidden !important; }
  #qr-print-img { display: block; visibility: visible !important; position: fixed; inset: 0; margin: auto; max-width: 100%; max-height: 100%; }
}
@media (max-width: 640px) { .qr-wrap { grid-template-columns: minmax(0, 1fr); } .qr-canvas { max-width: 300px; justify-self: center; } }
.soc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.soc-field { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); cursor: text; }
.soc-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.soc-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #fff; background: #64748B; }
.soc-facebook { background: #1877F2; } .soc-instagram { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); } .soc-tiktok { background: #111; }
.soc-youtube { background: #FF0000; } .soc-xlogo { background: #000; } .soc-linkedin { background: #0A66C2; } .soc-send { background: #229ED9; } .soc-globe { background: var(--primary); }
.soc-in { display: grid; flex: 1; min-width: 0; }
.soc-in small { font-size: 12px; color: var(--text-3); font-weight: 600; }
.soc-in input, .form .soc-in input { border: 0 !important; outline: 0; box-shadow: none !important; min-height: 0; border-radius: 0; background: transparent !important; color: var(--text); font: inherit; font-size: 15px; padding: 2px 0; width: 100%; text-align: left; }
@media (max-width: 640px) { .soc-grid { grid-template-columns: minmax(0, 1fr); } }

/* أيقونات السوشيال في الصفحة العامة بألوان المنصات */
.pp-links a .ic { flex: none; }
.pp-links a[href*="facebook."] .ic { color: #1877F2; } .pp-links a[href*="instagram."] .ic { color: #DD2A7B; }
.pp-links a[href*="youtube."] .ic, .pp-links a[href*="youtu.be"] .ic { color: #FF0000; } .pp-links a[href*="linkedin."] .ic { color: #0A66C2; }
.pp-links a[href*="t.me"] .ic, .pp-links a[href*="telegram."] .ic { color: #229ED9; }

/* زرار تشغيل/إيقاف الموديل (الأدمن) */
.model-switch { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.model-switch i { position: relative; width: 36px; height: 20px; border-radius: 99px; background: #CBD5E1; transition: background .15s; flex: none; }
.model-switch i::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.model-switch.is-on { border-color: #10B981; color: #047857; }
.model-switch.is-on i { background: #10B981; }
.model-switch.is-on i::after { inset-inline-start: 18px; }
.badge-off { background: var(--danger-soft); color: var(--danger); }
.model-acts:not(:has(button)) { display: none; }

/* =================== صفحات الهبوط: الشات بوت والصفحة الشخصية + «لفترة محدودة» =================== */
.lp-limited { display: inline-block; font-style: normal; font-size: .78em; font-weight: 700; line-height: 1.4; color: #fff; background: #E11D48; border-radius: 99px; padding: 2px 10px; vertical-align: middle; white-space: nowrap; }
.lp-hero-offer { margin: 14px 0 0; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-plan-price .lp-limited { margin-inline-start: 10px; font-size: 14px; align-self: center; }
.lp-sticky .lp-limited { font-size: 11.5px; margin-inline-start: 6px; background: #FACC15; color: #0B1440; }
.lp-eyebrow-new { display: inline-block; background: #FACC15 !important; color: #0B1440 !important; padding: 5px 14px; border-radius: 99px; font-weight: 700; }
.lp-spot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 980px; margin: 0 auto; }
.lp-spot-card { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; align-items: center; padding: 26px; border-radius: 24px; background: var(--surface); border: 2px solid color-mix(in srgb, var(--pc) 40%, var(--border)); box-shadow: var(--sh-2); }
.lp-spot-copy { display: grid; gap: 10px; align-content: start; }
.lp-spot-copy .lp-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--pc); color: #fff; }
.lp-spot-copy h3 { font-size: 21px; }
.lp-spot-copy p { margin: 0; color: var(--text-2); line-height: 1.8; }
.lp-spot-copy ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.lp-spot-copy li { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; line-height: 1.6; }
.lp-spot-copy li .ic { color: var(--pc); flex: none; margin-top: 4px; }
/* موبايل الشات */
.lp-phone { border-radius: 26px; background: #0B1430; padding: 10px; box-shadow: 0 24px 48px -20px rgba(11,20,48,.6); }
.lp-phone-top { display: flex; align-items: center; gap: 9px; padding: 6px 6px 10px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); }
.lp-phone-av, .lp-prof-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: #fff; font-weight: 700; flex: none; }
.lp-phone-top strong { display: block; font-size: 13.5px; }
.lp-phone-top small { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #A5B4FC; }
.lp-phone-top small i { width: 7px; height: 7px; border-radius: 50%; background: #10B981; }
.lp-phone-msgs { display: flex; flex-direction: column; gap: 7px; padding: 10px 4px 4px; }
.lp-phone-msgs p { margin: 0; max-width: 88%; padding: 8px 11px; border-radius: 14px; font-size: 12.5px; line-height: 1.6; }
.lp-phone-msgs .me { align-self: flex-start; background: var(--pc); color: #fff; border-end-start-radius: 4px; }
.lp-phone-msgs .ai { align-self: flex-end; background: #fff; color: #0B1440; border-end-end-radius: 4px; }
/* كارت الصفحة الشخصية */
.lp-prof { position: relative; display: grid; justify-items: center; gap: 4px; padding: 0 12px 14px; border-radius: 22px; background: #fff; color: #0B1440; border: 1px solid #E5E7EB; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(11,20,48,.5); text-align: center; }
.lp-prof-cover { width: calc(100% + 24px); height: 62px; background: linear-gradient(135deg, #0B1430, #1B2CD8 70%, var(--pc)); }
.lp-prof-av { width: 58px; height: 58px; margin-top: -30px; border: 4px solid #fff; font-size: 22px; }
.lp-prof strong { font-size: 15px; }
.lp-prof > small { font-size: 12px; color: #5b6390; }
.lp-prof-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 6px; }
.lp-prof-btns span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 9px; font-size: 11.5px; font-weight: 600; background: #F1F5F9; }
.lp-prof-btns .wa { background: #1FA855; color: #fff; }
.lp-prof-btns .ai { background: #1B2CD8; color: #fff; }
.lp-prof-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; }
.lp-prof-chips span { padding: 3px 9px; border-radius: 99px; font-size: 11px; background: #EEF2FF; color: #1B2CD8; font-weight: 600; }
.lp-prof-qr { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 10px; border-radius: 14px; background: #F8FAFC; border: 1px dashed #CBD5E1; }
.lp-prof-qr small { font-size: 11.5px; line-height: 1.5; color: #334155; font-weight: 600; text-align: start; }
.lp-spot-card:nth-child(2) { grid-template-columns: 300px minmax(0, 1fr); }
.lp-spot-card:nth-child(2) .lp-spot-copy { order: 2; }
.lp-spot-copy h3 { font-size: 24px; }
.lp-phone-msgs p { font-size: 13.5px; }
@media (max-width: 760px) { .lp-spot-card, .lp-spot-card:nth-child(2) { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 20px; } .lp-spot-card:nth-child(2) .lp-spot-copy { order: 0; } .lp-phone, .lp-prof { max-width: 320px; width: 100%; justify-self: center; } }

/* كارت الاشتراك في صفحات الهبوط: عرضي (السعر والمميزات | الدفع) */
.lp-plan { max-width: 1040px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; align-items: stretch; }
.lp-plan-info { display: grid; gap: 14px; align-content: start; padding: 36px; background: linear-gradient(160deg, color-mix(in srgb, var(--pc) 10%, var(--surface)), var(--surface) 70%); border-inline-end: 1px solid var(--border); }
.lp-plan-pay { display: grid; gap: 14px; align-content: center; padding: 36px; }
.lp-plan-name { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 6px 14px; border-radius: 99px; background: color-mix(in srgb, var(--pc) 14%, transparent); color: var(--pc); font-weight: 700; font-size: 14px; }
.lp-plan-info .lp-plan-price { text-align: start; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.lp-plan-month { margin: -6px 0 4px; color: var(--text-2); font-size: 14.5px; }
.lp-plan-info ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.lp-plan-info li { font-size: 14.5px; line-height: 1.6; }
.lp-instapay { display: grid; gap: 10px; }
.lp-instapay-or { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; color: var(--text-3); font-size: 13px; }
.lp-instapay-or::before, .lp-instapay-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.lp-instapay-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 12px; background: var(--bg-soft); }
.lp-instapay-row b { font-size: 13px; color: var(--text-2); flex: none; }
.lp-instapay-row code { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; text-align: start; }
.lp-instapay-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ip-open { margin-top: 10px; }
@media (max-width: 860px) {
  .lp-plan { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .lp-plan-info { border-inline-end: 0; border-bottom: 1px solid var(--border); padding: 26px 22px; }
  .lp-plan-pay { padding: 24px 22px 26px; }
  .lp-plan-info ul { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) { .lp-instapay-row code { font-size: 13.5px; } }

/* الأدمن: مسح حساب */
.danger-zone { margin-top: 22px; padding: 12px 14px; border: 1.5px dashed color-mix(in srgb, var(--danger) 45%, var(--border)); border-radius: 14px; background: var(--danger-soft); }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 700; display: flex; align-items: center; gap: 6px; list-style: none; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone form { margin-top: 12px; display: grid; gap: 6px; }
.danger-zone input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }

/* الأدمن: اختيار مستخدمين ومسحهم */
.sel-col { width: 44px; text-align: center !important; }
.sel-col input { width: 18px; height: 18px; accent-color: var(--danger); cursor: pointer; }
.table tr.is-selected td { background: var(--danger-soft); }
.bulk-del { margin: 0; }
.bulk-del[hidden] { display: none; }

/* =================== الأسئلة الشائعة (الرئيسية) =================== */
.qa { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: start; }
.qa-side { position: sticky; top: 96px; display: grid; gap: 16px; }
.qa-kicker { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: 14px; }
.qa-side h2 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.25; }
.qa-side p { margin: 0; color: var(--text-2); line-height: 1.9; }
.qa-wa { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.qa-wa:hover { border-color: #1FA855; transform: translateY(-2px); text-decoration: none; }
.qa-wa-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #1FA855; color: #fff; flex: none; }
.qa-wa > span:nth-child(2) { flex: 1; display: grid; }
.qa-wa small { color: var(--text-3); font-size: 13px; }
.qa-wa > .ic { color: var(--text-3); }
.qa-list { border-top: 1px solid var(--border); }
.qa-item { border-bottom: 1px solid var(--border); }
.qa-item summary { list-style: none; display: grid; grid-template-columns: 52px minmax(0, 1fr) 32px; align-items: center; gap: 14px; padding: 22px 4px; cursor: pointer; }
.qa-item summary::-webkit-details-marker { display: none; }
.qa-n { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--border-2, #CBD5E1); font-variant-numeric: tabular-nums; transition: color .2s; }
.qa-q { font-weight: 600; font-size: 17px; line-height: 1.6; transition: color .2s; }
.qa-x { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--border); transition: background .2s, border-color .2s, transform .25s; }
.qa-x::before, .qa-x::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; border-radius: 2px; background: var(--text-2); transform: translate(-50%, -50%); transition: background .2s; }
.qa-x::after { transform: translate(-50%, -50%) rotate(90deg); }
.qa-item summary:hover .qa-q { color: var(--primary-text); }
.qa-item[open] .qa-n { color: var(--primary); }
.qa-item[open] .qa-x { background: var(--primary); border-color: var(--primary); transform: rotate(45deg); }
.qa-item[open] .qa-x::before, .qa-item[open] .qa-x::after { background: #fff; }
.qa-a { display: flex; gap: 10px; align-items: flex-start; padding: 0 4px 24px 46px; padding-inline-start: 66px; }
.qa-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); }
.qa-a p { margin: 0; padding: 12px 16px; border-radius: 18px; border-start-start-radius: 6px; background: var(--primary-soft); color: var(--text); line-height: 1.9; font-size: 15.5px; }
.qa-item[open] .qa-a { animation: qa-in .3s ease; }
@keyframes qa-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .qa { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .qa-side { position: static; }
  .qa-item summary { grid-template-columns: 38px minmax(0, 1fr) 30px; gap: 10px; padding: 18px 0; }
  .qa-n { font-size: 20px; }
  .qa-q { font-size: 15.5px; }
  .qa-a { padding: 0 0 20px; padding-inline-start: 0; }
}

/* =================== الفوتر (تدرّج ألوان) =================== */
.footer.ft { position: relative; overflow: hidden; margin-top: 96px; padding-top: 0; border-top: 0; color: #fff;
  background: radial-gradient(900px 420px at 85% 0%, rgba(59,130,246,.35), transparent 70%),
              radial-gradient(700px 380px at 5% 100%, rgba(27,44,216,.45), transparent 70%),
              linear-gradient(180deg, #0B1440 0%, #070D2B 100%); }
.ft-glow { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(circle at 50% 0%, #000, transparent 70%); }
.footer.ft .container { position: relative; }
.ft-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 56px; padding: 32px 36px; border-radius: 28px;
  background: linear-gradient(120deg, #1B2CD8 0%, #2F6BFF 55%, #22B8F0 100%); box-shadow: 0 30px 60px -28px rgba(30,90,255,.8), inset 0 1px 0 rgba(255,255,255,.25); }
.ft-cta h2 { font-size: clamp(24px, 2.6vw, 32px); color: #fff; }
.ft-cta p { margin: 6px 0 0; color: #DBEAFE; }
.ft-cta-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.ft-cta .btn-white { background: #fff; color: #1B2CD8; border-color: #fff; font-weight: 700; }
.ft-btn-wa { background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.ft-btn-wa:hover { background: #1FA855; border-color: #1FA855; color: #fff; }
.ft-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.6fr 1fr; gap: 40px; margin-top: 56px; }
.ft-brand .brand, .ft-brand .brand-name { color: #fff; }
.ft-brand p { color: #B4C0E6; font-size: 15px; line-height: 1.9; margin: 14px 0 18px; max-width: 330px; }
.ft-badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ft-badges li { display: inline-flex; align-items: center; gap: 8px; color: #DCE4FF; font-size: 14px; }
.ft-badges .ic { color: #5EA8FF; }
.footer.ft h3 { position: relative; color: #fff; font-size: 15px; margin-bottom: 18px; padding-bottom: 10px; }
.footer.ft h3::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 28px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #22B8F0, #2F6BFF); }
.footer.ft ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer.ft ul a { color: #B4C0E6; font-size: 14.5px; text-decoration: none; transition: color .15s, padding .15s; }
.footer.ft ul a:hover { color: #fff; padding-inline-start: 4px; }
.ft-two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.footer.ft .ft-more { color: #5EA8FF; font-weight: 600; }
.ft-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-block: 22px; border-top: 1px solid rgba(255,255,255,.1); color: #8E9BC4; font-size: 13.5px; }
.ft-bottom b { color: #DCE4FF; }
@media (max-width: 960px) { .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ft-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .footer.ft { margin-top: 64px; }
  .ft-cta { margin-top: 40px; padding: 24px 20px; border-radius: 22px; }
  .ft-cta-acts, .ft-cta-acts .btn { width: 100%; justify-content: center; }
  .ft-grid { gap: 30px; margin-top: 40px; }
  .ft-col-wide { grid-column: 1 / -1; }
}

/* =================== إدارة مكتب المحاماة (office.php) =================== */
.ob { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ob-blue { background: #DBEAFE; color: #1D4ED8; } .ob-green { background: #DCFCE7; color: #15803D; } .ob-red { background: #FEE2E2; color: #B91C1C; }
.ob-amber { background: #FEF3C7; color: #B45309; } .ob-orange { background: #FFEDD5; color: #C2410C; } .ob-purple { background: #EDE9FE; color: #6D28D9; }
.ob-teal { background: #CCFBF1; color: #0F766E; } .ob-gray { background: #EEF0F4; color: #4B5563; }
.of-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.of-bar > p { margin: 0; }
.of-filters { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; align-items: center; }
.of-filters .search-box { min-width: 240px; }
.of-filters select, .of-table select { height: 42px; border-radius: var(--r); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); padding-inline: 12px; font: inherit; }
.of-form { margin-bottom: 18px; border: 2px solid var(--primary-soft); }
.of-form .form-row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.of-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.of-table { padding: 0; overflow: hidden; }
.of-table td { vertical-align: middle; }
.of-num { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.of-num a { color: var(--primary-text); }
.of-strong { font-weight: 700; color: var(--text); }
.of-sub { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.of-row-acts { white-space: nowrap; text-align: left !important; }
.of-row-acts > * { vertical-align: middle; }
form.inline { display: inline-flex; margin: 0; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.of-empty { text-align: center; color: var(--text-3); padding: 26px 12px; display: grid; justify-items: center; gap: 8px; }
td.of-empty { display: table-cell; padding: 26px 12px !important; }
.of-green { color: var(--success); font-weight: 600; } .of-amber { color: #B45309; font-weight: 600; }
.of-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-block: 18px; }
.of-grid .cs-card { margin: 0; }
.of-alert { margin-top: 18px; }
.of-more { margin-inline-start: auto; font-size: 14px; font-weight: 600; align-self: center; }
.of-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.of-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--bg-soft); }
.of-date { flex: none; width: 64px; display: grid; justify-items: center; padding: 6px 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.of-date b { font-size: 13.5px; } .of-date small { font-size: 12px; color: var(--text-3); }
.of-main { flex: 1; min-width: 0; display: grid; }
.of-main a, .of-main b { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-main small { font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
.of-wa { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 6px 11px; border-radius: 10px; background: #1FA855; color: #fff !important; font-size: 13px; font-weight: 600; text-decoration: none !important; }
.of-wa:hover { background: #178C46; }
.of-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.of-bars li { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 14.5px; }
.of-bars b { color: var(--text-2); }
.of-bars i { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.of-bars em { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #3B82F6); }
.of-quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.of-quick-grid a { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14px; text-align: center; text-decoration: none; transition: border-color .15s, transform .15s; }
.of-quick-grid a .ic { color: var(--primary-text); }
.of-quick-grid a:hover { border-color: var(--primary); transform: translateY(-2px); }
.of-crumb { margin-bottom: 12px; }
.of-case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.of-case-head h2 { font-size: 24px; margin: 4px 0 10px; }
.of-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.of-dl { display: grid; margin: 0; }
.of-dl div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.of-dl dt { color: var(--text-3); font-size: 14px; } .of-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.of-details { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--bg-soft); line-height: 1.9; font-size: 14.5px; max-height: 260px; overflow: auto; }
.of-ai { background: linear-gradient(160deg, var(--primary-soft), var(--surface) 70%); }
.of-ai-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.of-ai-btns a { display: flex; align-items: center; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--border); color: var(--text); font-weight: 700; text-decoration: none; transition: border-color .15s; }
.of-ai-btns a .ic { color: var(--primary-text); flex: none; }
.of-ai-btns a:hover { border-color: var(--primary); }
.of-add { margin-bottom: 14px; border: 1px dashed var(--border-2); border-radius: 14px; padding: 10px 14px; }
.of-add > summary { cursor: pointer; font-weight: 700; color: var(--primary-text); display: flex; align-items: center; gap: 6px; list-style: none; }
.of-add > summary::-webkit-details-marker { display: none; }
.of-add[open] > summary { margin-bottom: 12px; }
.of-add-sm { margin: 10px 0 0; padding: 8px 12px; font-size: 14px; }
.of-sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.of-sessions > li { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.of-sessions > li.st-done, .of-sessions > li.st-cancelled { background: var(--bg-soft); }
.of-s-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.of-decision { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--bg-soft); font-size: 14px; }
.of-upload { margin-bottom: 14px; }
.of-upload.is-busy { opacity: .6; pointer-events: none; }
.of-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.of-card { display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.of-card.is-past { opacity: .75; }
.of-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.of-card-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.of-card h3 { font-size: 17px; }
.of-card p { margin: 0; color: var(--text-2); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.of-card-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.of-stats3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.of-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.of-msgs > li { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.of-msgs > li.is-new { border-color: #86EFAC; box-shadow: 0 0 0 3px #DCFCE7; }
.of-msg-head { display: flex; gap: 10px; align-items: center; }
.of-msg-head > div { flex: 1; display: grid; } .of-msg-head small { color: var(--text-3); font-size: 12.5px; }
.of-msgs p { margin: 10px 0 0; line-height: 1.9; overflow-wrap: anywhere; }
@media (max-width: 960px) { .of-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .of-stats3 { grid-template-columns: minmax(0, 1fr); }
  .of-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .of-ai-btns { grid-template-columns: minmax(0, 1fr); }
  .of-dl div { grid-template-columns: 1fr; gap: 2px; }
  .of-list li { flex-wrap: wrap; }
  .of-filters .search-box { min-width: 0; flex-basis: 100%; max-width: none; }
}

/* الفاتورة للطباعة */
.inv-print { background: #EEF2F7; margin: 0; padding: 24px 12px; color: #0B1440; }
.inv-tools { max-width: 760px; margin: 0 auto 14px; display: flex; gap: 10px; }
.inv-paper { max-width: 760px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 40px; box-shadow: 0 20px 50px -30px rgba(11,20,48,.4); }
.inv-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 3px solid #1B2CD8; }
.inv-head h1 { font-size: 26px; } .inv-head p { margin: 2px 0 0; color: #475569; font-size: 14px; }
.inv-meta { text-align: left; } .inv-meta h2 { font-size: 30px; color: #1B2CD8; }
.inv-meta p { margin: 2px 0 0; color: #475569; font-size: 14px; }
.inv-to { display: grid; gap: 3px; margin: 22px 0; padding: 14px 16px; border-radius: 12px; background: #F1F5FF; }
.inv-to small { color: #64748B; } .inv-to strong { font-size: 18px; } .inv-to span { color: #334155; font-size: 14px; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th, .inv-table td { padding: 12px 10px; text-align: right; border-bottom: 1px solid #E2E8F0; }
.inv-table th:last-child, .inv-table td:last-child { text-align: left; white-space: nowrap; }
.inv-table thead th { background: #0B1440; color: #fff; font-weight: 600; }
.inv-table tfoot td { font-weight: 700; }
.inv-rest td { color: #B91C1C; font-size: 18px; }
.inv-h3 { margin: 24px 0 8px; font-size: 16px; }
.inv-pays { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.inv-pays li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: #F8FAFC; font-size: 14px; }
.inv-notes { margin: 20px 0 0; color: #475569; font-size: 14px; line-height: 1.8; }
.inv-foot { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; padding-top: 16px; border-top: 1px dashed #CBD5E1; color: #475569; font-size: 14px; }
@media print { .inv-print { background: #fff; padding: 0; } .inv-tools { display: none; } .inv-paper { box-shadow: none; border-radius: 0; padding: 10mm; max-width: none; } }
@media (max-width: 560px) { .inv-paper { padding: 22px 16px; } .inv-head { flex-direction: column; } .inv-meta { text-align: right; } }

/* فورم «تواصل معايا» في الصفحة الشخصية */
.pp-form { display: grid; gap: 10px; }
.pp-form input, .pp-form textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.pp-form input:focus, .pp-form textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.pp-form .pp-btn { justify-content: center; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.pp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.pp-ok { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px; border-radius: 12px; background: #DCFCE7; color: #15803D; font-weight: 600; }
.pp-err { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 600; }
@media (max-width: 420px) { .pp-two { grid-template-columns: 1fr; } }

/* باقة المحامي الاحترافية في صفحة الأسعار */
.plans-duo { gap: 26px; }
.plan-law { border: 2px solid #B45309; background: linear-gradient(160deg, #FFF8EB, var(--surface) 55%); box-shadow: 0 20px 50px -24px rgba(180,83,9,.45); scroll-margin-top: 90px; }
.plan-badge-law { display: inline-flex; align-items: center; gap: 6px; background: #B45309 !important; color: #fff !important; }
.law-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.law-price { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--border); }
.law-price.is-best { border-color: #B45309; }
.law-price small { color: var(--text-3); font-weight: 600; font-size: 13px; }
.law-price small b { color: #fff; background: #15803D; border-radius: 99px; padding: 1px 8px; font-size: 11.5px; margin-inline-start: 4px; }
.law-price strong { font-family: var(--font-head); font-size: 34px; color: #B45309; line-height: 1.1; }
.law-price span { font-size: 12.5px; color: var(--text-2); }
.law-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-law .btn-primary { background: #B45309; border-color: #B45309; }
.plan-law .btn-outline { color: #B45309; border-color: #E7B87A; }
.plan-law .plan-feat .ic { color: #B45309; }
[data-theme="dark"] .plan-law { background: linear-gradient(160deg, rgba(180,83,9,.16), var(--surface) 55%); }
@media (max-width: 420px) { .law-prices, .law-btns { grid-template-columns: 1fr; } }
.bulk-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: var(--danger-soft); }
.bulk-pay[hidden] { display: none; }
.bulk-pay .rad-check { font-size: 13.5px; }

/* =================== العيادة (clinic.php) =================== */
.c-acts { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.c-acts form.inline { display: inline-flex; }
.of-list li .c-acts { margin-inline-start: auto; }
.c-pending { border: 2px solid #FCD34D; margin-bottom: 18px; }
.c-dim td { opacity: .55; }
.c-allergy { color: #B91C1C !important; font-weight: 600; }
.c-daynav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-daynav input[type=date] { height: 40px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); padding: 0 10px; font: inherit; }
.ic.flip { transform: scaleX(-1); }
.c-visits { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.c-visits > li { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.c-visit-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.c-visit-head small { color: var(--text-3); }
.c-visit-head .c-acts { margin-inline-start: auto; }
.c-visit { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; margin: 0; }
.c-visit div { padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); }
.c-visit dt { font-size: 12.5px; color: var(--text-3); font-weight: 600; } .c-visit dd { margin: 2px 0 0; line-height: 1.7; overflow-wrap: anywhere; }
.c-days { display: grid; gap: 8px; }
.c-day { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: var(--bg-soft); }
.c-day .rad-check { min-width: 110px; font-weight: 600; }
.c-day input[type=time] { height: 38px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); padding: 0 8px; font: inherit; }
/* الحجز في الصفحة العامة */
.pp-btn.book { background: #0891B2; color: #fff; border-color: transparent; }
.pp-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: thin; }
.pp-days a { flex: none; display: grid; justify-items: center; min-width: 74px; padding: 9px 10px; border-radius: 14px; border: 1.5px solid var(--border); color: var(--text); text-decoration: none; background: var(--surface); }
.pp-days a b { font-size: 14px; } .pp-days a small { font-size: 12px; color: var(--text-3); }
.pp-days a.is-on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.pp-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.pp-slots label { cursor: pointer; }
.pp-slots input { position: absolute; opacity: 0; pointer-events: none; }
.pp-slots span { display: block; text-align: center; padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--border); font-weight: 600; font-size: 14px; }
.pp-slots input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pp-slots input:focus-visible + span { box-shadow: 0 0 0 4px var(--primary-soft); }
.plan-doc { border-color: #0891B2; background: linear-gradient(160deg, #ECFEFF, var(--surface) 55%); box-shadow: 0 20px 50px -24px rgba(8,145,178,.45); }
.plan-doc .plan-badge-law { background: #0891B2 !important; }
.plan-doc .law-price.is-best { border-color: #0891B2; } .plan-doc .law-price strong { color: #0E7490; }
.plan-doc .btn-primary { background: #0891B2; border-color: #0891B2; } .plan-doc .btn-outline { color: #0E7490; border-color: #7DD3E6; }
.plan-doc .plan-feat .ic { color: #0891B2; }
[data-theme="dark"] .plan-doc { background: linear-gradient(160deg, rgba(8,145,178,.16), var(--surface) 55%); }
.ip-cell code { font-size: 12.5px; }
.ip-cell small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 3px; }
.ip-line { display: block; margin-top: 4px; }
.ip-line code { font-size: 12.5px; }

/* ربط الواتساب (فوق السوشيال ميديا) */
.wa-link-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; border-radius: 16px; border: 2px solid #1FA855; background: linear-gradient(135deg, rgba(31,168,85,.12), transparent 70%); }
.wa-link-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #1FA855; color: #fff; flex: none; }
.wa-link-in { flex: 1; min-width: 0; display: grid; gap: 6px; }
.wa-link-in label { display: grid; gap: 2px; } .wa-link-in label b { font-size: 16px; } .wa-link-in label small { color: var(--text-2); font-size: 13px; }
.wa-link-in input, .form .wa-link-in input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; text-align: left; }
.wa-link-test { flex: none; color: #15803D; font-weight: 700; font-size: 14px; }
.pp-wa-big { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; padding: 15px 18px; border-radius: 16px; background: #1FA855; color: #fff !important; text-decoration: none !important; box-shadow: 0 14px 30px -14px rgba(31,168,85,.8); transition: transform .15s; }
.pp-wa-big:hover { transform: translateY(-2px); background: #1A9A4D; }
.pp-wa-big span { display: grid; text-align: start; } .pp-wa-big b { font-size: 18px; } .pp-wa-big small { font-size: 13.5px; opacity: .9; }
@media (max-width: 480px) { .wa-link-card { flex-wrap: wrap; } .wa-link-test { width: 100%; text-align: center; } }
.wlog { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wlog li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: var(--bg-soft); font-size: 13.5px; }
.wlog li.good b { color: var(--success); } .wlog li.bad { background: var(--danger-soft); } .wlog li.bad b { color: var(--danger); }
.wlog small { color: var(--text-3); margin-inline-start: auto; }

/* الشات بوت: كتابة المعلومات يدوي + تعديلها */
.bot-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: var(--text-3); font-size: 14px; }
.bot-or::before, .bot-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.bot-write textarea, .bot-edit textarea { resize: vertical; min-height: 120px; }
.bot-files li { flex-wrap: wrap; }
.bot-edit { flex-basis: 100%; }
.bot-edit summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--primary); font-weight: 600; list-style: none; }
.bot-edit summary::-webkit-details-marker { display: none; }
.bot-edit[open] summary { margin-bottom: 10px; }

/* لوحة التحكم: محرك قراءة الصور */
.ocr-engines { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ocr-eng { position: relative; display: grid; gap: 4px; padding: 14px; border: 2px solid var(--border); border-radius: 14px; cursor: pointer; }
.ocr-eng:has(input:checked), .ocr-eng.is-on { border-color: var(--primary); background: var(--primary-soft); }
.ocr-eng input { position: absolute; opacity: 0; }
.ocr-eng small { color: var(--text-2); }
.ocr-eng .badge { justify-self: start; }

/* باقة المدرس الاحترافية */
.plan-tch { border-color: #0E9F6E; background: linear-gradient(160deg, #ECFDF5, var(--surface) 55%); box-shadow: 0 20px 50px -24px rgba(14,159,110,.45); }
.plan-tch .plan-badge-law { background: #0E9F6E !important; }
.plan-tch .law-price.is-best { border-color: #0E9F6E; } .plan-tch .law-price strong { color: #047857; }
.plan-tch .btn-primary { background: #0E9F6E; border-color: #0E9F6E; } .plan-tch .btn-outline { color: #047857; border-color: #86D9B8; }
.plan-tch .plan-feat .ic { color: #0E9F6E; }
[data-theme="dark"] .plan-tch { background: linear-gradient(160deg, rgba(14,159,110,.16), var(--surface) 55%); }

/* ========== إدارة السنتر (باقة المدرس) ========== */
.ct-att { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.ct-att li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; flex-wrap: wrap; }
.ct-att li:has(.ct-absent input:checked) { border-color: #FCA5A5; background: rgba(239,68,68,.06); }
.ct-att-name { display: grid; } .ct-att-name small { color: var(--text-3); font-size: 12px; }
.ct-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ct-seg label { position: relative; cursor: pointer; }
.ct-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ct-seg span { display: block; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.ct-seg label + label { border-inline-start: 1px solid var(--border); }
.ct-seg .ct-present input:checked + span { background: #16A34A; color: #fff; }
.ct-seg .ct-late input:checked + span { background: #D97706; color: #fff; }
.ct-seg .ct-absent input:checked + span { background: #DC2626; color: #fff; }
.ct-seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
.ct-hist { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-chip { display: inline-grid; justify-items: center; padding: 6px 10px; border-radius: 10px; font-size: 12px; border: 1px solid var(--border); }
.ct-chip b { font-size: 13px; }
.ct-chip.ct-present { background: rgba(22,163,74,.1); color: #15803D; border-color: rgba(22,163,74,.3); }
.ct-chip.ct-late { background: rgba(217,119,6,.1); color: #B45309; border-color: rgba(217,119,6,.3); }
.ct-chip.ct-absent { background: rgba(220,38,38,.1); color: #B91C1C; border-color: rgba(220,38,38,.3); }
.ct-quickpay { display: inline-flex; gap: 6px; align-items: center; }
.ct-quickpay input { width: 90px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.ct-scores input { width: 100%; min-width: 80px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.ct-pay .of-wa { margin-inline-start: 8px; }
.ct-sheet-table th, .ct-sheet-table td { text-align: center; padding: 6px 4px; font-size: 13px; }
.ct-sheet-table td:nth-child(2), .ct-sheet-table th:nth-child(2) { text-align: start; }
.ct-mark.ct-present { color: #15803D; font-weight: 700; } .ct-mark.ct-absent { color: #B91C1C; font-weight: 700; } .ct-mark.ct-late { color: #B45309; }

/* ========== الإحالة / التجديد / إحنا نجهّزهولك ========== */
.renew-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 18px; border-radius: 16px; background: linear-gradient(135deg, #FEF3C7, #FFF7ED); border: 1px solid #FCD34D; color: #78350F; }
.renew-bar > svg { flex: none; color: #D97706; }
.renew-bar span { flex: 1; min-width: 220px; }
[data-theme="dark"] .renew-bar { background: rgba(217,119,6,.14); border-color: rgba(217,119,6,.4); color: #FDE68A; }
.ref-hero { display: flex; gap: 20px; align-items: flex-start; background: linear-gradient(135deg, var(--primary-soft), var(--surface) 70%); }
.ref-hero-ic { flex: none; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, #16A34A, #0E9F6E); color: #fff; box-shadow: 0 14px 30px -14px rgba(22,163,74,.7); }
.setup-hero .ref-hero-ic { background: linear-gradient(135deg, #7C3AED, #1B2CD8); box-shadow: 0 14px 30px -14px rgba(124,58,237,.7); }
.ref-hero-main { flex: 1; min-width: 0; display: grid; gap: 10px; }
.ref-hero-main h2 { font-size: 22px; line-height: 1.5; }
.ref-hero-main h2 span { color: var(--success, #16A34A); }
.setup-hero .ref-hero-main h2 span { color: var(--primary); }
.ref-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 10px; line-height: 1.7; }
.setup-price { display: flex; align-items: baseline; gap: 8px; } .setup-price strong { font-size: 34px; font-weight: 800; color: var(--primary); }
.setup-pay { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--bg-soft); border: 1px dashed var(--border); margin-top: 12px; }
@media (max-width: 640px) { .ref-hero { flex-direction: column; } .ref-hero-main h2 { font-size: 19px; } }
.growth-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.growth-box { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-soft); }

/* =========================================================
   الإنجليزي (LTR): أغلب التصميم بخصائص منطقية (inline-start/end)
   فبيتقلب لوحده، وده تظبيط الحاجات اللي اتجاهها مكتوب صريح.
   ========================================================= */
[dir="ltr"] body { letter-spacing: 0; }
[dir="ltr"] .ic-dir { transform: scaleX(-1); }
[dir="ltr"] .ic-dir.flip,
[dir="ltr"] .ic.flip:not(.ic-dir) { transform: none; }
[dir="ltr"] .composer .send .ic,
[dir="ltr"] .phone-input i .ic,
[dir="ltr"] .tplx-send .ic,
[dir="ltr"] .botp-send .ic { transform: none; }
[dir="ltr"] .form select { background-position: right 14px center; }
[dir="ltr"] .dist-row b,
[dir="ltr"] .of-row-acts { text-align: right !important; }
[dir="ltr"] .rad-fields textarea:placeholder-shown { direction: ltr; text-align: left; }
[dir="ltr"] .tplx-tab[aria-selected="true"] { transform: translateX(4px); }
[dir="ltr"] .inv-meta { text-align: right; }
[dir="ltr"] .inv-table th, [dir="ltr"] .inv-table td { text-align: left; }
[dir="ltr"] .inv-table th:last-child, [dir="ltr"] .inv-table td:last-child { text-align: right; }
@media (max-width: 560px) { [dir="ltr"] .inv-meta { text-align: left; } }
@media (max-width: 900px) { [dir="ltr"] .side { transform: translateX(-100%); } [dir="ltr"] .side.is-open { transform: none; } }
@media (max-width: 960px) {
  [dir="ltr"] .shell-side,
  [dir="ltr"] .cs-side { transform: translateX(-100%); }
  [dir="ltr"] .shell-side.is-open,
  [dir="ltr"] .cs-side.is-open { transform: none; }
}
@media (max-width: 980px) {
  [dir="ltr"] .tplx-tabs { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%); }
  [dir="ltr"] .tplx-tabs-wrap.at-start .tplx-tabs { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent 100%); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent 100%); }
  [dir="ltr"] .tplx-tabs-wrap.at-end .tplx-tabs { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 36px); mask-image: linear-gradient(to right, transparent 0, #000 36px); }
  [dir="ltr"] .tplx-arrow.prev { right: auto; left: -2px; }
  [dir="ltr"] .tplx-arrow.next { left: auto; right: -2px; }
  [dir="ltr"] .tplx-arrow.prev .ic { transform: none; }
}
/* زرار اللغة */
.lang-toggle { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: .02em; text-decoration: none; display: inline-grid; place-items: center; }
.lang-toggle:lang(ar) { font-size: 16px; }
.auth-top-act { display: inline-flex; align-items: center; gap: 8px; }

/* =========================================================
   امتحانات أونلاين (السنتر + صفحة الطالب)
   ========================================================= */
.cx-ai summary .new { margin-inline-start: 6px; }
.cx-nums .field { min-width: 0; }
.cx-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.cx-file input[type=file] { max-width: 100%; font-size: 14px; }
.cx-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.cx-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 20px; margin: 0; }
.cx-head p { margin: 6px 0 0; }
.cx-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cx-score { text-align: center; padding: 10px 18px; border-radius: 16px; background: var(--primary-soft); color: var(--primary-text); }
.cx-score strong { display: block; font-size: 30px; line-height: 1.1; }
.cx-score span { font-size: 13px; }
.cx-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cx-link-row code { flex: 1 1 260px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); font-size: 14px; overflow-wrap: anywhere; }
.cx-editor > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.cx-editor > summary::-webkit-details-marker { display: none; }
.cx-editor[open] > summary { margin-bottom: 14px; }
.cx-q { margin-top: 12px; }
.cx-q-edit { padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2, var(--bg-soft)); display: grid; gap: 10px; }
.cx-q-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cx-n { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding-inline: 6px; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; }
.cx-pts { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.cx-pts input { width: 70px !important; text-align: center; padding: 6px 8px !important; min-height: 0 !important; }
.cx-del { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--danger); }
.cx-qt { margin: 10px 0; font-weight: 600; line-height: 1.8; }
.cx-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cx-opts li { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); }
.cx-opts li.is-right { border-color: #16A34A; background: #DCFCE7; color: #14532D; }
.cx-opts li.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.cx-opts em { font-style: normal; font-size: 13px; font-weight: 600; }
.cx-ans, .cx-model { padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); margin-top: 8px; }
.cx-model { background: #DCFCE7; color: #14532D; }
.cx-ans small, .cx-model small { font-size: 12px; opacity: .75; font-weight: 600; }
.cx-ans p, .cx-model p { margin: 4px 0 0; line-height: 1.8; overflow-wrap: anywhere; }
.cx-fb { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); font-size: 14px; line-height: 1.7; }
.cx-fb .ic { flex: none; margin-top: 4px; }

.cx-quiz .pp-av span { display: grid; place-items: center; width: 100%; height: 100%; }
.cx-facts { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cx-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-size: 14px; font-weight: 600; }
.cx-lbl { font-weight: 600; font-size: 14px; color: var(--text-2); }
.pp-form select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.cx-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; background: var(--surface); }
.cx-timer { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-variant-numeric: tabular-nums; direction: ltr; }
.cx-timer.is-low { background: var(--danger-soft); color: var(--danger); }
.cx-paper { display: grid; gap: 14px; }
.cx-item { margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 16px; display: grid; gap: 8px; min-width: 0; }
.cx-item legend { padding: 0; font-weight: 600; line-height: 1.8; float: left; width: 100%; margin-bottom: 4px; }
.cx-item legend + * { clear: both; }
.cx-p { color: var(--text-3); font-weight: 400; }
.cx-opt { display: block; cursor: pointer; }
.cx-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cx-opt > span { display: block; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--border); line-height: 1.7; }
.cx-opt > span b { color: var(--primary-text); margin-inline-end: 4px; }
.cx-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.cx-opt input:focus-visible + span { box-shadow: 0 0 0 4px var(--primary-soft); }
.cx-item textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; line-height: 1.8; resize: vertical; }
.cx-submit { justify-content: center; width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 14px; }
.cx-done { text-align: center; }
.cx-done .pp-ok { justify-content: center; }
/* القائمة الجانبية المقفولة على الموبايل: من غير ظل يبان على طرف الشاشة */
@media (max-width: 960px) {
  .cs-side:not(.is-open), .shell-side:not(.is-open) { box-shadow: none; }
}
@media (max-width: 900px) { .side:not(.is-open) { box-shadow: none; } }
/* نتايج الامتحان الأونلاين على الموبايل: كل طالب كارت صغير */
@media (max-width: 560px) {
  .cx-res-wrap { overflow: visible; border: 0; }
  .cx-res { min-width: 0 !important; }
  .cx-res thead, .cx-res .cx-hide-sm { display: none; }
  .cx-res tbody { display: grid; gap: 10px; }
  .cx-res tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; }
  .cx-res td { padding: 0 !important; border: 0 !important; }
  .cx-res td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .cx-res td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .cx-res td.cx-grade { grid-column: 2; grid-row: 1 / 3; font-size: 17px; }
  .cx-res td.of-row-acts { grid-row: 3; }
  .cx-res td.of-row-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; text-align: start !important; white-space: normal; }
  .cx-res td.of-row-acts:empty { display: none; }
}

/* =========================================================
   إدارة الجيم (باقة الجيم الاحترافية)
   ========================================================= */
.gy-scan { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gy-scan-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); flex: none; }
.gy-scan input { flex: 1 1 200px; min-width: 0; height: 46px; padding-inline: 14px; border-radius: 12px; border: 1.5px solid var(--border-2); background: var(--surface); color: var(--text); font: inherit; font-size: 18px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.gy-scan input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.gy-scan.is-big input { height: 60px; font-size: 24px; }
.gy-scan.is-big .gy-scan-ic { width: 60px; height: 60px; border-radius: 16px; }
.gy-scan.is-big .btn { height: 60px; padding-inline: 22px; }
.gy-last { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.gy-last a { color: inherit; }
.gy-ok { background: #DCFCE7; color: #15803D; }
.gy-warn { background: var(--warn-soft, #FEF3C7); color: var(--warn, #B45309); }
.gy-err { background: var(--danger-soft); color: var(--danger); }
.gy-result { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-width: 2px; }
.gy-result.gy-ok { border-color: #16A34A; } .gy-result.gy-warn { border-color: #F59E0B; } .gy-result.gy-err { border-color: var(--danger); }
.gy-result > div { flex: 1 1 220px; min-width: 0; }
.gy-result h2 { font-size: 24px; margin: 0; } .gy-result h2 a { color: inherit; } .gy-result h2 small { font-size: 15px; opacity: .7; }
.gy-result p { margin: 4px 0 0; font-size: 17px; font-weight: 600; }
.gy-result-ic { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; flex: none; background: currentColor; }
.gy-result-ic .ic { color: #fff; }
.gy-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gy-chips a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.gy-chips a.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.gy-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.gy-av { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), #3B82F6); color: #fff; font-weight: 700; font-size: 22px; flex: none; }
.gy-who { flex: 1 1 240px; min-width: 0; }
.gy-who h2 { font-size: 22px; margin: 0 0 6px; } .gy-who h2 small { font-size: 14px; color: var(--text-3); font-weight: 500; }
.gy-who p { margin: 6px 0 0; }
.gy-due { color: var(--danger); font-weight: 600; }
.gy-firstsub { border: 1px dashed var(--border-2); border-radius: 14px; padding: 12px 14px; margin: 0; display: grid; gap: 10px; }
.gy-firstsub legend { padding: 0 6px; font-weight: 600; }
.gy-inline { margin-top: 12px; }
.gy-cardpage canvas { display: block; width: 100%; max-width: 560px; height: auto; margin: 4px auto 16px; border-radius: 18px; box-shadow: 0 18px 40px rgba(11,20,64,.18); }
@media print {
  body.gy-printing * { visibility: hidden !important; }
  body.gy-printing #gy-card { visibility: visible !important; position: fixed; top: 0; left: 0; width: 86mm !important; max-width: none; box-shadow: none; }
}
/* كارت باقة الجيم في صفحة الأسعار (لون برتقالي رياضي) */
.plan-gym { border-color: #EA580C; background: linear-gradient(160deg, #FFF4EC, var(--surface) 55%); box-shadow: 0 20px 50px -24px rgba(234,88,12,.45); }
.plan-gym .plan-badge-law { background: #EA580C !important; }
.plan-gym .law-price.is-best { border-color: #EA580C; } .plan-gym .law-price strong { color: #C2410C; }
.plan-gym .btn-primary { background: #EA580C; border-color: #EA580C; } .plan-gym .btn-outline { color: #C2410C; border-color: #FDBA8C; }
.plan-gym .plan-feat .ic { color: #EA580C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plan-gym { background: linear-gradient(160deg, rgba(234,88,12,.12), var(--surface) 55%); } }
:root[data-theme="dark"] .plan-gym { background: linear-gradient(160deg, rgba(234,88,12,.12), var(--surface) 55%); }

/* =========================================================
   الموبايل: مفيش أي حاجة تعرّض الصفحة أكتر من الشاشة
   (عنوان طويل أو لينك أو إيميل كان بيوسّع القوايم، والمتصفح يصغّر الصفحة كلها)
   ========================================================= */
.cs-list, .of-list { grid-template-columns: minmax(0, 1fr); }
.cs-list > *, .of-list > *, .of-list li > *, .cs-list a > * { min-width: 0; }
.of-list li { min-width: 0; }
.cs-content { overflow-wrap: break-word; }
.cs-main { overflow-x: clip; }
html, body { max-width: 100%; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }

/* باقة بلس في صفحة الأسعار */
.plan-plus { border: 2px solid #7C3AED; background: linear-gradient(160deg, #F5F0FF, var(--surface) 55%); box-shadow: 0 20px 50px -24px rgba(124,58,237,.45); scroll-margin-top: 90px; }
.plan-badge-plus { display: inline-flex; align-items: center; gap: 6px; background: #7C3AED !important; color: #fff !important; }
.plan-plus .plan-price strong { color: #6D28D9; }
.plan-plus .btn-primary { background: #7C3AED; border-color: #7C3AED; }
.plan-plus .plan-feat .ic { color: #7C3AED; }
[data-theme="dark"] .plan-plus { background: linear-gradient(160deg, rgba(124,58,237,.18), var(--surface) 55%); }
[data-theme="dark"] .plan-plus .plan-price strong { color: #B79CFF; }

/* مهنة الحضانات */
.h-pill.c16 { color: #5CC8FF; } .h-hero .h-pill.c16 .ic { color: #7DD3FC; }
.p-c16, .tplx .p-c16 { --pc: #0284C7; }

/* ---------- إدارة الحضانة ---------- */
.plan-nur { border-color: #DB2777; background: linear-gradient(160deg, #FFF0F7, var(--surface) 55%); box-shadow: 0 20px 50px -24px rgba(219,39,119,.45); }
.plan-nur .plan-badge-law { background: #DB2777 !important; }
.plan-nur .law-price.is-best { border-color: #DB2777; } .plan-nur .law-price strong { color: #BE185D; }
.plan-nur .btn-primary { background: #DB2777; border-color: #DB2777; } .plan-nur .btn-outline { color: #BE185D; border-color: #F9A8D4; }
.plan-nur .plan-feat .ic { color: #DB2777; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plan-nur { background: linear-gradient(160deg, rgba(219,39,119,.12), var(--surface) 55%); } }
:root[data-theme="dark"] .plan-nur { background: linear-gradient(160deg, rgba(219,39,119,.12), var(--surface) 55%); }
.nu-av { background: linear-gradient(135deg, #F472B6, #60A5FA); }
.nu-att { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; }
.nu-att li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); min-width: 0; }
.nu-att .of-main { flex: 1; min-width: 0; }
.nu-seg { display: inline-flex; flex: none; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.nu-seg label { cursor: pointer; }
.nu-seg input { position: absolute; opacity: 0; pointer-events: none; }
.nu-seg span { display: block; padding: 7px 16px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.nu-seg input:checked + span { background: #16A34A; color: #fff; }
.nu-seg .is-a input:checked + span { background: #DC2626; }
.nu-seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
.nu-pay { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nu-pay input { width: 86px; padding: 5px 8px; }
.nu-pay select { padding: 5px 8px; max-width: 120px; }
.nu-gen { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--primary-soft); }
.nu-new { background: color-mix(in srgb, #16A34A 10%, transparent); border-radius: 12px; }
@media (max-width: 700px) {
  .of-list li:has(.nu-pay) { flex-wrap: wrap; }
  .of-list li:has(.nu-pay) .of-main { flex: 1 1 100%; }
  .nu-pay { flex: 1 1 auto; }
  .nu-pay input { flex: 1; min-width: 70px; }
}

/* زرار واتساب في صفحة الخصوصية (مسح الحساب) */
.wa-cta { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 16px 20px; border-radius: 18px; background: linear-gradient(135deg, #25D366, #128C7E); color: #fff; text-decoration: none; box-shadow: 0 12px 28px rgba(18,140,126,.28); transition: transform .15s, box-shadow .15s; }
.wa-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(18,140,126,.36); }
.wa-cta-ic { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.2); }
.wa-cta-tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.wa-cta-tx b { font-size: 17px; font-weight: 800; }
.wa-cta-tx small { font-size: 15px; font-weight: 700; opacity: .92; text-align: start; }
.wa-cta-go { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #128C7E; }

/* إضافة ريلز التوعية في صفحة الأسعار */
.reels-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px 34px; margin-top: 28px; padding: 30px; border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(225,29,46,.07), rgba(255,180,0,.08)); border: 2px solid rgba(225,29,46,.28); }
.reels-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; background: #E11D2E; color: #fff; font-size: 13.5px; font-weight: 800; }
.reels-main h3 { margin-top: 12px; font-size: 26px; }
.reels-main .plan-price { margin-top: 14px; }
.reels-main .btn { margin-top: 16px; }
.reels-side .plan-feat { margin-top: 0; }
.reels-topics { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--border-2); display: grid; gap: 8px; }
.reels-topics b { font-size: 15px; }
.reels-topics span { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 15px; }
.reels-topics span .ic { color: #E11D2E; flex: none; }
.btn-wa { background: #1FA855; color: #fff; border-color: #1FA855; }
.btn-wa:hover { background: #168a45; color: #fff; }
@media (max-width: 760px) { .reels-add { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; } }

/* لوحة التحكم ← باقات الفيديوهات */
.vid-table td { vertical-align: middle; }
.vid-table .price-in { max-width: 170px; }
.vid-seg { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-2); transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.switch input:checked + span { background: #1FA855; }
.switch input:checked + span::after { inset-inline-start: 23px; }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* شحن الرسايل */
.tu-now { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.tu-now > div { display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.tu-now small { color: var(--text-2); font-size: 14px; }
.tu-now strong { font-family: var(--font-head); font-size: 30px; line-height: 1.1; }
.tu-now span { color: var(--text-2); font-size: 14px; }
.tu-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tu-pack { position: relative; display: grid; justify-items: center; gap: 4px; padding: 28px 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 2px solid var(--border); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.tu-pack:hover { border-color: var(--primary); transform: translateY(-2px); }
.tu-pack.is-best { border-color: #1FA855; box-shadow: 0 12px 30px rgba(31,168,85,.15); }
.tu-badge { position: absolute; top: -13px; padding: 4px 14px; border-radius: 999px; background: #1FA855; color: #fff; font-size: 13px; font-weight: 800; }
.tu-n { font-family: var(--font-head); font-size: 40px; font-weight: 800; line-height: 1.1; }
.tu-l { color: var(--text-2); font-size: 15px; }
.tu-p { margin-top: 10px; font-size: 22px; font-weight: 800; color: var(--primary-text); }
.tu-e { color: var(--text-2); font-size: 13px; margin-bottom: 12px; }
.tu-plus { margin-top: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); }
@media (max-width: 560px) { .tu-now { grid-template-columns: minmax(0, 1fr); } }

/* لوحة التحكم ← إعدادات الكارت (كارت الشاشة) */
.gpu-live .cs-sec-head { align-items: center; }
.gpu-name { font-size: 15px; font-weight: 700; color: var(--text-2); margin-inline-start: 6px; }
.gpu-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border-2); margin-inline-start: auto; flex: none; }
.gpu-dot.on { background: #1FA855; box-shadow: 0 0 0 0 rgba(31,168,85,.5); animation: gpuPulse 2s infinite; }
.gpu-dot.off { background: #E11D2E; }
@keyframes gpuPulse { 70% { box-shadow: 0 0 0 10px rgba(31,168,85,0); } 100% { box-shadow: 0 0 0 0 rgba(31,168,85,0); } }
.gpu-grid { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 18px; margin-top: 8px; }
.gpu-gauge { position: relative; display: grid; justify-items: center; align-content: start; padding: 18px 14px 14px; border-radius: var(--r-lg); background: var(--surface-2, var(--surface)); border: 1px solid var(--border); }
.gpu-gauge svg { width: 100%; max-width: 230px; }
.gg-track, .gg-fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.gg-track { stroke: var(--border); }
.gg-fill { stroke: #22B8E6; transition: stroke-dasharray .6s, stroke .3s; }
.gpu-live[data-tone="ok"] .gg-fill { stroke: #1FA855; }
.gpu-live[data-tone="warm"] .gg-fill { stroke: #F59E0B; }
.gpu-live[data-tone="hot"] .gg-fill { stroke: #E11D2E; }
.gpu-live[data-tone="hot"] { border-color: #E11D2E; }
.gpu-live[data-tone="hot"] .gpu-state { color: #E11D2E; font-weight: 700; }
.gg-val { margin-top: -58px; display: flex; align-items: baseline; gap: 2px; direction: ltr; }
.gg-val strong { font-family: var(--font-head); font-size: 46px; font-weight: 800; line-height: 1; }
.gg-val span { font-size: 18px; color: var(--text-2); font-weight: 700; }
.gg-lbl { margin-top: 10px; font-weight: 700; color: var(--text-2); }
.gpu-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gpu-tile { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface-2, var(--surface)); border: 1px solid var(--border); }
.gpu-tile small { color: var(--text-2); font-size: 13.5px; }
.gpu-tile strong { font-size: 20px; direction: ltr; text-align: start; }
.gpu-spark { grid-column: 1 / -1; padding: 12px 16px; border-radius: var(--r-lg); border: 1px solid var(--border); }
.gpu-spark svg { width: 100%; height: 60px; margin-top: 6px; }
.gpu-spark polyline { fill: none; stroke: #F59E0B; stroke-width: 2; vector-effect: non-scaling-stroke; }
.gpu-dl { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.gpu-steps { display: grid; gap: 14px; padding-inline-start: 22px; list-style: decimal; color: var(--text-2); }
.gpu-steps b, .gpu-steps code { color: var(--text); }
@media (max-width: 760px) { .gpu-grid, .gpu-dl { grid-template-columns: minmax(0, 1fr); } .gpu-tiles { grid-template-columns: minmax(0, 1fr); } }
.gpu-err[hidden], .gpu-grid[hidden] { display: none; }

/* مسار التنقل (Breadcrumbs) في الصفحات العامة */
.crumbs { padding-top: 18px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--text-2); }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: '‹'; color: var(--text-3, var(--text-2)); }
[dir="ltr"] .crumbs li + li::before { content: '›'; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--primary-text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }
.lp-body .crumbs { display: none; }

/* ============ المدونة ============ */
.blog-hero { padding-top: 34px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 8px; }
.blog-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(16, 24, 64, .1); border-color: var(--primary); color: var(--text); }
.bc-img { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--primary-soft), var(--surface-2)); overflow: hidden; }
.bc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-ph { display: grid; place-items: center; height: 100%; color: var(--primary-text); }
.bc-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.bc-body h3 { font-size: 19px; line-height: 1.5; }
.bc-body p { color: var(--text-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bc-meta { margin-top: auto; padding-top: 6px; color: var(--text-3); font-size: 13.5px; }
.blog-card.is-big { grid-column: 1 / -1; flex-direction: row; }
.blog-card.is-big .bc-img { flex: 0 0 56%; aspect-ratio: 16 / 10; }
.blog-card.is-big .bc-body { justify-content: center; padding: 30px 34px; }
.blog-card.is-big h3 { font-size: clamp(22px, 2.6vw, 30px); }
.post-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-size: 13px; font-weight: 700; text-decoration: none; }
.blog-pages { display: flex; justify-content: center; gap: 8px; margin-top: 34px; }
.blog-pages a { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none; }
.blog-pages a[aria-current] { background: var(--primary); border-color: var(--primary); color: #fff; }

.post-head { max-width: 860px; padding-top: 26px; text-align: center; display: grid; justify-items: center; gap: 14px; }
.post-head h1 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.35; }
.post-head .post-tag { align-self: center; }
.post-lead { font-size: 19px; color: var(--text-2); max-width: 720px; }
.post-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; color: var(--text-2); font-size: 14.5px; }
.post-meta span { display: inline-flex; align-items: center; gap: 7px; }
.post-by svg { width: 26px; height: 26px; }
.post-cover { max-width: 1100px; margin-top: 28px; }
.post-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; display: block; box-shadow: 0 24px 60px rgba(16, 24, 64, .14); }
.post-wrap { max-width: 1100px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 46px; margin-top: 40px; align-items: start; }
.post-side { position: sticky; top: 90px; display: grid; gap: 18px; }
.post-toc, .post-share { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.post-toc b, .post-share b { display: block; font-size: 14.5px; margin-bottom: 10px; }
.post-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: toc; }
.post-toc li { counter-increment: toc; }
.post-toc a { display: flex; gap: 8px; padding: 6px 8px; border-radius: 9px; color: var(--text-2); font-size: 14px; line-height: 1.6; text-decoration: none; }
.post-toc a::before { content: counter(toc); flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font-size: 12px; font-weight: 800; }
.post-toc a:hover { background: var(--surface-2); color: var(--text); }
.post-share div { display: flex; gap: 8px; flex-wrap: wrap; }
.post-share a, .post-share button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.post-share .sh-wa { background: #1FA855; border-color: #1FA855; color: #fff; }
.post-share .sh-fb { background: #1877F2; border-color: #1877F2; color: #fff; }
.post-share .sh-in { background: #0A66C2; border-color: #0A66C2; color: #fff; }
.post-share .sh-x { background: #111; border-color: #111; color: #fff; }
.post-body > :first-child { margin-top: 0; }
.post-body h2 { font-size: clamp(22px, 2.4vw, 28px); margin-block: 42px 14px; scroll-margin-top: 90px; line-height: 1.5; }
.post-body h3 { font-size: 20px; margin-block: 28px 10px; }
.post-body p, .post-body li { color: var(--text-2); font-size: 17.5px; line-height: 2; }
.post-body p + p { margin-top: 14px; }
.post-body ul, .post-body ol { padding-inline-start: 24px; display: grid; gap: 6px; margin-block: 12px; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body strong { color: var(--text); }
.post-body a { color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; }
.post-body blockquote { margin: 22px 0; padding: 16px 20px; border-inline-start: 4px solid var(--primary); border-radius: 12px; background: var(--primary-soft); }
.post-body blockquote p { color: var(--text); margin: 0; }
.post-body figure { margin: 26px 0; }
.post-body figure img { width: 100%; height: auto; border-radius: 16px; display: block; }
.post-body figcaption { text-align: center; color: var(--text-3); font-size: 14px; margin-top: 8px; }
.post-body code { padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: .9em; }
.post-body hr { border: 0; border-top: 1px solid var(--border); margin: 34px 0; }
.post-body .tbl-wrap { overflow-x: auto; margin: 20px 0; border-radius: 14px; border: 1px solid var(--border); }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.post-body th, .post-body td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--border); }
.post-body th { background: var(--surface-2); font-weight: 800; }
.post-body tr:last-child td { border-bottom: 0; }
.post-cta-wrap { max-width: 1100px; margin-top: 46px; }
.post-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 28px 30px; border-radius: 24px; color: #fff; background: radial-gradient(500px 260px at 100% 0%, rgba(90, 120, 255, .5), transparent 70%), linear-gradient(135deg, #0B1648, #1B2CD8); }
.post-cta-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); flex: none; }
.post-cta > div:nth-child(2) { flex: 1; min-width: 240px; }
.post-cta h2 { font-size: 22px; color: #fff; }
.post-cta p { color: #D3DBFF; margin-top: 6px; }
.post-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.post-related { max-width: 1100px; margin-block: 56px 20px; }
.post-related h2 { font-size: 24px; margin-bottom: 18px; }
@media (max-width: 960px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .post-side { position: static; order: 2; }
  .post-toc { display: none; }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-card.is-big { flex-direction: column; }
  .blog-card.is-big .bc-img { min-height: 0; aspect-ratio: 16 / 9; }
  .blog-card.is-big .bc-body { padding: 18px 20px 20px; }
  .post-body p, .post-body li { font-size: 16.5px; }
  .post-cover img { border-radius: 14px; }
  .post-cta { padding: 22px 20px; }
}

/* لوحة التحكم ← محرر المدونة */
.be-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.be-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.be-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.be-main, .be-side { display: grid; gap: 18px; }
.be-count { float: inline-end; font-size: 12.5px; font-weight: 700; color: var(--text-3); direction: ltr; }
.be-count.over { color: #E11D2E; }
.md-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--border); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--surface-2); }
.md-bar button { min-width: 36px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.md-bar button:hover { background: var(--surface); border-color: var(--border); }
.be-words { margin-inline-start: auto; color: var(--text-3); font-size: 12.5px; padding-inline: 8px; }
.md-area { border-radius: 0 0 12px 12px !important; font-size: 15.5px; line-height: 1.9; min-height: 420px; }
.md-help summary { cursor: pointer; color: var(--primary-text); font-weight: 700; font-size: 14px; }
.md-help-in { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin-top: 12px; font-size: 14px; color: var(--text-2); align-items: center; }
.md-help-in code { direction: ltr; text-align: left; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
.be-en summary { cursor: pointer; list-style: none; }
.be-slug { display: flex; align-items: center; border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden; background: var(--surface); }
.be-slug span { padding: 0 10px; color: var(--text-3); font-size: 13.5px; }
.be-slug input { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; min-width: 0; }
.be-cover { width: 100%; border-radius: 12px; margin-bottom: 8px; display: block; }
.be-row { display: flex; align-items: center; gap: 12px; }
.be-row img, .be-noimg { width: 64px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.be-noimg { display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
@media (max-width: 960px) { .be-grid { grid-template-columns: minmax(0, 1fr); } }

/* لوحة التحكم ← فلتر البلد (مصر / السعودية) */
.cc-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); margin-inline-start: auto; }
.cc-switch a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; color: var(--text-2); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.cc-switch a:hover { color: var(--text); background: var(--surface-2); }
.cc-switch a[aria-current] { background: var(--primary); color: #fff; }
.cc-switch a[aria-current][href*="cc=sa"] { background: #006C35; }
@media (max-width: 700px) { .cc-switch { order: 3; margin-inline-start: 0; } .cc-switch a { padding: 6px 10px; font-size: 13px; } }

/* ============ النسخة السعودية (sa.…) ============ */
.nav-brand { display: inline-flex; align-items: center; gap: 10px; }
.cc-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 108, 53, .1); color: #006C35; border: 1px solid rgba(0, 108, 53, .25); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.cc-sa .nav { box-shadow: inset 0 3px 0 #006C35; }
.cc-sa .eyebrow { background: rgba(0, 108, 53, .09); color: #006C35; border-color: rgba(0, 108, 53, .22); }
.cc-sa .plan-badge:not(.plan-badge-plus):not(.plan-badge-law) { background: #006C35; }
.cc-sa .seg-pick a[aria-current] { background: #006C35; border-color: #006C35; }
.cc-sa .post-tag { background: rgba(0, 108, 53, .1); color: #006C35; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cc-pill, :root:not([data-theme="light"]).cc-sa .eyebrow, :root:not([data-theme="light"]).cc-sa .post-tag { color: #3DDC97; background: rgba(61, 220, 151, .12); border-color: rgba(61, 220, 151, .3); }
}
:root[data-theme="dark"] .cc-pill, :root[data-theme="dark"].cc-sa .eyebrow, :root[data-theme="dark"].cc-sa .post-tag { color: #3DDC97; background: rgba(61, 220, 151, .12); border-color: rgba(61, 220, 151, .3); }
@media (max-width: 420px) { .cc-pill { padding: 2px 7px; font-size: 11.5px; } }
