:root {
  --bg: #f6f8fc; --surface: #ffffff; --alt: #eef2fa; --ink: #0f172a; --muted: #5b6b86; --line: #dde4f0;
  --blue: #2563eb; --blue-dark: #1d3fb8; --blue-light: #4f9cff; --teal: #2de0c4; --wa: #25d366;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --font: "Inter", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #111a2e; --alt: #0e1628; --ink: #e8eefc; --muted: #9db0d0; --line: #22304d;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
html[dir="rtl"] { --font: "Cairo", "Inter", system-ui, "Segoe UI", sans-serif; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }

/* navigation */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; text-decoration: none; }
.links { display: flex; gap: 22px; margin-inline-start: 16px; }
.links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.links a:hover { color: var(--ink); }
.nav-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.chip { font: inherit; font-weight: 600; font-size: .9rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--blue); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; font-weight: 700; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; font-size: 1rem; }
.btn-primary { background: linear-gradient(135deg, var(--blue-light), var(--blue-dark)); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .35); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.95); }
.btn:focus-visible, .chip:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }

/* hero */
.hero { padding: 56px 0 40px; background: radial-gradient(900px 400px at 85% -10%, rgba(79, 156, 255, .22), transparent 60%), radial-gradient(700px 360px at 0% 10%, rgba(45, 224, 196, .14), transparent 60%); }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(45, 224, 196, .25); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; margin: 18px 0 16px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.fine { color: var(--muted); font-size: .92rem; }
.fine.center { text-align: center; margin-top: 18px; }
.hero-art svg { width: 100%; height: auto; direction: ltr; }
.art-win { fill: var(--surface); stroke: var(--line); }
.art-bar { fill: var(--alt); }
.art-name { font: 800 36px var(--font); fill: var(--ink); }
.art-badge { fill: rgba(45, 224, 196, .18); stroke: var(--teal); }
.art-ver { font: 700 17px var(--font); fill: var(--ink); }
.art-tile { fill: var(--alt); stroke: var(--line); }
.art-line { fill: var(--line); }
.art-teal { fill: var(--teal); }
.art-ink { fill: var(--ink); opacity: .85; }
.art-rows rect { fill: var(--line); }
.art-receipt { fill: var(--bg); stroke: var(--line); }

.strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 22px 0; }
.strip-in div { display: grid; gap: 2px; }
.strip-in strong { font-weight: 700; }
.strip-in span { color: var(--muted); font-size: .92rem; }

/* sections */
.sec { padding: 72px 0; }
.sec.alt { background: var(--alt); }
.sub { color: var(--muted); font-size: 1.05rem; margin-top: 10px; max-width: 42em; }
.grid { display: grid; gap: 18px; margin-top: 34px; }
.cards { grid-template-columns: repeat(4, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 8px; align-content: start; }
.card p { color: var(--muted); font-size: .95rem; }
.ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(79, 156, 255, .25), rgba(45, 224, 196, .25)); font-size: 1.3rem; }
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-inline-start: 34px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; background: var(--teal) no-repeat center / 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.6 2.6L10 3.5' fill='none' stroke='%230b1220' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); overflow: hidden; }
.stats div { background: var(--surface); padding: 26px; display: grid; gap: 2px; }
.stats b { font-size: 2.4rem; font-weight: 800; background: linear-gradient(135deg, var(--blue-light), var(--blue-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { color: var(--muted); }

/* pricing */
.notice { display: inline-block; margin-top: 16px; padding: 6px 14px; border-radius: 10px; background: rgba(255, 193, 7, .16); border: 1px solid rgba(255, 193, 7, .5); font-size: .9rem; }
.plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 16px; align-content: start; box-shadow: var(--shadow); }
.plan.popular { border: 2px solid var(--blue); }
.badge { position: absolute; top: -13px; inset-inline-start: 24px; background: var(--blue); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.limits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; border-radius: 12px; background: var(--alt); font-size: .92rem; }
.limits b { display: block; font-size: 1.15rem; }
.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .95rem; }
.feat li { position: relative; padding-inline-start: 26px; }
.feat li::before { content: ""; position: absolute; inset-inline-start: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%; background: var(--teal); }
.feat li.off { color: var(--muted); text-decoration: line-through; opacity: .7; }
.feat li.off::before { background: var(--line); }

/* contact and footer */
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.contact-card strong { font-size: 1.3rem; }
.contact-card span { color: var(--muted); margin-bottom: 8px; }
.phone { text-align: center; font-weight: 700; color: var(--blue); text-decoration: none; margin-top: 6px; unicode-bidi: isolate; }
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding: 22px 0; color: var(--muted); font-size: .92rem; }

/* sign-in page */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(800px 400px at 80% -10%, rgba(79, 156, 255, .22), transparent 60%), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.auth-card .brand { justify-content: center; }
.auth-card h1 { font-size: 1.4rem; text-align: center; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; }
.field input { font: inherit; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.field input:focus { border-color: var(--blue); }
.msg { min-height: 1.4em; font-size: .92rem; color: #b91c1c; text-align: center; }
.msg.info { color: var(--muted); }
.auth-card .back { text-align: center; color: var(--muted); font-size: .92rem; }

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards.three, .plans { grid-template-columns: 1fr; }
  .hero-in, .two, .contact { grid-template-columns: 1fr; }
  .strip-in { grid-template-columns: 1fr 1fr; }
  .links { display: none; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .strip-in { grid-template-columns: 1fr; }
  .sec { padding: 52px 0; }
  .btn-ghost[href="/login"] { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.auth-card .chip { justify-self: center; }
.narrow { width: min(560px, 100% - 32px); }
.form { padding: 28px; display: grid; gap: 18px; margin-top: 22px; }
.msg.good { color: #15803d; }
[hidden] { display: none !important; }

/* console data pages */
.nav.console .nav-in { flex-wrap: wrap; height: auto; min-height: 64px; padding-block: 8px; row-gap: 6px; }
.links.cnav { display: flex; gap: 6px; margin-inline-start: 12px; }
.cnav a { padding: 7px 14px; border-radius: 999px; }
.cnav a[aria-current="page"] { background: var(--alt); color: var(--ink); font-weight: 700; }
.blk { margin: 34px 0 12px; font-size: 1.2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 26px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 2px; box-shadow: var(--shadow); border-inline-start: 4px solid var(--line); }
.stat b { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .88rem; }
.stat-good { border-inline-start-color: var(--teal); } .stat-warn { border-inline-start-color: #f59e0b; } .stat-bad { border-inline-start-color: #ef4444; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .82rem; background: var(--alt); }
tr:last-child td { border-bottom: 0; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; color: var(--muted); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--alt); color: var(--muted); }
.tag-good { background: rgba(45, 224, 196, .18); color: #0f766e; } .tag-warn { background: rgba(245, 158, 11, .18); color: #b45309; } .tag-bad { background: rgba(239, 68, 68, .16); color: #b91c1c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag-good { color: #5eead4; } :root:not([data-theme="light"]) .tag-warn { color: #fbbf24; } :root:not([data-theme="light"]) .tag-bad { color: #fca5a5; } }
.notice.bad { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .5); }
.toolbar { margin: 22px 0 16px; display: flex; gap: 12px; }
.toolbar input, .toolbar select { font: inherit; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-width: 260px; }
.stack { display: grid; gap: 16px; }
.cust { display: block; }
.cust-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
@media (max-width: 960px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
