/* Public site (home and account pages). Light look built on Tailwind's palette and spacing:
   slate for text and lines, one emerald accent, rounded-2xl cards with a 1px border and shadow-sm. */
:root {
  color-scheme: light;
  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0; --slate-300: #cbd5e1;
  --slate-500: #64748b; --slate-600: #475569; --slate-700: #334155; --slate-900: #0f172a;
  --emerald-50: #ecfdf5; --emerald-200: #a7f3d0; --emerald-700: #047857; --emerald-800: #065f46; --emerald-900: #064e3b;
  --amber-50: #fffbeb; --amber-200: #fde68a; --amber-700: #b45309; --amber-800: #92400e;
  --sky-50: #f0f9ff; --sky-200: #bae6fd; --sky-700: #0369a1; --sky-800: #075985;
  --red-50: #fef2f2; --red-200: #fecaca; --red-700: #b91c1c; --red-800: #991b1b;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .08), 0 2px 4px -2px rgba(15, 23, 42, .06);
  --ring: 0 0 0 3px rgba(4, 120, 87, .2);
  --container: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--slate-900);
  font: 16px/1.75 "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--emerald-700); }
a:hover { color: var(--emerald-800); }
[id] { scroll-margin-top: 84px; }
:focus-visible { outline: 2px solid var(--emerald-700); outline-offset: 2px; }
.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: 12px; font: inherit; font-size: 15px;
  font-weight: 600; line-height: 1.4; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-lg { min-height: 52px; padding: 13px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--emerald-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--emerald-800); color: #fff; }
.btn-secondary { background: #fff; color: var(--slate-900); border-color: var(--slate-300); }
.btn-secondary:hover { background: var(--slate-50); color: var(--slate-900); }
.btn-ghost { background: transparent; color: var(--slate-700); }
.btn-ghost:hover { background: var(--slate-100); color: var(--slate-900); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .7; cursor: wait; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--slate-200); }
.site-header .container { display: flex; align-items: center; gap: 12px 32px; min-height: 68px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--slate-900); text-decoration: none; font-size: 20px; font-weight: 700; }
.brand:hover { color: var(--slate-900); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--emerald-700); color: #fff; }
.site-nav { display: flex; gap: 4px 24px; flex: 1 1 auto; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--slate-600); text-decoration: none; padding: 8px 0; }
.site-nav a:hover { color: var(--slate-900); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.header-actions form { display: flex; align-items: center; gap: 8px; margin: 0; }
.header-user { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--slate-600); }
@media (max-width: 860px) { .site-nav { display: none; } }
@media (max-width: 520px) { .header-user { display: none; } .header-actions .btn { padding-inline: 12px; } }

.site-footer { border-top: 1px solid var(--slate-200); background: #fff; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 28px; font-size: 14px; color: var(--slate-500); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--slate-600); text-decoration: none; }
.site-footer a:hover { color: var(--slate-900); }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 88px); }
.section-muted { background: var(--slate-50); border-block: 1px solid var(--slate-200); }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.section-head h2 { margin: 0 0 8px; font-size: clamp(26px, 3.2vw, 32px); line-height: 1.35; font-weight: 700; }
.section-head p { margin: 0; color: var(--slate-600); font-size: 17px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--emerald-200); border-radius: 999px; background: var(--emerald-50); color: var(--emerald-800); font-size: 14px; font-weight: 600; }
.card { background: #fff; border: 1px solid var(--slate-200); border-radius: 16px; box-shadow: var(--shadow-sm); }

/* Hero */
.hero { background: var(--slate-50); border-bottom: 1px solid var(--slate-200); }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 50px); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.hero p.lead { margin: 0; max-width: 34em; color: var(--slate-600); font-size: clamp(17px, 2vw, 19px); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-center { display: flex; flex-direction: column; align-items: center; gap: 0; max-width: 960px; text-align: center; padding-block: clamp(56px, 9vw, 88px) clamp(48px, 8vw, 80px); }
.hero-center h1 { margin: 22px 0 22px; font-size: clamp(34px, 5vw, 48px); }
.hero-center p.lead { margin: 0 0 22px; max-width: 640px; }
.hero-center .hero-actions { justify-content: center; }
.hero-note { margin: 22px 0 0; color: var(--slate-500); font-size: 14px; }
@media (max-width: 520px) { .hero-actions .btn { width: 100%; } }

/* Product (download) cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.product-card { --tint: var(--emerald-50); --tint-line: var(--emerald-200); --ink: var(--emerald-700); --ink-dark: var(--emerald-800);
  display: flex; flex-direction: column; gap: 18px; padding: 28px; background: #fff; border: 1px solid var(--slate-200); border-radius: 20px; box-shadow: var(--shadow-sm); }
.product-card.android { --tint: var(--sky-50); --tint-line: var(--sky-200); --ink: var(--sky-700); --ink-dark: var(--sky-800); }
.product-top { display: flex; align-items: center; gap: 14px; }
.product-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--tint); border: 1px solid var(--tint-line); color: var(--ink); }
.product-icon svg.icon { width: 24px; height: 24px; }
.product-card h3 { margin: 0; font-size: 21px; line-height: 1.4; font-weight: 700; }
.product-card .for { display: block; color: var(--slate-500); font-size: 15px; }
.product-points { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--slate-700); }
.product-points li { display: flex; align-items: center; gap: 10px; }
.product-points svg.icon { width: 18px; height: 18px; color: var(--ink); stroke-width: 2.5; }
.product-action { display: grid; gap: 8px; margin-top: auto; }
.product-card .btn-primary { background: var(--ink); }
.product-card .btn-primary:hover { background: var(--ink-dark); }
.meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; color: var(--slate-500); font-size: 13.5px; }
.meta bdi { color: var(--slate-700); font-weight: 600; }
.countdown { min-height: 1.6em; margin: 0; text-align: center; color: var(--ink-dark); font-size: 14.5px; font-weight: 600; }
.countdown[hidden] { display: none; }
.guide-link { justify-self: center; font-size: 14px; font-weight: 600; color: var(--ink); }

/* Steps and features */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; padding: 24px; }
.steps li::before { content: counter(step, arabic-indic); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--emerald-700); color: #fff; font-weight: 700; }
.steps h3, .features h3 { margin: 0; font-size: 18px; font-weight: 600; }
.steps p, .features p { margin: 0; color: var(--slate-600); font-size: 15px; line-height: 1.7; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 22px; border: 1px solid var(--slate-200); border-radius: 16px; }
.feature-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--emerald-50); color: var(--emerald-700); }
.feature > div { display: grid; gap: 4px; }

/* FAQ */
.faq { max-width: 760px; margin-inline: auto; overflow: hidden; }
.faq details { border-bottom: 1px solid var(--slate-100); }
.faq details:last-child { border-bottom: 0; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; padding: 18px 24px; font-size: 17px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--slate-500); font-size: 24px; font-weight: 400; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { margin: 0; padding: 0 24px 20px; color: var(--slate-600); line-height: 1.8; }

/* Support band */
.support { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(24px, 4vw, 36px); border: 1px solid var(--emerald-200); border-radius: 20px; background: var(--emerald-50); }
.support h2 { margin: 0 0 4px; font-size: 22px; color: var(--emerald-900); }
.support p { margin: 0; color: var(--emerald-800); }
.support-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.floating-whatsapp { position: fixed; bottom: 20px; left: 20px; z-index: 50; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; background: #25d366; color: #fff; box-shadow: var(--shadow-md); }
.floating-whatsapp:hover { color: #fff; }
.floating-whatsapp svg { width: 30px; height: 30px; }

/* Account pages: one centred card */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--slate-50); }
.auth-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.auth-header .back { color: var(--slate-600); text-decoration: none; font-size: 15px; padding: 8px 0; }
.auth-main { flex: 1; display: flex; justify-content: center; padding: 24px 16px 64px; }
.auth { width: 100%; max-width: 440px; display: grid; gap: 20px; align-content: start; }
.auth-title { text-align: center; }
.auth-title h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.35; font-weight: 700; }
.auth-title p { margin: 0; color: var(--slate-600); }
.auth-card { padding: 28px; border-radius: 20px; }
.auth-alt { margin: 0; text-align: center; color: var(--slate-600); font-size: 15px; }
.auth-alt a { font-weight: 600; }
.note { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border: 1px solid; border-radius: 12px; font-size: 14.5px; line-height: 1.7; }
.note svg.icon { width: 18px; height: 18px; margin-top: 3px; }
.note-info { background: var(--emerald-50); border-color: var(--emerald-200); color: var(--emerald-800); }
.note-error { background: var(--red-50); border-color: var(--red-200); color: var(--red-800); }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label, .field .label-row { font-size: 15px; font-weight: 600; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-row a { font-size: 14px; font-weight: 500; }
.optional { font-weight: 400; color: var(--slate-500); }
.hint { font-size: 13.5px; color: var(--slate-500); }
.input {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--slate-300); border-radius: 12px;
  background: #fff; color: var(--slate-900); font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.input[dir="ltr"] { text-align: left; }
.input::placeholder { color: #94a3b8; }
.input:focus { outline: none; border-color: var(--emerald-700); box-shadow: var(--ring); }
.input-code { letter-spacing: .4em; font-size: 20px; text-align: center !important; }
.password { position: relative; }
.password .input { padding-left: 52px; }
.password button { position: absolute; left: 2px; top: 2px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--slate-500); cursor: pointer; }
.password button:hover { color: var(--slate-900); }
.password button[hidden] { display: none; }
.email-chip { justify-self: center; padding: 4px 12px; border-radius: 999px; background: var(--slate-100); color: var(--slate-700); font-size: 14px; }
.fine { margin: 0; text-align: center; color: var(--slate-500); font-size: 13px; line-height: 1.7; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .input, .faq summary::after { transition: none; }
  .spinner { animation-duration: 2s; }
}

/* Buy, order and legal pages (on the same centred layout) */
.auth-wide { max-width: 640px; }
.center-text { margin: 0; text-align: center; color: var(--slate-700); }
.note-warn { background: var(--amber-50); border-color: var(--amber-200); color: var(--amber-800); }
.offers { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.offers legend { margin-bottom: 8px; padding: 0; font-size: 15px; font-weight: 600; }
.offer { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--slate-300); border-radius: 12px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.offer:hover { border-color: var(--slate-500); }
.offer:has(input:checked) { border-color: var(--emerald-700); background: var(--emerald-50); box-shadow: var(--ring); }
.offer input { width: 18px; height: 18px; margin: 0; accent-color: var(--emerald-700); }
.offer-name { display: grid; line-height: 1.5; font-weight: 600; }
.offer-name span { font-weight: 400; font-size: 14px; color: var(--slate-500); }
.offer strong { margin-inline-start: auto; white-space: nowrap; }
.key-box { margin: 0; padding: 16px; border: 1px dashed var(--emerald-700); border-radius: 12px; background: var(--emerald-50); color: var(--emerald-900); font: 700 22px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace; text-align: center; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.waiting { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 0; color: var(--slate-700); }
.spinner-dark { border-color: var(--slate-200); border-top-color: var(--emerald-700); }
.prose h1 { margin: 0 0 16px; font-size: 28px; line-height: 1.35; }
.prose h2 { margin: 24px 0 8px; font-size: 18px; }
.prose p { margin: 0 0 12px; line-height: 1.85; color: var(--slate-700); }
.prose ul { display: grid; gap: 6px; margin: 0 0 12px; padding-inline-start: 22px; line-height: 1.85; color: var(--slate-700); }

/* Sign-up / sign-in window on the home page */
.modal { width: min(440px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 24px; border: 1px solid var(--slate-200); border-radius: 20px; background: #fff; color: var(--slate-900); box-shadow: 0 20px 25px -5px rgba(15, 23, 42, .12), 0 8px 10px -6px rgba(15, 23, 42, .1); overflow-y: auto; }
.modal::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.modal[open] { animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-pane { display: grid; gap: 14px; }
.modal .form { gap: 14px; }
.modal-pane[hidden] { display: none; }
.modal .auth-title h2 { margin: 0 0 4px; font-size: 24px; line-height: 1.35; }
.modal .auth-title p { margin: 0; color: var(--slate-600); }
.modal-close { position: absolute; top: 12px; left: 12px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--slate-500); cursor: pointer; }
.modal-close:hover { background: var(--slate-100); color: var(--slate-900); }
.link-button { padding: 0; border: 0; background: none; color: var(--emerald-700); font: inherit; font-weight: 600; cursor: pointer; }
.link-button:hover { color: var(--emerald-800); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .modal[open] { animation: none; } }

/* Account dashboard */
.auth-dashboard { max-width: 1080px; }
.dash { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.dash-nav { flex: 1 1 220px; max-width: 240px; display: grid; gap: 4px; padding: 10px; }
.dash-main { flex: 999 1 560px; min-width: 0; display: grid; gap: 20px; }
.dash-page { display: grid; gap: 20px; }
.dash-head h1 { margin: 0 0 4px; font-size: 26px; line-height: 1.35; }
.dash-head p { margin: 0; color: var(--slate-600); }
.dash-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--slate-700); font: inherit; font-size: 15px; text-align: start; text-decoration: none; cursor: pointer; }
.dash-link:hover { background: var(--slate-100); color: var(--slate-900); }
.dash-link[aria-current="page"] { background: var(--emerald-50); color: var(--emerald-800); font-weight: 600; }
.dash-link svg.icon { width: 19px; height: 19px; color: currentColor; }
.dash-logout { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--slate-200); }
@media (max-width: 820px) {
  .dash-nav { max-width: none; display: flex; overflow-x: auto; }
  .dash-link { width: auto; white-space: nowrap; }
  .dash-logout { margin: 0; padding: 0 0 0 0; border: 0; margin-inline-start: auto; }
}
.product-card h2 { margin: 0; font-size: 21px; line-height: 1.4; font-weight: 700; }
.auth-header .header-actions { margin: 0; }

/* «مفاتيحي» */
.key-list { display: grid; gap: 14px; }
.key-row { display: grid; gap: 14px; padding: 20px 22px; }
.key-row-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; }
.key-row h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.key-row-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--slate-100); }
.key-row-key { display: grid; gap: 2px; }
.key-mask { font: 700 17px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .04em; color: var(--slate-900); }
.status { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--slate-200); background: var(--slate-50); color: var(--slate-700); font-size: 13px; font-weight: 600; white-space: nowrap; }
.status-paid { border-color: var(--emerald-200); background: var(--emerald-50); color: var(--emerald-800); }
.status-pending { border-color: var(--amber-200); background: var(--amber-50); color: var(--amber-800); }
.status-failed, .status-refunded, .status-review { border-color: var(--red-200); background: var(--red-50); color: var(--red-800); }
.empty { display: grid; justify-items: center; gap: 8px; padding: 40px 24px; text-align: center; }
.empty svg.icon { width: 32px; height: 32px; color: var(--slate-500); }
.empty h2 { margin: 0; font-size: 19px; }
.empty p { margin: 0 0 8px; color: var(--slate-600); }
