:root {
  --navy: #0F172A;
  --ink: #1E293B;
  --muted: #64748B;
  --line: #E2E8F0;
  --bg: #F8FAFC;
  --blue: #2563EB;
  --blue-d: #1D4ED8;
  --blue-l: #DBEAFE;
  --orange: #F97316;
  --orange-d: #C2410C;
  --ok: #16A34A;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(15 23 42 / .06), 0 8px 24px rgb(15 23 42 / .08);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; line-height: 1.6; -webkit-font-smoothing: antialiased; }
html[dir="rtl"] body { font-family: var(--font-ar); }
img, svg { display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; margin: 0; }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; cursor: pointer; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 14px 26px; font-size: 17px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgb(249 115 22 / .35); }
.btn-primary:hover { background: #EA580C; transform: translateY(-1px); }
.btn-ghost { color: var(--navy); border-color: var(--line); background: #fff; }
.btn-ghost:hover { border-color: #CBD5E1; }
.btn .win { width: 20px; height: 20px; fill: currentColor; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .85); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 20px; letter-spacing: -.3px; direction: ltr; }
.brand b { color: var(--orange); font-weight: 600; }
.brand.small { font-size: 16px; gap: 8px; }
.nav-links { display: flex; gap: 22px; margin-inline-start: auto; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--blue); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle { min-width: 40px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: 600 15px var(--font-ar); color: var(--navy); cursor: pointer; }
.lang-toggle:hover { border-color: var(--blue); color: var(--blue); }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 50% -10%, #DBEAFE 0%, rgb(219 234 254 / 0) 70%), linear-gradient(#fff, var(--bg)); padding: 84px 0 64px; text-align: center; }
.eyebrow { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--blue-d); font-weight: 600; font-size: 14px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); letter-spacing: -1.2px; max-width: 880px; margin-inline: auto; }
html[dir="rtl"] .hero h1 { letter-spacing: 0; line-height: 1.35; }
.accent { background: linear-gradient(90deg, var(--blue), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 720px; margin: 22px auto 32px; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.release-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.release-meta span + span::before { content: "•"; margin-inline-end: 18px; color: #CBD5E1; }

/* Sections */
.section { padding: 88px 0; }
.section-title { font-size: clamp(28px, 3.4vw, 40px); text-align: center; letter-spacing: -.6px; }
html[dir="rtl"] .section-title { letter-spacing: 0; }
.section-lead { text-align: center; color: var(--muted); margin: 12px 0 0; }

/* Preview / mockups */
.preview { background: var(--bg); padding-top: 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 32px 0 24px; }
.tabs button { font: 600 15px inherit; font-family: inherit; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.mock-note { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }

.window { font-family: var(--font); text-align: left; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 30px 80px rgb(15 23 42 / .18), 0 0 0 1px rgb(15 23 42 / .08); max-width: 1000px; margin-inline: auto; font-size: 14px; }
.titlebar { display: flex; align-items: center; gap: 8px; height: 36px; padding-inline: 12px 0; background: #F1F5F9; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 12.5px; }
.titlebar .ctl { margin-left: auto; display: flex; font-style: normal; }
.titlebar .ctl b { width: 44px; text-align: center; font-weight: 400; color: var(--muted); }
.app { display: grid; grid-template-columns: 170px 1fr; min-height: 420px; }
.side { background: var(--navy); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.side span { color: #CBD5E1; padding: 8px 12px; border-radius: 8px; font-size: 13.5px; }
.side span.on { background: var(--blue); color: #fff; font-weight: 600; }
.panel { padding: 20px; background: var(--bg); min-width: 0; }
.panel[hidden] { display: none; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi strong { font-size: 20px; color: var(--navy); }
.kpi em { font-style: normal; font-size: 12px; color: var(--muted); }
.kpi em.up { color: var(--ok); font-weight: 600; }
.kpi.warn strong { color: var(--orange-d); }
.row2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-top: 12px; }
.panel > .row2:first-child { margin-top: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card h4 { font-size: 13.5px; margin-bottom: 12px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-bottom: 20px; }
.bars span { flex: 1; height: var(--h); background: var(--blue-l); border-radius: 6px 6px 2px 2px; position: relative; }
.bars span.today { background: var(--orange); }
.bars i { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 11px; color: var(--muted); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #F1F5F9; font-size: 13px; }
.list li:last-child { border-bottom: 0; }
.list b { white-space: nowrap; color: var(--navy); }
.form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.form label { display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted); }
.form span { margin-top: 3px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--navy); font-size: 13.5px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #F1F5F9; white-space: nowrap; }
th { background: #F8FAFC; color: var(--muted); font-weight: 600; font-size: 12px; }
td:nth-child(n+2):not(:has(.tag)), th:nth-child(n+2) { text-align: right; }
#panel-stock td:nth-child(2), #panel-stock th:nth-child(2) { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; color: var(--muted); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.ok { background: #DCFCE7; color: #166534; }
.tag.low { background: #FFEDD5; color: var(--orange-d); }
.inv-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns .b { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--blue-d); }
.totals { display: grid; grid-template-columns: auto auto; gap: 4px 28px; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; font-size: 13.5px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; color: var(--navy); }
.totals .g { font-weight: 700; color: var(--navy); font-size: 15px; border-top: 1px solid var(--line); padding-top: 6px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.search { flex: 1 1 240px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--muted); font-size: 13px; }
.chip { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; }
.chip.on { background: var(--blue-l); border-color: #BFDBFE; color: var(--blue-d); font-weight: 600; }
.donut-row { display: flex; align-items: center; gap: 24px; min-height: 180px; }
.donut { width: 150px; height: 150px; flex: none; border-radius: 50%; background: conic-gradient(var(--blue) 0 62%, var(--orange) 62% 90%, #94A3B8 90% 100%); -webkit-mask: radial-gradient(circle, transparent 46%, #000 47%); mask: radial-gradient(circle, transparent 46%, #000 47%); }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 13.5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.legend .c1 { background: var(--blue); } .legend .c2 { background: var(--orange); } .legend .c3 { background: #94A3B8; }

/* Features */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.feat { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: #fff; transition: box-shadow .2s, transform .2s; }
.feat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feat svg { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--blue-l); stroke: var(--blue-d); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 16px; }
.feat:nth-child(3n+2) svg { background: #FFEDD5; stroke: var(--orange-d); }
.feat h3 { font-size: 18px; margin-bottom: 8px; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; }

/* Install */
.install { background: var(--bg); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 14px; }
.steps h3 { font-size: 18px; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
.integrity { text-align: center; color: var(--muted); font-size: 13px; margin: 28px 0 0; word-break: break-all; }
.integrity code { font-family: Consolas, "Cascadia Mono", monospace; color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.copy { margin-inline-start: 6px; font: inherit; font-weight: 600; color: var(--blue); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 2px 10px; cursor: pointer; }

/* News */
.notes { max-width: 760px; margin: 40px auto 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); }
.notes .notes-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.notes .notes-head h3 { font-size: 22px; }
.notes .notes-head time { color: var(--muted); font-size: 14px; }
.notes h4 { font-size: 16px; margin: 20px 0 6px; }
.notes ul { padding-inline-start: 20px; margin: 6px 0; }
.notes li { margin: 4px 0; color: var(--ink); }
.notes p { color: var(--ink); }
.notes code { background: #F1F5F9; padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.notes .body { max-height: 360px; overflow: hidden; position: relative; }
.notes .body.open { max-height: none; }
.notes .body:not(.open)::after { content: ""; position: absolute; inset: auto 0 0; height: 80px; background: linear-gradient(rgb(255 255 255 / 0), #fff); }
.notes .more { margin-top: 12px; font: inherit; font-weight: 600; color: var(--blue); background: none; border: 0; cursor: pointer; padding: 0; }
.all-releases { text-align: center; margin: 20px 0 0; }

/* Contact */
.contact-inner { text-align: center; }
.contact-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.contact-links a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--navy); font-weight: 600; }
.contact-links a:hover { border-color: var(--blue); color: var(--blue); }

/* Final CTA + footer */
.final-cta { background: linear-gradient(135deg, var(--blue-d), var(--blue) 60%, #3B82F6); padding: 72px 0; text-align: center; }
.final-cta h2 { color: #fff; font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 26px; }
.footer { background: var(--navy); color: #94A3B8; padding: 28px 0; font-size: 14px; }
.footer-inner { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.footer .brand { color: #fff; }
.footer a { color: #CBD5E1; }

/* Responsive */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-actions { margin-inline-start: auto; }
  .grid, .steps { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
}
@media (max-width: 640px) {
  .hero { padding: 56px 0 44px; }
  .section { padding: 64px 0; }
  .grid, .steps, .row2 { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr 1fr; }
  .btn-lg { width: 100%; justify-content: center; }
  .notes { padding: 22px 20px; }
  .titlebar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .titlebar .ctl b { width: 32px; }
  .release-meta span + span::before { content: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .feat { transition: none; }
}
