:root {
  --ink: #18203a;
  --ink-2: #4a5470;
  --muted: #7a839c;
  --line: #e4e8f1;
  --bg: #f4f6fb;
  --card: #fff;
  --brand: #2c5be8;
  --brand-2: #1d3fb8;
  --brand-soft: #e8eefe;
  --amber: #ffb21e;
  --amber-ink: #5a3d00;
  --green: #12a46a;
  --green-soft: #e3f6ee;
  --red: #d8434b;
  --red-soft: #fdecec;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(24, 32, 58, .07);
}
* { box-sizing: border-box; }
:lang(ar), :lang(ar) * { letter-spacing: normal; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.75 "Cairo", system-ui, sans-serif;
  padding-block-end: 90px;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .4em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }

/* header */
.top { position: sticky; inset-block-start: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-block-end: 1px solid var(--line); }
.top-in { max-width: 1180px; margin-inline: auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; color: var(--ink); }
.logo.big { font-size: 30px; }
.logo-mark { inline-size: 26px; block-size: 26px; border-radius: 8px; background: linear-gradient(160deg, var(--brand), #6f8dff); position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 7px 8px 5px; border-radius: 50% 50% 50% 0; background: var(--amber); transform: rotate(-45deg); }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { padding: 6px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; }
.nav a.on, .nav a:hover { background: var(--brand-soft); color: var(--brand-2); }
.nav .badge { background: var(--amber); color: var(--amber-ink); border-radius: 99px; padding: 0 7px; font-size: 13px; margin-inline-start: 4px; }
.role { display: flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.role-label { font-size: 13px; color: var(--muted); padding-inline: 6px; }
.role button { border: 0; background: none; padding: 5px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.role button.on { background: var(--ink); color: #fff; }

/* layout */
main { max-width: 1180px; margin-inline: auto; padding: 24px 16px; }
.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.g2 { grid-template-columns: 1fr 1fr; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.crumbs { font-size: 14px; color: var(--muted); margin-block-end: 14px; }
.crumbs a { color: var(--ink-2); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-block: 30px 14px; }
.section-title h2 { font-size: 24px; margin: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--brand-soft); color: var(--brand-2); }
.pill.amber { background: #fff3d6; color: var(--amber-ink); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.gray { background: #eef0f5; color: var(--ink-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 10px 18px; border-radius: 12px; font-weight: 700; cursor: pointer; text-align: center; }
.btn:hover { border-color: #c9d1e3; }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.btn.primary:hover { filter: brightness(.97); }
.btn.blue { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--red); border-color: #f3c9cb; }
.btn.block { inline-size: 100%; }
.btn.sm { padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; padding-block: 26px 10px; }
.hero h1 { font-size: 44px; line-height: 1.3; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { font-size: 18px; color: var(--ink-2); margin-block: 6px 20px; }
.search { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; max-inline-size: 560px; }
.search input { flex: 1; border: 0; padding: 14px 18px; outline: none; background: none; }
.search .btn { border-radius: 0; }
.hero-art { aspect-ratio: 1; max-inline-size: 420px; justify-self: center; inline-size: 100%; border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; background: radial-gradient(circle at 30% 30%, #8aa4ff, var(--brand) 60%, var(--brand-2)); position: relative; box-shadow: 0 30px 60px rgba(44,91,232,.25); }
.hero-order { position: absolute; inset: 18% 20%; background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 20px 40px rgba(15,20,40,.25); font-size: 14px; display: flex; flex-direction: column; }
.hero-order .preview { flex: 1; aspect-ratio: auto; }
.hero-order .art svg { inline-size: 40%; block-size: 40%; }
.hero-art .chip {position: absolute; background: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.hero-art .chip i { inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--green); }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-block-start: 26px; }
.steps3 .card h3 { font-size: 18px; }
.steps3 .num { inline-size: 36px; block-size: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); font-weight: 800; margin-block-end: 8px; }

/* category cards */
.cat { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: transform .15s; color: var(--ink); }
.cat:hover { transform: translateY(-3px); }
.cat-ico { inline-size: 54px; block-size: 54px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.cat-ico svg { inline-size: 28px; block-size: 28px; }
.cat h3 { font-size: 19px; margin: 0; }
.cat ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.cat li { font-size: 13px; background: var(--bg); border-radius: 8px; padding: 2px 8px; color: var(--ink-2); }

/* service cards */
.svc { padding: 0; overflow: hidden; cursor: pointer; color: var(--ink); display: flex; flex-direction: column; }
.svc .thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; color: rgba(255,255,255,.95); }
.svc .thumb svg { inline-size: 52px; block-size: 52px; }
.svc .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.svc h3 { font-size: 17px; margin: 0; }
.svc .foot { display: flex; justify-content: space-between; align-items: center; border-block-start: 1px solid var(--line); padding: 10px 16px; font-size: 14px; }
.svc .price b { font-size: 18px; }
.stars { color: var(--amber); font-weight: 700; }

/* service page */
.svc-page { display: grid; grid-template-columns: 1fr 380px; gap: 26px; align-items: start; }
.svc-page h1 { font-size: 30px; }
.gallery { aspect-ratio: 16 / 9; border-radius: var(--radius); display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; }
.gallery svg { inline-size: 90px; block-size: 90px; opacity: .95; }
.gallery .tag { position: absolute; inset-block-end: 16px; inset-inline-start: 16px; background: rgba(255,255,255,.18); padding: 4px 12px; border-radius: 99px; font-weight: 700; backdrop-filter: blur(4px); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-block: 18px; }
.facts div { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.facts b { color: var(--ink); }
.compare { inline-size: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 10px; border-block-end: 1px solid var(--line); text-align: start; }
.compare th { background: var(--bg); }
.compare td.c, .compare th.c { text-align: center; }
.buy { position: sticky; inset-block-start: 84px; padding: 0; overflow: hidden; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); border-block-end: 1px solid var(--line); }
.tiers button { border: 0; background: var(--bg); padding: 12px 6px; cursor: pointer; font-weight: 700; color: var(--ink-2); border-block-end: 3px solid transparent; }
.tiers button.on { background: #fff; color: var(--brand-2); border-block-end-color: var(--brand); }
.tiers .rec { display: block; font-size: 13px; color: var(--amber-ink); font-weight: 600; }
.buy-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.buy-price { display: flex; justify-content: space-between; align-items: baseline; }
.buy-price b { font-size: 28px; }
.feat { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.feat li::before { content: "✓"; color: var(--green); font-weight: 800; margin-inline-end: 8px; }
.extras label { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 0; border-block-start: 1px dashed var(--line); font-size: 14px; }
.extras label span { flex: 1; }
.team { display: flex; gap: 12px; align-items: center; padding: 16px 20px; border-block-start: 1px solid var(--line); }
.team .av { inline-size: 46px; block-size: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); }
.team .av .logo-mark { inline-size: 24px; block-size: 24px; }

/* forms */
.form { display: grid; gap: 14px; }
.field label { display: block; font-weight: 700; margin-block-end: 6px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea { inline-size: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.field textarea { min-block-size: 90px; resize: vertical; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { inline-size: 34px; block-size: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatches button.on { box-shadow: 0 0 0 2px var(--ink); }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choices label { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; cursor: pointer; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.choices input { accent-color: var(--brand); }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 16px; text-align: center; color: var(--muted); cursor: pointer; }
.files { display: flex; gap: 8px; flex-wrap: wrap; }
.file { display: inline-flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 14px; }

/* stepper */
.stepper { display: flex; gap: 0; margin-block-end: 20px; counter-reset: s; }
.stepper div { flex: 1; text-align: center; font-weight: 700; color: var(--muted); position: relative; padding-block-start: 38px; font-size: 14px; }
.stepper div::before { counter-increment: s; content: counter(s); position: absolute; inset-block-start: 0; inset-inline-start: 50%; translate: 50% 0; inline-size: 30px; block-size: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink-2); }
.stepper div.on { color: var(--ink); }
.stepper div.on::before { background: var(--brand); color: #fff; }
.stepper div.done::before { content: "✓"; background: var(--green); color: #fff; }

/* paymob mock */
.pay { max-inline-size: 460px; margin-inline: auto; padding: 0; overflow: hidden; }
.pay-head { background: #0b1f4b; color: #fff; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; }
.pay-head b { font-size: 18px; }
.pay-body { padding: 20px; display: grid; gap: 12px; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note { background: #fff8e6; border: 1px solid #ffe2a3; color: var(--amber-ink); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.note.blue { background: var(--brand-soft); border-color: #cdd9fd; color: var(--brand-2); }
.note.green { background: var(--green-soft); border-color: #bfe8d6; color: #0b6b45; }

/* order */
.order { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding-block-end: 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 13px; inset-block: 26px 0; border-inline-start: 2px solid var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { inline-size: 28px; block-size: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-size: 13px; font-weight: 800; color: var(--ink-2); }
.timeline .done .dot { background: var(--green); color: #fff; }
.timeline .now .dot { background: var(--brand); color: #fff; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.delivery { border: 2px solid var(--brand-soft); border-radius: var(--radius); padding: 18px; background: #fbfcff; }
.preview { aspect-ratio: 4 / 3; border-radius: 12px; background: repeating-linear-gradient(45deg, #f2f4fa 0 12px, #fff 12px 24px); display: grid; place-items: center; position: relative; overflow: hidden; }
.delivery .preview { max-inline-size: 460px; }
.preview .art svg { inline-size: 45%; block-size: 45%; }
.preview .art {inline-size: 46%; aspect-ratio: 1; border-radius: 28%; background: linear-gradient(140deg, var(--sw1, #2c5be8), var(--sw2, #ffb21e)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 26px; }

/* tables */
.table { inline-size: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 11px 10px; text-align: start; border-block-end: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 700; font-size: 13px; }
.table td.num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-block-end: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .k { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat .v { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 13px; color: var(--muted); }

/* dashboard */
.dash { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
.dash > *, .order > *, .svc-page > *, .hero > * { min-inline-size: 0; }
.side { padding: 10px; position: sticky; inset-block-start: 84px; }
.side a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; }
.side a.on { background: var(--brand-soft); color: var(--brand-2); }
.side .who { padding: 10px 12px 14px; border-block-end: 1px solid var(--line); margin-block-end: 8px; }
.side .who b { display: block; }
.roles { display: flex; gap: 4px; flex-wrap: wrap; margin-block-start: 6px; }

/* chat drawer */
.drawer { position: fixed; inset-block: 0; inset-inline-end: 0; inline-size: min(420px, 100vw); background: #fff; z-index: 60; box-shadow: -10px 0 40px rgba(24,32,58,.18); display: flex; flex-direction: column; }
.chat-head { padding: 14px 18px; border-block-end: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.chat-head .x { margin-inline-start: auto; border: 0; background: var(--bg); inline-size: 34px; block-size: 34px; border-radius: 10px; cursor: pointer; font-size: 18px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-inline-size: 82%; padding: 9px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.msg.me { align-self: flex-start; background: var(--brand); color: #fff; border-color: var(--brand); }
.msg.them { align-self: flex-end; }
.msg .meta { display: block; font-size: 13px; opacity: .75; margin-block-start: 2px; }
.msg.sys { align-self: center; background: none; border: 0; color: var(--muted); font-size: 13px; text-align: center; max-inline-size: 100%; }
.chat-foot { padding: 12px; border-block-start: 1px solid var(--line); display: flex; gap: 8px; }
.chat-foot input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.internal { background: #fff8e6; color: var(--amber-ink); font-size: 13px; padding: 8px 14px; border-block-end: 1px solid #ffe2a3; }

/* modal + toast */
.modal { position: fixed; inset: 0; background: rgba(15,20,40,.45); z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal .card { inline-size: min(520px, 100%); max-block-size: 90vh; overflow-y: auto; }
.toast { position: fixed; inset-block-end: 96px; inset-inline-start: 50%; translate: 50% 0; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; z-index: 80; font-weight: 600; box-shadow: var(--shadow); max-inline-size: calc(100vw - 32px); }

/* guide */
.guide { position: fixed; inset-block-end: 16px; inset-inline-start: 16px; z-index: 40; inline-size: min(330px, calc(100vw - 32px)); background: var(--ink); color: #fff; border-radius: 16px; box-shadow: 0 16px 40px rgba(15,20,40,.3); font-size: 14px; }
.guide-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; }
.guide-head b { flex: 1; }
.guide-bar { block-size: 4px; background: rgba(255,255,255,.15); border-radius: 4px; margin-inline: 14px; overflow: hidden; }
.guide-bar i { display: block; block-size: 100%; background: var(--amber); }
.guide ol { margin: 0; padding: 10px 14px 12px; list-style: none; display: grid; gap: 6px; }
.guide li { display: flex; gap: 8px; align-items: flex-start; color: rgba(255,255,255,.65); }
.guide li::before { content: ""; flex: none; inline-size: 16px; block-size: 16px; margin-block-start: 4px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); }
.guide li.done { color: rgba(255,255,255,.45); text-decoration: line-through; }
.guide li.done::before { background: var(--green); border-color: var(--green); }
.guide li.cur { color: #fff; font-weight: 700; }
.guide li.cur::before { border-color: var(--amber); }
.guide .reset { color: var(--amber); background: none; border: 0; cursor: pointer; font-size: 13px; padding: 0 14px 12px; }
.guide-cur { padding: 8px 14px 10px; font-weight: 700; color: #fff; }
.guide:not(.min) .guide-cur { display: none; }
.guide.min ol, .guide.min .reset { display: none; }

/* gate */
.gate { position: fixed; inset: 0; z-index: 100; background: linear-gradient(160deg, #eef2ff, var(--bg)); display: grid; place-items: center; padding: 16px; }
.gate-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 32px; display: grid; gap: 12px; inline-size: min(380px, 100%); text-align: center; justify-items: center; }
.gate-card input { inline-size: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; text-align: center; font-size: 18px; }
.gate-card .btn { inline-size: 100%; }
.gate-err { color: var(--red); margin: 0; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.lock { text-align: center; padding: 50px 20px; }
.lock .ico { font-size: 40px; }

@media (max-width: 900px) {
  .hero, .svc-page, .order, .dash, .g2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero-art { max-inline-size: 260px; }
  .steps3 { grid-template-columns: 1fr; }
  .buy, .side { position: static; }
  .facts { grid-template-columns: 1fr; }
  .role-label { display: none; }
  .top-in { gap: 8px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; }
}
@media (max-width: 420px) {
  body { font-size: 14px; }
  .role button { padding: 5px 8px; font-size: 13px; }
  .logo { font-size: 19px; }
  .pay-row { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .guide { inset-inline: 8px; inline-size: auto; inset-block-end: 8px; }
  .guide ol { max-block-size: 40vh; overflow-y: auto; }
}
@media (max-width: 900px) { .compare-wrap { display: none; } }
