/* Omnexa Brief — هوية أومنيكسا */
:root {
  --p: #5700ae;
  --p-700: #44008a;
  --p-900: #2a0057;
  --ink: #160d24;
  --ink-2: #463e4d;
  --muted: #6e6585;
  --line: #e6e2ec;
  --soft: #f4effb;
  --soft-2: #ebe2f7;
  --gold: #fbb040;
  --gold-ink: #3a2400;
  --ok: #138a52;
  --err: #c62828;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(42, 0, 87, 0.25);
  --font: "IBM Plex Sans Arabic", "Cairo", system-ui, sans-serif;
  --font-h: "Cairo", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-h); line-height: 1.3; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .15s, background .2s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--p); color: #fff; box-shadow: 0 8px 20px -8px rgba(87,0,174,.6); }
.btn-primary:hover { background: var(--p-700); }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 10px 24px -10px rgba(251,176,64,.8); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--soft); }
.btn-outline { background: #fff; color: var(--p); border: 1.5px solid var(--soft-2); }
.btn-outline:hover { border-color: var(--p); }
.btn-wa { background: #25d366; color: #fff; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.ico { width: 20px; height: 20px; flex: none; }

/* ===== Form shell ===== */
.shell { min-height: 100dvh; display: flex; flex-direction: column; background: var(--soft); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--p); color: #fff;
  padding: 12px 18px 14px;
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar .logo { height: 40px; width: auto; }
.step-count { font-size: 13px; opacity: .85; font-weight: 600; }
.progress { height: 6px; background: rgba(255,255,255,.18); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 99px; transition: width .45s cubic-bezier(.2,.8,.2,1); }

.stage { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 22px 18px calc(110px + var(--safe-b)); }
.screen { animation: enter .35s cubic-bezier(.2,.8,.2,1); }
.screen.back { animation-name: enterBack; }
@keyframes enter { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes enterBack { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--p); border-radius: 99px;
  padding: 5px 12px 5px 14px; font-size: 13px; font-weight: 700; margin-bottom: 12px;
  box-shadow: 0 2px 10px -4px rgba(87,0,174,.25);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.q-title { font-size: 25px; font-weight: 800; letter-spacing: -.2px; }
.q-sub { color: var(--muted); margin: 6px 0 0; font-size: 15px; }

.block { background: #fff; border-radius: var(--r); padding: 18px; margin-top: 16px; box-shadow: 0 1px 0 var(--line); }
.block-title { font-weight: 700; font-size: 16px; margin: 0 0 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.block-hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.opt-tag { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--soft); padding: 2px 10px; border-radius: 99px; }

/* ===== Inputs ===== */
.field { display: block; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field > span b { color: var(--err); font-weight: 700; }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff;
  font-size: 16px; outline: none; transition: border .2s, box-shadow .2s;
}
.input:focus { border-color: var(--p); box-shadow: 0 0 0 4px rgba(87,0,174,.12); }
.input.invalid { border-color: var(--err); box-shadow: 0 0 0 4px rgba(198,40,40,.1); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.7; }
.input[dir="ltr"] { text-align: right; }
.err-msg { color: var(--err); font-size: 13px; margin-top: 6px; display: none; }
.invalid + .err-msg { display: block; }

/* ===== Chips ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 16px; border-radius: 99px;
  background: #fff; border: 1.5px solid var(--line); font-weight: 600; font-size: 15px;
  transition: all .18s; user-select: none;
}
.chip:hover { border-color: #cdbfe3; }
.chip[aria-pressed="true"] { background: var(--p); border-color: var(--p); color: #fff; box-shadow: 0 6px 14px -8px rgba(87,0,174,.8); }
.chip .em { font-size: 17px; line-height: 1; }
.chip.designer { border-style: dashed; color: var(--muted); }
.chip.designer[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; border-style: solid; }
.chips.grid2 { display: grid; grid-template-columns: 1fr 1fr; }
.chips.grid2 .chip { justify-content: flex-start; border-radius: 14px; }

/* ===== Option cards ===== */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.card-opt {
  position: relative; text-align: center; background: #fff;
  border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 10px 12px;
  transition: all .18s; color: var(--ink);
}
.card-opt svg { width: 100%; height: 54px; color: var(--p); margin-bottom: 8px; }
.card-opt strong { display: block; font-size: 15px; }
.card-opt small { display: block; color: var(--muted); font-size: 12px; }
.card-opt[aria-pressed="true"] { border-color: var(--p); background: var(--soft); box-shadow: 0 0 0 3px rgba(87,0,174,.12); }
.card-opt[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--p); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center;
}
.card-opt.designer { border-style: dashed; display: grid; place-items: center; min-height: 112px; color: var(--muted); }
.card-opt.designer .em { font-size: 26px; margin-bottom: 4px; }
.card-opt.designer[aria-pressed="true"] { color: var(--ink); }

/* font previews */
.font-cards { display: grid; gap: 10px; }
.font-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 16px; text-align: right;
  transition: all .18s;
}
.font-opt .sample { font-size: 28px; line-height: 1.4; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.font-opt .name { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.font-opt[aria-pressed="true"] { border-color: var(--p); background: var(--soft); }
.font-opt[aria-pressed="true"] .name { color: var(--p); }
.font-opt[aria-pressed="true"] .name::before { content: "✓ "; }

/* ===== Segmented ===== */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--soft); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { min-height: 44px; border: 0; background: transparent; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); transition: all .2s; padding: 4px 8px; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--p); box-shadow: 0 2px 8px -2px rgba(42,0,87,.2); }

/* ===== Sliders ===== */
.slider { margin: 6px 0 18px; }
.slider:last-child { margin-bottom: 4px; }
.slider-labels { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.slider-labels span.on { color: var(--p); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; direction: rtl; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, #c9b3ea, var(--soft-2) 46%, #b9a3db 46%, #b9a3db 54%, var(--soft-2) 54%, #c9b3ea); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, #c9b3ea, var(--soft-2) 46%, #b9a3db 46%, #b9a3db 54%, var(--soft-2) 54%, #c9b3ea); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #fff; border: 3px solid var(--p); box-shadow: 0 3px 10px rgba(42,0,87,.3); }
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--p); }

/* ===== Swatches ===== */
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 8px; }
.swatch { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.swatch i { position: relative; width: 46px; height: 46px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .18s; }
.swatch[aria-pressed="true"] i { transform: scale(1.06); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--p); }
.swatch[aria-pressed="true"] i::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 18px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.swatches.avoid .swatch[aria-pressed="true"] i { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--err); }
.swatches.avoid .swatch[aria-pressed="true"] i::after { content: "✕"; }
.limit-note { font-size: 12px; color: var(--muted); }

/* ===== Brand setup ===== */
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 4px 0; }
.stepper button { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 26px; font-weight: 600; color: var(--p); display: grid; place-items: center; }
.stepper button:disabled { opacity: .35; }
.stepper output { font-family: var(--font-h); font-size: 44px; font-weight: 800; min-width: 50px; text-align: center; color: var(--p); }
.brand-card { position: relative; background: #fff; border-radius: var(--r); padding: 16px; margin-top: 12px; border: 1.5px solid var(--line); }
.brand-card .num { position: absolute; top: -12px; right: 16px; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 13px; border-radius: 99px; padding: 2px 12px; }
.brand-card .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.brand-pill {
  display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff;
  border-radius: 99px; padding: 5px 14px; font-size: 13px; font-weight: 700; margin-bottom: 12px;
}
.brand-pill em { font-style: normal; background: var(--gold); color: var(--gold-ink); border-radius: 99px; padding: 0 8px; font-size: 12px; }

/* ===== Files ===== */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  border: 2px dashed #cbb8e8; border-radius: var(--r); background: var(--soft); padding: 26px 16px; cursor: pointer; transition: all .2s;
}
.dropzone.over { border-color: var(--p); background: var(--soft-2); }
.dropzone .big { width: 56px; height: 56px; border-radius: 18px; background: var(--p); color: #fff; display: grid; place-items: center; margin-bottom: 6px; }
.dropzone strong { font-size: 16px; }
.dropzone small { color: var(--muted); font-size: 13px; }
.file-list { display: grid; gap: 8px; margin-top: 12px; }
.file-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.file-thumb { width: 52px; height: 52px; border-radius: 10px; background: var(--soft) center/cover no-repeat; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--p); text-transform: uppercase; }
.file-meta { min-width: 0; }
.file-meta strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: right; }
.file-meta small { color: var(--muted); font-size: 12px; }
.file-meta select { margin-top: 4px; font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; background: var(--soft); max-width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--soft); color: var(--ink-2); display: grid; place-items: center; }
.icon-btn:hover { background: #fde8e8; color: var(--err); }

/* voice */
.voice { display: flex; align-items: center; gap: 12px; background: var(--soft); border-radius: 16px; padding: 10px 12px; }
.rec-btn { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 0; background: var(--p); color: #fff; display: grid; place-items: center; }
.rec-btn.on { background: var(--err); animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(198,40,40,.5); } 70% { box-shadow: 0 0 0 14px rgba(198,40,40,0); } 100% { box-shadow: 0 0 0 0 rgba(198,40,40,0); } }
.voice-info { flex: 1; min-width: 0; font-size: 14px; }
.voice-info strong { display: block; }
.voice-info small { color: var(--muted); }
.voice audio { width: 100%; height: 36px; margin-top: 4px; }

/* ===== Bottom bar ===== */
.actionbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 12px 18px calc(12px + var(--safe-b));
}
.actionbar-in { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.actionbar .btn-primary, .actionbar .btn-gold { flex: 1; }
.actionbar .btn-ghost { padding: 0 18px; }

/* ===== Welcome ===== */
.welcome {
  min-height: 100dvh; display: flex; flex-direction: column; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 70% at 85% 0%, #7a1fd6 0%, rgba(122,31,214,0) 60%), radial-gradient(90% 60% at 0% 100%, #3d0080 0%, rgba(61,0,128,0) 70%), var(--p);
}
.welcome::before, .welcome::after { content: ""; position: absolute; border-radius: 50%; border: 1.5px solid rgba(251,176,64,.25); pointer-events: none; }
.welcome::before { width: 420px; height: 420px; top: -160px; left: -180px; }
.welcome::after { width: 260px; height: 260px; bottom: 120px; right: -120px; border-color: rgba(255,255,255,.12); }
.welcome-in { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 28px 22px calc(28px + var(--safe-b)); display: flex; flex-direction: column; }
.welcome .logo { height: 76px; width: auto; align-self: flex-start; }
.welcome-hero { margin: auto 0; padding: 36px 0 24px; }
.welcome h1 { font-size: clamp(32px, 9vw, 46px); font-weight: 800; letter-spacing: -.5px; }
.welcome h1 mark { background: var(--gold); color: var(--gold-ink); border-radius: 12px; padding: 0 10px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.welcome p.lead { font-size: 17px; opacity: .88; margin: 14px 0 0; max-width: 30em; }
.perks { display: grid; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.perks li { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 12px 14px; font-weight: 600; font-size: 15px; }
.perks li span { width: 38px; height: 38px; border-radius: 12px; background: rgba(251,176,64,.18); display: grid; place-items: center; font-size: 19px; flex: none; }
.welcome .btn-gold { width: 100%; min-height: 58px; font-size: 18px; }
.welcome .resume { margin-top: 10px; width: 100%; color: #fff; opacity: .85; }
.welcome .fine { text-align: center; font-size: 12.5px; opacity: .6; margin-top: 14px; }

/* ===== Review ===== */
.review-card { background: #fff; border-radius: var(--r); padding: 16px 18px; margin-top: 12px; }
.review-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-card h3 { font-size: 16px; }
.review-card .edit { border: 0; background: var(--soft); color: var(--p); font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 99px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.mini-sw { display: inline-flex; gap: 4px; vertical-align: middle; }
.mini-sw i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }

.upload-progress { margin-top: 16px; display: none; }
.upload-progress.on { display: block; }
.upload-progress .bar { height: 10px; background: var(--soft-2); border-radius: 99px; overflow: hidden; }
.upload-progress .bar i { display: block; height: 100%; width: 0; background: var(--p); transition: width .2s; }
.upload-progress small { display: block; text-align: center; color: var(--muted); margin-top: 6px; }

/* ===== Done ===== */
.done { text-align: center; padding: 30px 6px; }
.done .check { width: 96px; height: 96px; border-radius: 50%; margin: 10px auto 22px; background: var(--p); display: grid; place-items: center; box-shadow: 0 0 0 12px var(--soft-2); animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
.done .check svg { width: 46px; height: 46px; color: var(--gold); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.done h2 { font-size: 26px; font-weight: 800; }
.done p { color: var(--muted); }
.ref { display: inline-block; margin: 12px 0 22px; font-family: ui-monospace, monospace; font-weight: 800; letter-spacing: 1px; background: #fff; border: 1.5px dashed var(--p); color: var(--p); padding: 10px 18px; border-radius: 12px; direction: ltr; }
.done .btn { width: 100%; margin-top: 10px; }

.toast { position: fixed; z-index: 99; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s; max-width: calc(100% - 36px); text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* ===== Desktop split ===== */
.side { display: none; }
@media (min-width: 980px) {
  .shell { flex-direction: row; }
  .side {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; width: 380px; flex: none;
    background: var(--p); color: #fff; padding: 36px 34px; overflow: auto;
    background-image: radial-gradient(90% 50% at 100% 0%, #7a1fd6 0%, rgba(122,31,214,0) 70%);
  }
  .side .logo { height: 64px; width: auto; align-self: flex-start; }
  .side h2 { font-size: 22px; margin: 34px 0 6px; }
  .side p { opacity: .75; margin: 0 0 26px; font-size: 14px; }
  .side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
  .side li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 600; opacity: .55; }
  .side li i { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5); display: grid; place-items: center; font-style: normal; font-size: 12px; flex: none; }
  .side li.done { opacity: .85; }
  .side li.done i { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
  .side li.cur { opacity: 1; background: rgba(255,255,255,.1); }
  .side li.cur i { background: #fff; color: var(--p); border-color: #fff; }
  .side .side-foot { margin-top: auto; padding-top: 24px; font-size: 13px; opacity: .6; }
  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .topbar { background: var(--soft); color: var(--ink); padding: 22px 36px 0; position: static; }
  .topbar .logo { display: none; }
  .topbar .progress { background: var(--soft-2); }
  .stage { padding: 26px 36px 130px; max-width: 720px; }
  .actionbar { inset: auto 380px 0 0; }
  .actionbar-in { max-width: 648px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .swatches { grid-template-columns: repeat(8, 1fr); }
  .q-title { font-size: 30px; }
  .welcome .welcome-in { justify-content: center; }
  .welcome-hero { margin: 0; padding: 48px 0 32px; }
  .perks { grid-template-columns: repeat(3, 1fr); }
  .perks li { flex-direction: column; text-align: center; padding: 18px 12px; }
  .welcome .btn-gold { width: auto; min-width: 280px; }
  .welcome .resume { width: auto; }
  .welcome .ctas { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .welcome .fine { text-align: right; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
