@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  --ink: #141a33;
  --ink-soft: #3e4967;
  --muted: #8791aa;
  --line: #e6eaf4;
  --line-strong: #d6dcf0;
  --paper: #fbfcff;
  --surface: #fff;
  --tint: #f2f3ff;
  --primary: #6554ef;
  --primary-dark: #4d3be1;
  --blue: #3875e8;
  --cyan: #45c6de;
  --green: #25b890;
  --orange: #f39a52;
  --red: #e6677d;
  --shadow: 0 18px 50px rgba(65, 79, 141, .09);
  --shadow-soft: 0 8px 28px rgba(65, 79, 141, .06);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", "Noto Sans Arabic", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.is-dark {
  --ink: #f5f7ff; --ink-soft: #c4c9dc; --muted: #8e98b2; --line: #29324b;
  --line-strong: #394360; --paper: #11172b; --surface: #171e35; --tint: #202846;
  --shadow: 0 18px 50px rgba(0,0,0,.25); --shadow-soft: 0 8px 28px rgba(0,0,0,.2);
}
body.is-dark .topbar, body.is-dark .side-rail { background: rgba(17, 23, 43, .9); }
body.is-dark .hero-orb { opacity: .22; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(101,84,239,.25); outline-offset: 2px;
}
.topbar {
  position: sticky; top: 0; z-index: 20; height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 clamp(18px, 4vw, 58px); background: rgba(251,252,255,.88);
  border-bottom: 1px solid rgba(230,234,244,.8); backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: Manrope, sans-serif; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.brand-mark { width: 27px; height: 27px; position: relative; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(135deg,#5b56f2,#52c9df); box-shadow: 0 5px 12px rgba(101,84,239,.25); }
.brand-mark:before, .brand-mark:after { content: ""; position: absolute; border: 2px solid white; border-radius: 50%; }
.brand-mark:before { width: 9px; height: 9px; left: 6px; top: 7px; }
.brand-mark:after { width: 8px; height: 8px; right: 5px; bottom: 5px; background: rgba(255,255,255,.18); }
.brand-name { font-size: 18px; }
.topnav { display: flex; align-items: center; gap: 22px; font-size: 12px; color: var(--ink-soft); }
.topnav a { transition: color .2s ease; }
.topnav a:hover, .topnav a.active { color: var(--primary); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .avatar-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; transition: transform .2s, border .2s, color .2s; }
.icon-btn:hover, .avatar-btn:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); }
.avatar-btn { background: linear-gradient(135deg,#6a57ef,#45c7dd); border: 0; color: white; font-weight: 700; font-size: 12px; }
.lang-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 9px; height: 34px; padding: 0 10px; font-size: 11px; }
.mobile-menu { display: none; }
.page-shell { display: flex; min-height: calc(100vh - 72px); }
.side-rail { width: 238px; padding: 26px 14px; background: rgba(255,255,255,.76); border-right: 1px solid var(--line); flex-shrink: 0; }
[dir="rtl"] .side-rail { border-right: 0; border-left: 1px solid var(--line); }
.rail-label { padding: 8px 13px; margin: 11px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 9px; font-weight: 700; }
.rail-link { display: flex; align-items: center; gap: 12px; padding: 11px 13px; margin: 3px 0; border-radius: 10px; color: var(--ink-soft); font-size: 12px; transition: background .2s, color .2s, transform .2s; }
.rail-link svg { width: 16px; height: 16px; flex: 0 0 auto; }
.rail-link:hover { background: var(--tint); color: var(--primary); transform: translateX(2px); }
[dir="rtl"] .rail-link:hover { transform: translateX(-2px); }
.rail-link.active { color: var(--primary); background: #eeecff; font-weight: 700; }
body.is-dark .rail-link.active { background: #2d2a59; }
.rail-bottom { margin-top: auto; padding-top: 30px; }
.workspace { min-width: 0; flex: 1; padding: 36px clamp(18px, 4vw, 58px) 42px; }
.container { width: min(1180px, 100%); margin: 0 auto; }
.hero { position: relative; overflow: hidden; min-height: 410px; display: flex; align-items: center; padding: clamp(34px, 7vw, 80px); border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(135deg,#fbfcff 5%,#f3f2ff 57%,#edfaff 100%); box-shadow: var(--shadow-soft); }
body.is-dark .hero { background: linear-gradient(135deg,#171e35,#272345 62%,#183345); }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(4px); pointer-events: none; }
.hero-orb.one { width: 390px; height: 390px; right: -90px; bottom: -180px; background: rgba(101,84,239,.16); }
.hero-orb.two { width: 260px; height: 260px; left: -90px; top: -110px; background: rgba(69,198,222,.11); }
.hero-content { max-width: 720px; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); text-transform: uppercase; letter-spacing: .15em; font-size: 9px; font-weight: 800; }
.eyebrow:before { content: ""; display: block; width: 18px; height: 2px; border-radius: 4px; background: var(--primary); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Manrope, "Noto Sans Arabic", sans-serif; letter-spacing: -.06em; }
h1 { font-size: clamp(42px, 6vw, 74px); line-height: 1.03; margin: 15px 0 18px; max-width: 760px; }
h1 span { color: var(--primary); }
h2 { font-size: clamp(25px, 3vw, 34px); line-height: 1.1; margin: 7px 0 11px; }
h3 { font-size: 17px; margin-bottom: 7px; }
.hero-copy { max-width: 640px; color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; font-size: 12px; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 17px rgba(65,79,141,.14); }
.btn-primary { color: #fff; background: linear-gradient(135deg,var(--primary),#7967f5); }
.btn-secondary { color: var(--primary); background: var(--surface); border-color: #dcd9ff; }
.btn-quiet { background: var(--tint); color: var(--ink-soft); }
.section { padding: 38px 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-head p { color: var(--muted); font-size: 12px; margin-bottom: 0; }
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 20px; transition: transform .24s, box-shadow .24s, border-color .24s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d9d5ff; }
.card-link { display: block; height: 100%; }
.tool-card { position: relative; overflow: hidden; min-height: 164px; }
.tool-card:after { content: ""; position: absolute; width: 100px; height: 100px; right: -35px; bottom: -45px; border-radius: 50%; background: var(--tint); }
.tool-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; margin-bottom: 16px; color: var(--primary); background: #f0efff; }
.tool-icon.green { color: var(--green); background: #eafaf5; }
.tool-icon.blue { color: var(--blue); background: #ecf4ff; }
.tool-icon.orange { color: var(--orange); background: #fff5e9; }
.tool-icon.red { color: var(--red); background: #fff0f2; }
.tool-card h3 { font-size: 15px; margin-bottom: 4px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.stat { padding: 15px 17px; border-radius: 13px; background: rgba(255,255,255,.74); border: 1px solid rgba(220,224,242,.9); }
body.is-dark .stat { background: rgba(255,255,255,.04); border-color: var(--line); }
.stat b { display: block; font-family: Manrope; font-size: 22px; letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: 10px; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-item:first-child { padding-top: 0; }
.list-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--primary); background: var(--tint); flex-shrink: 0; }
.list-body { min-width: 0; flex: 1; }
.list-body b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-body span { color: var(--muted); font-size: 10px; }
.list-value { font-weight: 700; font-size: 12px; }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.page-title h1 { font-size: clamp(30px, 5vw, 51px); margin: 6px 0 8px; }
.page-title p { color: var(--muted); max-width: 620px; margin: 0; }
.searchbox { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-soft); }
.searchbox svg { color: var(--muted); flex-shrink: 0; }
.searchbox input { border: 0; outline: 0; min-width: 0; width: 100%; background: transparent; color: var(--ink); font-size: 12px; }
.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field label { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 11px 12px; outline: 0; }
.field textarea { min-height: 105px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(101,84,239,.1); }
.tool-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 16px; align-items: start; }
.tool-nav { display: grid; gap: 6px; }
.tool-tab { border: 1px solid var(--line); background: var(--surface); border-radius: 11px; padding: 13px; display: flex; align-items: center; gap: 10px; text-align: start; color: var(--ink-soft); }
.tool-tab.active { color: var(--primary); border-color: #cfc9ff; background: #f5f3ff; }
body.is-dark .tool-tab.active { background: #29264c; }
.result-box { margin-top: 14px; padding: 18px; border-radius: 13px; color: var(--primary-dark); background: linear-gradient(135deg,#f0efff,#effaff); border: 1px solid #dddbff; }
body.is-dark .result-box { color: #dcd8ff; background: #29264c; border-color: #4c477d; }
.result-box strong { display: block; font-family: Manrope; font-size: 30px; letter-spacing: -.06em; }
.result-box span { font-size: 11px; color: var(--muted); }
.price-card { display: grid; grid-template-columns: 56px 1fr auto; gap: 13px; align-items: center; }
.product-image { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg,#edf2ff,#f8f7ff); color: var(--primary); }
.price { text-align: end; }
.price strong { display: block; font-size: 16px; }
.price span { color: var(--green); font-size: 10px; font-weight: 700; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 17px 0; }
.filter-chip { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 7px 12px; font-size: 10px; }
.filter-chip.active { color: var(--primary); border-color: #cfc9ff; background: var(--tint); }
.chat-shell { min-height: 550px; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.chat-head { padding: 19px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.online { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 10px; }
.online:before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(37,184,144,.12); }
.messages { flex: 1; padding: 22px; display: grid; gap: 12px; align-content: start; background: linear-gradient(180deg,rgba(242,243,255,.55),transparent); }
.message { max-width: 80%; padding: 12px 14px; border-radius: 14px; font-size: 12px; }
.message.assistant { background: var(--surface); border: 1px solid var(--line); }
.message.user { justify-self: end; color: white; background: linear-gradient(135deg,var(--primary),#7967f5); }
.composer { padding: 14px 17px; border-top: 1px solid var(--line); display: flex; gap: 9px; }
.composer textarea { flex: 1; min-height: 43px; max-height: 110px; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: var(--paper); color: var(--ink); outline: 0; }
.prompt-row { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 22px 17px; }
.prompt { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 10px; color: var(--ink-soft); font-size: 10px; }
.profile-head { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.profile-avatar { width: 65px; height: 65px; border-radius: 19px; display: grid; place-items: center; color: white; font-family: Manrope; font-size: 22px; background: linear-gradient(135deg,var(--primary),var(--cyan)); }
.check { color: var(--green); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: 0; }
.settings-row b { display: block; font-size: 12px; }
.settings-row span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.switch { width: 39px; height: 22px; border: 0; border-radius: 99px; padding: 3px; background: #d8ddeb; }
.switch i { display: block; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform .2s; }
.switch.on { background: var(--primary); }
.switch.on i { transform: translateX(17px); }
[dir="rtl"] .switch.on i { transform: translateX(-17px); }
.auth-wrap { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(circle at 20% 20%,rgba(69,198,222,.12),transparent 29%),radial-gradient(circle at 90% 80%,rgba(101,84,239,.13),transparent 33%); }
.auth-card { width: min(440px,100%); padding: 32px; }
.auth-card .brand { margin-bottom: 30px; }
.auth-card h1 { font-size: 32px; margin-bottom: 7px; }
.auth-card p { color: var(--muted); font-size: 12px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; font-size: 11px; color: var(--primary); }
.footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px 0 5px; color: var(--muted); font-size: 10px; }
.footer a:hover { color: var(--primary); }
.toast { position: fixed; z-index: 50; bottom: 22px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 16px; background: #171d35; color: white; border-radius: 11px; font-size: 12px; box-shadow: var(--shadow); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }
.empty { text-align: center; padding: 45px 20px; color: var(--muted); }
.empty svg { color: var(--primary); margin-bottom: 12px; }
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .side-rail { width: 205px; } .topnav { gap: 13px; } }
@media (max-width: 760px) {
  .topbar { height: 64px; padding: 0 16px; }
  .topnav { display: none; position: absolute; left: 12px; right: 12px; top: 59px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
  .topnav.open { display: flex; }
  .topnav a { padding: 11px; }
  .mobile-menu { display: grid; }
  .side-rail { display: none; }
  .workspace { padding: 24px 15px 28px; }
  .hero { min-height: 480px; padding: 31px 22px; align-items: start; }
  h1 { font-size: 44px; }
  .hero-copy { font-size: 14px; }
  .stat-row, .grid-3, .grid-2, .split, .tool-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .tool-card { padding: 15px; min-height: 143px; }
  .tool-card h3 { font-size: 13px; }
  .page-title { display: block; }
  .page-title .btn { margin-top: 14px; }
  .searchbox { margin-top: 14px; }
  .footer { display: block; }
  .footer > * { display: block; margin-top: 8px; }
}
@media (max-width: 420px) { .top-actions .icon-btn:nth-child(2) { display: none; } .grid-4 { grid-template-columns: 1fr 1fr; } .hero-actions .btn { flex: 1 1 100%; } .auth-card { padding: 22px; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Premium interaction layer */
body:before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(circle at 8% 12%, rgba(69,198,222,.06), transparent 22%),
              radial-gradient(circle at 93% 8%, rgba(101,84,239,.06), transparent 25%);
}
body.page-loaded { animation: page-in .42s ease both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes float-soft { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(0,-8px,0); } }
@keyframes shimmer { from { transform: translateX(-110%); } to { transform: translateX(110%); } }
@keyframes pulse-ring { 0%,100% { box-shadow: 0 0 0 0 rgba(101,84,239,.18); } 50% { box-shadow: 0 0 0 8px rgba(101,84,239,0); } }
.hero:before {
  content: ""; position: absolute; top: 0; left: -35%; width: 28%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent);
  transform: skewX(-18deg); animation: shimmer 8s ease-in-out infinite; pointer-events: none;
}
.hero-orb.one { animation: float-soft 8s ease-in-out infinite; }
.hero-orb.two { animation: float-soft 10s 1s ease-in-out infinite reverse; }
.brand-mark { animation: pulse-ring 4.5s ease-in-out infinite; }
.btn, .icon-btn, .lang-btn, .filter-chip, .tool-tab, .prompt { position: relative; overflow: hidden; }
.btn:after, .icon-btn:after, .lang-btn:after, .filter-chip:after, .tool-tab:after, .prompt:after {
  content: ""; position: absolute; inset: 0; opacity: 0; background: rgba(255,255,255,.22);
  transform: translateX(-105%); transition: transform .45s ease, opacity .2s ease; pointer-events: none;
}
.btn:hover:after, .icon-btn:hover:after, .lang-btn:hover:after, .filter-chip:hover:after, .tool-tab:hover:after, .prompt:hover:after { opacity: 1; transform: translateX(105%); }
.card { will-change: transform; }
.card:hover .tool-icon { transform: rotate(-4deg) scale(1.05); }
.tool-icon { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.reveal { transition-delay: var(--reveal-delay, 0ms); }
.command-trigger { display: grid; }
.command-backdrop {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: start center; padding: 12vh 18px 18px;
  background: rgba(20,26,51,.25); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .24s ease;
}
.command-backdrop.open { opacity: 1; pointer-events: auto; }
.command-dialog {
  width: min(560px,100%); overflow: hidden; border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); box-shadow: 0 24px 80px rgba(26,32,74,.22); transform: translateY(-10px) scale(.98);
  transition: transform .24s ease;
}
.command-backdrop.open .command-dialog { transform: none; }
.command-search { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.command-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.command-list { padding: 8px; max-height: 340px; overflow: auto; }
.command-item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; border-radius: 10px; padding: 11px; text-align: start; color: var(--ink-soft); background: transparent; }
.command-item:hover, .command-item:focus { color: var(--primary); background: var(--tint); outline: 0; }
.command-item svg { color: var(--primary); flex: 0 0 auto; }
.command-hint { padding: 10px 16px 13px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.ai-fab {
  position: fixed; z-index: 18; right: 24px; bottom: 24px; width: 48px; height: 48px; border: 0; border-radius: 16px;
  display: grid; place-items: center; color: white; background: linear-gradient(135deg,var(--primary),#4bc4df);
  box-shadow: 0 12px 28px rgba(89,73,229,.28); transition: transform .25s, box-shadow .25s;
}
.ai-fab:hover { transform: translateY(-4px) rotate(-3deg); box-shadow: 0 16px 34px rgba(89,73,229,.35); }
[dir="rtl"] .ai-fab { right: auto; left: 24px; }
.mobile-dock { display: none; }
.page-transitioning { opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .2s ease; }
.touch-target { min-height: 44px; min-width: 44px; }
@media (max-width: 760px) {
  body { padding-bottom: 75px; }
  .topbar { box-shadow: 0 8px 22px rgba(65,79,141,.05); }
  .topbar .command-trigger { display: none; }
  .top-actions { gap: 6px; }
  .mobile-dock {
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 25; height: 61px; display: grid;
    grid-template-columns: repeat(4,1fr); align-items: center; padding: 5px; border: 1px solid rgba(230,234,244,.85);
    border-radius: 18px; background: rgba(255,255,255,.86); box-shadow: 0 12px 36px rgba(48,60,119,.16); backdrop-filter: blur(18px);
  }
  body.is-dark .mobile-dock { background: rgba(23,30,53,.9); border-color: var(--line); }
  .mobile-dock a { display: grid; place-items: center; gap: 2px; min-height: 50px; border-radius: 13px; color: var(--muted); font-size: 9px; transition: color .2s, background .2s, transform .2s; }
  .mobile-dock a.active { color: var(--primary); background: var(--tint); font-weight: 700; }
  .mobile-dock a:active { transform: scale(.92); }
  .mobile-dock svg { width: 17px; height: 17px; }
  .ai-fab { right: 18px; bottom: 88px; width: 44px; height: 44px; border-radius: 14px; }
  [dir="rtl"] .ai-fab { right: auto; left: 18px; }
  .command-backdrop { padding-top: 8vh; }
  .hero:before { animation-duration: 11s; }
  .hero-orb.one { animation-duration: 11s; }
  .card:hover { transform: none; }
}
@media (max-width: 420px) {
  .mobile-dock { left: 7px; right: 7px; bottom: 7px; }
  .ai-fab { bottom: 82px; }
}

/* Full-screen AI workspace */
body[data-page="ai"] { overflow-x: hidden; }
body[data-page="ai"] .workspace { padding: 0; }
body[data-page="ai"] .workspace > .container { width: 100%; max-width: none; }
body[data-page="ai"] .footer { display: none; }
body[data-page="ai"] .ai-fab { display: none; }
.ai-page {
  min-height: calc(100vh - 72px); display: grid; grid-template-columns: 248px minmax(0,1fr);
  background: var(--paper);
}
.ai-sidebar {
  display: flex; flex-direction: column; min-width: 0; padding: 20px 14px;
  background: rgba(255,255,255,.66); border-right: 1px solid var(--line);
}
[dir="rtl"] .ai-sidebar { border-right: 0; border-left: 1px solid var(--line); }
body.is-dark .ai-sidebar { background: rgba(17,23,43,.72); }
.ai-side-brand { display: flex; align-items: center; gap: 9px; padding: 3px 8px 20px; font-family: Manrope, sans-serif; font-size: 13px; }
.ai-side-brand .brand-mark { width: 25px; height: 25px; border-radius: 8px; }
.ai-online-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(37,184,144,.1); }
[dir="rtl"] .ai-online-dot { margin-left: 0; margin-right: auto; }
.new-chat-btn { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid #dcd9ff; border-radius: 10px; color: var(--primary); background: var(--tint); text-align: start; font-weight: 700; font-size: 11px; }
.new-chat-btn kbd { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 500; }
[dir="rtl"] .new-chat-btn kbd { margin-left: 0; margin-right: auto; }
.ai-side-label { margin: 27px 9px 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 9px; font-weight: 800; }
.ai-thread { display: flex; align-items: center; gap: 9px; width: 100%; min-width: 0; padding: 10px 9px; border: 0; border-radius: 10px; color: var(--ink-soft); background: transparent; text-align: start; }
.ai-thread:hover, .ai-thread.active { color: var(--primary); background: var(--tint); }
.thread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; }
.thread-dot.blue { background: var(--blue); }.thread-dot.green { background: var(--green); }
.thread-copy { min-width: 0; flex: 1; }.thread-copy b, .thread-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-copy b { font-size: 11px; font-weight: 600; }.thread-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.ai-side-spacer { flex: 1; min-height: 35px; }
.ai-side-account { display: flex; align-items: center; gap: 9px; padding: 10px 8px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; }
.ai-side-account > span:not(.profile-avatar) { min-width: 0; flex: 1; }.ai-side-account b, .ai-side-account small { display: block; }.ai-side-account b { font-size: 10px; }.ai-side-account small { color: var(--muted); margin-top: 2px; }
.profile-avatar.mini { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.ai-main { min-width: 0; min-height: calc(100vh - 72px); display: flex; flex-direction: column; }
.ai-main-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px clamp(22px, 5vw, 72px) 20px; }
.ai-main-head h1 { margin: 5px 0 3px; font-size: clamp(27px, 3vw, 39px); }
.ai-main-head p { margin: 0; color: var(--muted); font-size: 12px; }
.ai-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.model-pill { padding: 4px 8px; border: 1px solid #dcd9ff; border-radius: 999px; color: var(--primary); background: var(--tint); font-size: 9px; font-weight: 700; }
.ai-head-actions { display: flex; align-items: center; gap: 13px; }
.ai-mobile-chatbar { display: none; }
.ai-chat-stage { width: min(920px, calc(100% - 44px)); flex: 1; min-height: 390px; margin: 0 auto; overflow: auto; }
.chat-welcome { position: relative; display: grid; place-items: center; min-height: 255px; padding: 42px 20px 25px; text-align: center; overflow: hidden; }
.chat-welcome h2 { position: relative; z-index: 1; margin: 15px 0 7px; font-size: clamp(22px, 3vw, 30px); }
.chat-welcome p { position: relative; z-index: 1; max-width: 560px; margin: 0; color: var(--muted); font-size: 12px; }
.welcome-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 57px; height: 57px; border-radius: 19px; color: white; background: linear-gradient(135deg,var(--primary),var(--cyan)); box-shadow: 0 12px 29px rgba(101,84,239,.22); animation: float-soft 5s ease-in-out infinite; }
.welcome-orbit { position: absolute; border: 1px solid rgba(101,84,239,.12); border-radius: 50%; pointer-events: none; }
.orbit-a { width: 190px; height: 190px; animation: orbit 17s linear infinite; }.orbit-b { width: 320px; height: 320px; border-color: rgba(69,198,222,.1); animation: orbit 24s linear infinite reverse; }
@keyframes orbit { from { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.05); } to { transform: rotate(360deg) scale(1); } }
.ai-messages { min-height: 0; padding: 10px 0 25px; background: transparent; }
.ai-messages:empty { display: none; }
.ai-messages .message { max-width: min(720px,86%); padding: 14px 16px; font-size: 13px; line-height: 1.65; animation: message-in .3s ease both; }
@keyframes message-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.ai-compose-wrap { width: min(920px, calc(100% - 44px)); margin: 0 auto; padding: 0 0 27px; }
.ai-prompts { padding: 0 0 11px; justify-content: center; }
.ai-prompts .prompt { display: inline-flex; align-items: center; gap: 6px; }
.ai-prompts .prompt svg { color: var(--primary); }
.ai-composer { position: relative; display: block; padding: 0; border: 1px solid var(--line-strong); border-radius: 17px; background: var(--surface); box-shadow: 0 10px 30px rgba(65,79,141,.08); transition: border-color .2s, box-shadow .2s, transform .2s; }
.ai-composer:focus-within { border-color: #bbb4ff; box-shadow: 0 13px 35px rgba(101,84,239,.13); transform: translateY(-1px); }
.composer-row { display: flex; align-items: end; gap: 8px; padding: 9px; }
.ai-composer textarea { min-height: 44px; max-height: 145px; padding: 11px 7px; border: 0; background: transparent; }
.attach-btn, .composer-tool, .send-btn { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; flex: 0 0 auto; transition: color .2s, background .2s, transform .2s; }
.attach-btn:hover, .composer-tool:hover { color: var(--primary); background: var(--tint); }
.attach-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.send-btn { color: white; background: linear-gradient(135deg,var(--primary),#7a68f6); }
.send-btn:hover { color: white; transform: translateY(-2px) scale(1.04); }
.composer-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px 9px; color: var(--muted); font-size: 9px; }
kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--muted); font-size: 9px; }
.attachment-strip { display: flex; gap: 7px; flex-wrap: wrap; padding: 10px 12px 0; }
.attachment-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 180px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); background: var(--tint); font-size: 10px; }
.attachment-chip img { width: 25px; height: 25px; object-fit: cover; border-radius: 5px; }
.attachment-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.attachment-chip button { display: grid; place-items: center; width: 17px; height: 17px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.attachment-chip button:hover { color: var(--red); }
.ai-dropzone.is-dragging { border-color: var(--primary); background: #f8f7ff; }
body.is-dark .ai-dropzone.is-dragging { background: #242040; }
@media (max-width: 760px) {
  body[data-page="ai"] { padding-bottom: 0; }
  body[data-page="ai"] .mobile-dock, body[data-page="ai"] .ai-fab { display: none; }
  .ai-page { min-height: calc(100vh - 64px); display: block; }
  .ai-sidebar { display: none; position: fixed; z-index: 31; inset: 64px auto 0 0; width: min(86vw,300px); box-shadow: 14px 0 35px rgba(28,34,76,.16); }
  [dir="rtl"] .ai-sidebar { inset: 64px 0 0 auto; box-shadow: -14px 0 35px rgba(28,34,76,.16); }
  .ai-sidebar.open { display: flex; animation: drawer-in .25s ease both; }
  @keyframes drawer-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
  [dir="rtl"] @keyframes drawer-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
  .ai-main { min-height: calc(100vh - 64px); }
  .ai-mobile-chatbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 54px; padding: 0 13px; border-bottom: 1px solid var(--line); background: rgba(251,252,255,.85); backdrop-filter: blur(15px); }
  body.is-dark .ai-mobile-chatbar { background: rgba(17,23,43,.88); }
  .ai-model-name { display: flex; align-items: center; gap: 7px; font-size: 12px; }
  .mini-mark { width: 22px; height: 22px; border-radius: 7px; }
  .ai-main-head { display: none; }
  .ai-chat-stage, .ai-compose-wrap { width: calc(100% - 24px); }
  .ai-chat-stage { min-height: calc(100vh - 230px); }
  .chat-welcome { min-height: 270px; padding-top: 54px; }
  .ai-messages .message { max-width: 91%; font-size: 12px; }
  .ai-compose-wrap { padding-bottom: 12px; }
  .ai-prompts { justify-content: start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 10px; scrollbar-width: none; }
  .ai-prompts::-webkit-scrollbar { display: none; }
  .ai-prompts .prompt { flex: 0 0 auto; white-space: nowrap; }
  .composer-meta { font-size: 8px; }
  .composer-meta span:first-child { display: none; }
  .composer-meta span:last-child { margin: 0 auto; }
}

/* Quantora visual refinement */
:root {
  --paper: #f7f9fd;
  --surface: #ffffff;
  --tint: #f1f0ff;
  --line: #e4e8f2;
  --line-strong: #d4daea;
  --ink: #11182f;
  --ink-soft: #46516e;
  --muted: #7d88a4;
  --shadow: 0 22px 70px rgba(42, 57, 113, .11);
  --shadow-soft: 0 10px 32px rgba(42, 57, 113, .07);
  --radius: 20px;
}
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(73, 198, 222, .07), transparent 25rem),
    radial-gradient(circle at 100% 15%, rgba(101, 84, 239, .06), transparent 27rem),
    var(--paper);
}
body::selection { color: #fff; background: var(--primary); }
body.is-dark {
  --paper: #0d1324;
  --surface: #151d33;
  --tint: #222849;
  --line: #29344e;
  --line-strong: #3b4764;
  --ink: #f7f8ff;
  --ink-soft: #c4cbe0;
  --muted: #929db7;
  background:
    radial-gradient(circle at 0% 0%, rgba(69, 198, 222, .08), transparent 24rem),
    radial-gradient(circle at 100% 20%, rgba(101, 84, 239, .10), transparent 28rem),
    var(--paper);
}
.topbar {
  height: 76px;
  padding-inline: clamp(20px, 4.5vw, 72px);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  border-bottom-color: color-mix(in srgb, var(--line) 76%, transparent);
}
.brand { gap: 11px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 10px;
  box-shadow: 0 8px 20px rgba(101,84,239,.23);
}
.brand-name { font-size: 19px; }
.topnav { gap: 25px; font-size: 12px; }
.topnav a { position: relative; padding-block: 26px; }
.topnav a.active::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 2px;
  border-radius: 2px; background: var(--primary); transition: left .2s, right .2s;
}
.topnav a.active::after { left: 0; right: 0; }
.icon-btn, .avatar-btn { width: 37px; height: 37px; }
.lang-btn { height: 37px; padding-inline: 12px; }
.page-shell { min-height: calc(100vh - 76px); }
.side-rail {
  position: sticky; top: 76px; width: 248px; height: calc(100vh - 76px);
  padding: 30px 16px 22px; background: color-mix(in srgb, var(--surface) 72%, transparent);
}
.rail-label { margin-top: 15px; padding-inline: 14px; }
.rail-link { min-height: 43px; padding-inline: 14px; border-radius: 12px; }
.rail-link.active {
  background: linear-gradient(100deg, #eeecff, #f8f8ff);
  box-shadow: inset 3px 0 0 var(--primary);
}
body.is-dark .rail-link.active { background: linear-gradient(100deg, #2a2854, #202642); }
[dir="rtl"] .rail-link.active { box-shadow: inset -3px 0 0 var(--primary); }
.workspace { padding: 44px clamp(22px, 4.5vw, 72px) 52px; }
.container { width: min(1240px, 100%); }
.hero {
  min-height: 450px; padding: clamp(38px, 7vw, 86px);
  border-radius: 30px; border-color: rgba(213, 219, 237, .88);
  background:
    linear-gradient(120deg, rgba(255,255,255,.94), rgba(246,245,255,.91) 58%, rgba(239,252,255,.94)),
    var(--surface);
}
body.is-dark .hero { border-color: var(--line); }
.eyebrow { letter-spacing: .17em; }
h1 { letter-spacing: -.072em; }
h2, h3 { letter-spacing: -.065em; }
.hero-copy { max-width: 680px; color: var(--ink-soft); }
.hero-actions { gap: 11px; margin-top: 30px; }
.btn {
  min-height: 44px; padding-inline: 17px; border-radius: 12px;
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
}
.btn-primary { box-shadow: 0 8px 18px rgba(101,84,239,.2); }
.btn-secondary { border-color: #d9d8fa; }
.btn-secondary:hover { border-color: var(--primary); background: var(--tint); }
.section { padding-top: 46px; }
.section-head { margin-bottom: 20px; }
.section-head h2 { margin-bottom: 5px; }
.grid { gap: 16px; }
.card {
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-soft);
  transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s, border-color .24s;
}
.card:hover { box-shadow: var(--shadow); border-color: #d6d2ff; }
.tool-card {
  min-height: 176px;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--tint) 38%, var(--surface)));
}
.tool-card h3 { font-size: 16px; }
.tool-card p { max-width: 190px; line-height: 1.55; }
.tool-icon { width: 42px; height: 42px; border-radius: 13px; margin-bottom: 20px; }
.stat-row { gap: 13px; margin-top: 26px; }
.stat {
  padding: 17px 18px; border-radius: 15px;
  background: rgba(255,255,255,.68); border-color: rgba(214,220,238,.92);
  transition: transform .2s, background .2s;
}
.stat:hover { transform: translateY(-3px); background: rgba(255,255,255,.92); }
body.is-dark .stat:hover { background: rgba(255,255,255,.08); }
.stat b { font-size: 24px; }
.list-item { padding-block: 15px; }
.list-icon { width: 37px; height: 37px; border-radius: 11px; }
.page-title { margin-bottom: 34px; }
.page-title h1 { margin-top: 8px; }
.page-title p { font-size: 13px; line-height: 1.7; }
.searchbox {
  min-height: 50px; border-radius: 13px; background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.field { gap: 7px; margin-bottom: 16px; }
.field input, .field textarea, .field select {
  min-height: 44px; border-radius: 12px; padding-inline: 13px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 116px; }
.tool-layout { gap: 18px; }
.tool-nav { gap: 8px; }
.tool-tab {
  min-height: 62px; padding: 14px; border-radius: 13px;
  transition: transform .2s, color .2s, border-color .2s, background .2s;
}
.tool-tab:hover { transform: translateX(3px); border-color: #cbc6ff; }
[dir="rtl"] .tool-tab:hover { transform: translateX(-3px); }
.tool-tab span { min-width: 0; }
.tool-tab b, .tool-tab small { display: block; }
.tool-tab small { margin-top: 3px; font-size: 10px; }
.result-box { border-radius: 15px; padding: 20px; }
.price-card { min-height: 92px; border-radius: 16px; }
.product-image { width: 60px; height: 60px; border-radius: 15px; }
.filters { margin-block: 19px; }
.filter-chip { min-height: 34px; padding-inline: 14px; transition: transform .2s, color .2s, background .2s; }
.filter-chip:hover { transform: translateY(-2px); color: var(--primary); }
.footer { padding-top: 42px; }
.toast { bottom: 28px; border: 1px solid rgba(255,255,255,.12); }
.auth-wrap { min-height: calc(100vh - 76px); }
.auth-card { border-radius: 22px; box-shadow: var(--shadow); }
@media (max-width: 1080px) {
  .side-rail { width: 220px; }
  .workspace { padding-inline: 28px; }
  .topnav { gap: 15px; }
}
@media (max-width: 760px) {
  .topbar { height: 66px; padding-inline: 15px; }
  .topnav { top: 61px; border-radius: 15px; }
  .topnav a { padding: 12px; }
  .page-shell { min-height: calc(100vh - 66px); }
  .workspace { padding: 24px 15px 34px; }
  .hero { min-height: 540px; padding: 30px 22px; border-radius: 24px; }
  .hero-copy { line-height: 1.7; }
  .hero-actions { margin-top: 24px; }
  .section { padding-top: 34px; }
  .section-head { align-items: start; margin-bottom: 15px; }
  .card { padding: 18px; }
  .tool-card { min-height: 152px; }
  .tool-icon { margin-bottom: 15px; }
  .page-title { margin-bottom: 24px; }
  .page-title h1 { font-size: 35px; }
  .stat { padding: 15px; }
  .footer { padding-top: 30px; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 17px; }
  .top-actions .icon-btn { width: 34px; height: 34px; }
  .hero { min-height: 530px; }
  h1 { font-size: 42px; }
  .grid-4 { gap: 9px; }
  .tool-card h3 { font-size: 13px; }
  .tool-card p { font-size: 10px; }
}