/* ZKJ SYSTEM — shared styles (site + live demo dashboard) */

:root {
  --bg: #0B0B0F;
  --panel: #15151B;
  --panel-2: #1C1C24;
  --line: #2A2A35;
  --line-strong: #3A3A47;
  --accent: #F5C518;
  --accent-ink: #0B0B0F;
  --accent-soft: rgba(245, 197, 24, .12);
  --muted: #9AA0A6;
  --text: #FFFFFF;
  --text-2: #D5D8DC;
  --grid: rgba(154, 160, 166, .06);
  --grid-major: rgba(245, 197, 24, .05);
  --ok: #22C55E;
  --warn: #F59E0B;
  --bad: #EF4444;
  --off: #8A9099;
  --shadow: 0 20px 50px rgba(0, 0, 0, .45);
  --cut: 14px;
  --radius: 4px;
  --max: 1200px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Tajawal", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.75; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] .display { font-family: var(--font-ar); letter-spacing: 0; }

img, svg, video { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px; font-weight: 700;
}
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
@media (max-width: 420px) { .container { padding-inline: 16px; } }

/* ---------- Wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; direction: ltr; }
.wordmark svg { width: 34px; height: 34px; flex: none; }
.wordmark .wm-text { display: flex; flex-direction: column; line-height: 1; }
.wordmark .wm-main { font-family: var(--font-display); font-weight: 700; letter-spacing: .18em; font-size: 15px; }
.wordmark .wm-sub { font-family: var(--font-display); font-weight: 600; letter-spacing: .42em; font-size: 10px; color: var(--accent); margin-top: 5px; }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: transparent; --b-fg: var(--text); --b-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  background: var(--b-bg); color: var(--b-fg);
  border: 1px solid var(--b-line); border-radius: var(--radius);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); clip-path: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-line: var(--accent); }
.btn-primary:hover { --b-bg: #ffd43b; }
.btn-primary:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-ink), 0 0 0 2px var(--accent); }
.btn-wa { --b-bg: #1FAF5A; --b-fg: #fff; --b-line: #1FAF5A; }
.btn-wa:hover { --b-bg: #17944b; border-color: #17944b; }
.btn-ghost { --b-line: var(--line-strong); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--text); cursor: pointer; position: relative;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent);
  border-radius: var(--radius); font-weight: 700; cursor: pointer; font-size: 15px;
}
.lang-toggle:hover { background: var(--accent); color: var(--accent-ink); }
.lang-toggle .lt-ar { font-family: var(--font-ar); }

/* ---------- Plates (engineered / chamfered panels) ---------- */
.plate {
  position: relative; isolation: isolate;
  background: var(--line);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  padding: 24px;
}
.plate::before {
  content: ""; position: absolute; inset: 1px; z-index: -1;
  background: var(--panel);
  clip-path: polygon(calc(var(--cut) - .4px) 0, 100% 0, 100% calc(100% - var(--cut) + .4px), calc(100% - var(--cut) + .4px) 100%, 0 100%, 0 calc(var(--cut) - .4px));
}
.plate.is-accent { background: linear-gradient(135deg, var(--accent), var(--line) 45%); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); direction: ltr;
}
html[lang="ar"] .tag { letter-spacing: .04em; }
.tag::before { content: ""; width: 14px; height: 1px; background: var(--accent); }

/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 15, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.site-nav { margin-inline-start: auto; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 8px 12px; color: var(--text-2); text-decoration: none; font-size: 15px; border-radius: var(--radius); }
.site-nav a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
@media (max-width: 980px) {
  .site-nav { position: absolute; top: 100%; inset-inline: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; margin: 0; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .site-nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-grid; }
  .header-actions { margin-inline-start: auto; }
  .header-actions .btn-enquire-top { display: none; }
}

/* ---------- Sections ---------- */
section { padding: 88px 0; position: relative; }
@media (max-width: 700px) { section { padding: 60px 0; } }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { color: var(--muted); font-size: 18px; }
.eyebrow { color: var(--accent); font-family: var(--font-display); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; margin-bottom: 14px; display: block; }
html[lang="ar"] .eyebrow { letter-spacing: .02em; font-family: var(--font-ar); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 80px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 700; margin-bottom: 20px; }
.hero h1 .hl { color: var(--accent); }
.hero .lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); max-width: 620px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.hero-facts li { border-inline-start: 2px solid var(--accent); padding-inline-start: 12px; }
.hero-facts strong { display: block; font-family: var(--font-display); font-size: 22px; }
.hero-facts span { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; }
html[lang="ar"] .hero-facts strong { font-family: var(--font-ar); }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero-ctas .btn { flex: 1 1 100%; } }

/* hero mock */
.mock { padding: 0; box-shadow: var(--shadow); }
.mock-inner { padding: 18px; }
.mock-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.mock-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; min-width: 0; }
.mock-logo { width: 30px; height: 30px; border-radius: 50%; background: #C8853B; display: grid; place-items: center; color: #2B1A12; flex: none; }
.mock-logo svg { width: 18px; height: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid currentColor; white-space: nowrap; }
.pill-demo { color: var(--accent); background: var(--accent-soft); }
.mock-rows { display: grid; gap: 8px; }
.mock-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.mock-row small { color: var(--muted); display: block; font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(239, 68, 68, .18); }
.dot.off { background: var(--off); }
.mock-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }

/* ---------- Audience strip ---------- */
.audience { padding: 28px 0; border-block: 1px solid var(--line); background: rgba(21, 21, 27, .6); }
.audience .container { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.audience p { margin: 0; color: var(--muted); font-size: 14px; }
.audience ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.audience li { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; color: var(--text-2); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { position: relative; }
.steps .num { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .12em; display: block; margin-bottom: 18px; direction: ltr; text-align: start; }
.steps h3 { font-size: 20px; }
.steps p { color: var(--muted); margin: 0; font-size: 15px; }
.steps .plate { height: 100%; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Tools grid ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-card { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.tool-card .tool-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--accent); border: 1px solid var(--line-strong); background: var(--accent-soft); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.tool-card .tool-icon svg { width: 24px; height: 24px; }
.tool-card h3 { font-size: 21px; margin: 4px 0 0; }
.tool-card .tool-tag { color: var(--text); font-weight: 600; margin: 0; }
.tool-card .tool-desc { color: var(--muted); font-size: 15px; margin: 0; }
.tool-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.tool-card ul li { display: flex; gap: 8px; align-items: flex-start; }
.tool-card ul li::before { content: ""; width: 6px; height: 6px; margin-top: .62em; background: var(--accent); transform: rotate(45deg); flex: none; }
.tool-card .btn { margin-top: auto; align-self: flex-start; }
.tool-card .tool-id { position: absolute; top: 16px; inset-inline-end: 22px; }
.tools-grid > li { list-style: none; }
.tools-grid { padding: 0; margin: 0; }
@media (max-width: 980px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tools-grid { grid-template-columns: 1fr; } }

/* ---------- Tool groups ---------- */
.tool-groups { display: grid; gap: 44px; }
.group-head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 14px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.group-head h3 { font-size: 24px; margin: 0; }
.group-head p { grid-column: 1 / -1; margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.check-group { display: grid; gap: 6px; margin-bottom: 10px; }
.check-group-label { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
html[lang="ar"] .check-group-label { letter-spacing: 0; }

/* ---------- Safety ---------- */
.safety { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.safety .num { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .12em; display: block; margin-bottom: 14px; direction: ltr; text-align: start; }
.safety h3 { font-size: 19px; }
.safety p { color: var(--muted); margin: 0; font-size: 15px; }
.safety .api-list { margin-top: 12px; color: var(--text-2); font-size: 13px; font-weight: 600; text-align: start; }
@media (max-width: 1000px) { .safety { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .safety { grid-template-columns: 1fr; } }

/* ---------- Packages ---------- */
.packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pkg { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.pkg h3 { font-size: 26px; margin: 0; }
.pkg .pkg-reach { font-family: var(--font-display); color: var(--accent); font-weight: 600; font-size: 17px; }
html[lang="ar"] .pkg .pkg-reach { font-family: var(--font-ar); }
.pkg p { color: var(--muted); margin: 0; font-size: 15px; }
.pkg ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; }
.pkg ul li { display: flex; gap: 10px; }
.pkg ul li svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 3px; }
.pkg .btn { margin-top: auto; }
.pkg-note { margin-top: 24px; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .packages { grid-template-columns: 1fr; } }

/* ---------- Demo teaser ---------- */
.demo-teaser .plate { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 36px; }
.demo-teaser h2 { font-size: clamp(24px, 3vw, 34px); }
.demo-teaser p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .demo-teaser .plate { grid-template-columns: 1fr; padding: 26px; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { cursor: pointer; padding: 18px 20px; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] { border-color: var(--line-strong); }
.faq .answer { padding: 0 20px 18px; color: var(--text-2); }
.faq .answer p { margin: 0; }

/* ---------- Enquiry ---------- */
.enquire-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 24px; align-items: start; }
@media (max-width: 980px) { .enquire-grid { grid-template-columns: 1fr; } }
.channels { display: grid; gap: 12px; }
.channel { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 20px; }
.channel .ch-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line-strong); }
.channel .ch-icon svg { width: 22px; height: 22px; }
.channel h3 { font-size: 18px; margin: 0 0 4px; }
.channel p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.context-chip { display: none; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--text); border-radius: 999px; font-size: 14px; margin-bottom: 16px; max-width: 100%; }
html[dir="rtl"] .context-chip { padding: 6px 12px 6px 6px; }
.context-chip.show { display: inline-flex; }
.context-chip strong { color: var(--accent); }
.context-chip button { background: transparent; border: 0; color: var(--text); cursor: pointer; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.context-chip button:hover { background: rgba(255, 255, 255, .08); }
.context-chip span { overflow: hidden; text-overflow: ellipsis; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 600; font-size: 14px; color: var(--text-2); padding: 0; }
.field .req { color: var(--accent); }
.input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--text);
}
.field textarea { min-height: 120px; resize: vertical; }
.input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--bad); }
.field .err { color: #FF8A8A; font-size: 13px; min-height: 0; }
.field .err:empty { display: none; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.check span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 14px; background: var(--bg); }
.check span::before { content: ""; width: 14px; height: 14px; border: 1px solid var(--muted); border-radius: 2px; flex: none; }
.check input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.check input:checked + span::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--bg); }
.check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); opacity: 0; pointer-events: none; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); display: none; font-weight: 500; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(34, 197, 94, .1); border: 1px solid var(--ok); color: #B7F5CD; }
.form-status.error { background: rgba(239, 68, 68, .1); border: 1px solid var(--bad); color: #FFC4C4; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.form-actions small { color: var(--muted); }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .form-actions .btn { width: 100%; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 96px; background: rgba(11, 11, 15, .9); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
html[lang="ar"] .site-footer h4 { letter-spacing: 0; font-family: var(--font-ar); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .brandline { color: var(--muted); margin-top: 14px; font-size: 14px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #1FAF5A; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 4px rgba(31, 175, 90, .2);
  text-decoration: none;
}
.wa-float:hover { background: #17944b; }
.wa-float svg { width: 30px; height: 30px; }
.wa-float:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 92px; inset-inline-end: 20px; z-index: 300; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line-strong); border-inline-start: 4px solid var(--accent);
  padding: 12px 14px; border-radius: var(--radius); box-shadow: var(--shadow); font-size: 14px;
  animation: toast-in .25s ease-out; pointer-events: auto;
}
.toast.ok { border-inline-start-color: var(--ok); }
.toast.warn { border-inline-start-color: var(--warn); }
.toast.bad { border-inline-start-color: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 404 ---------- */
.nf { min-height: calc(100vh - 69px); display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.nf .code { font-family: var(--font-display); font-size: clamp(72px, 16vw, 140px); font-weight: 700; color: var(--accent); line-height: 1; direction: ltr; }
.nf p { color: var(--muted); }
.nf .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* =========================================================
   LIVE DEMO DASHBOARD
   ========================================================= */
.dash {
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
}
.dash-cols.single { grid-template-columns: 1fr; }
.approvals { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.dash[data-theme="brand"] {
  --bg: #F4ECE1;
  --panel: #FFFFFF;
  --panel-2: #FAF5EE;
  --line: #E2D4C1;
  --line-strong: #CDB89D;
  --accent: #9A5426;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(154, 84, 38, .10);
  --muted: #6B5646;
  --text: #2A1910;
  --text-2: #4A3426;
  --grid: rgba(122, 82, 50, .06);
  --grid-major: rgba(154, 84, 38, .06);
  --ok: #15803D;
  --warn: #B45309;
  --bad: #B91C1C;
  --off: #6B7280;
  --shadow: 0 16px 40px rgba(72, 44, 24, .16);
  color-scheme: light;
}
.dash[data-theme="brand"] .btn-primary:hover { --b-bg: #7f431c; }
.dash[data-theme="brand"] .dash-header { background: rgba(42, 25, 16, .97); }
.dash[data-theme="brand"] .dash-header { --text: #FFF8EE; --muted: #D9C5AE; --line-strong: #6A4A33; --accent: #E0A56A; --accent-soft: rgba(224, 165, 106, .16); --accent-ink: #2A1910; --panel-2: #3A2418; }
.dash[data-theme="brand"] .dash-header .btn-primary:hover { --b-bg: #ecb882; }
.dash[data-theme="brand"] .toast { background: #2A1910; color: #FFF8EE; border-color: #6A4A33; }
.dash[data-theme="brand"] .wa-float:focus-visible { outline-color: #2A1910; }

.dash-header { position: sticky; top: 0; z-index: 60; background: rgba(11, 11, 15, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); color: var(--text); }
.dash-header .container { display: flex; align-items: center; gap: 12px; min-height: 68px; flex-wrap: wrap; padding-block: 10px; }
.client-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.client-logo { width: 44px; height: 44px; flex: none; }
.client-name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.client-name strong { font-size: 17px; white-space: nowrap; }
.client-name small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dash-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dash-actions .btn, .dash-actions .lang-toggle { min-height: 40px; }
.badge-count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.badge-count[hidden] { display: none; }
@media (max-width: 760px) {
  .dash-actions { width: 100%; justify-content: flex-start; }
  .dash-actions .hide-sm { display: none; }
}

.demo-banner { background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.demo-banner .container { display: flex; align-items: center; gap: 12px; padding-block: 10px; flex-wrap: wrap; font-size: 14px; }
.demo-banner p { margin: 0; flex: 1 1 260px; color: var(--text-2); }

.notif { position: relative; }
.notif-panel {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: min(360px, calc(100vw - 24px));
  background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 80;
  --text: #FFFFFF;
}
.dash[data-theme="brand"] .notif-panel { --panel: #FFFFFF; --text: #2A1910; --muted: #6B5646; --line: #E2D4C1; --line-strong: #CDB89D; --accent: #9A5426; --accent-soft: rgba(154, 84, 38, .10); --panel-2: #FAF5EE; }
.dash[data-theme="core"] .notif-panel { --panel: #15151B; }
.notif-panel[hidden] { display: none; }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notif-head strong { font-size: 15px; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font-weight: 600; font-size: 13px; padding: 6px; }
.link-btn:hover { text-decoration: underline; }
.notif-list { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow-y: auto; }
.notif-item { width: 100%; text-align: start; display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px; background: transparent; border: 0; border-radius: var(--radius); cursor: pointer; color: var(--text); }
.notif-item:hover { background: var(--panel-2); }
.notif-item .dot { margin-top: 7px; }
.notif-item p { margin: 0; font-size: 14px; line-height: 1.45; }
.notif-item small { color: var(--muted); font-size: 12px; }
.notif-item.unread p { font-weight: 600; }
.notif-item.read .dot { opacity: .35; }

.dash-main { padding: 28px 0 100px; }
.dash-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-title h1 { font-size: clamp(24px, 3vw, 32px); margin: 0; }
.dash-title p { margin: 4px 0 0; color: var(--muted); }
.dash-section { margin-top: 28px; padding: 0; }
.dash-section > .sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.dash-section > .sec-head h2 { font-size: 20px; margin: 0; }
.dash-section > .sec-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; --cut: 10px; }
.kpi .k-label { color: var(--muted); font-size: 13px; display: block; }
.kpi .k-value { font-family: var(--font-display); font-weight: 700; font-size: 28px; display: block; margin: 4px 0 2px; direction: ltr; text-align: start; }
html[lang="ar"] .kpi .k-value { text-align: right; }
.kpi .k-delta { font-size: 13px; color: var(--ok); font-weight: 600; }
.kpi .k-delta.warn { color: var(--warn); }
.kpi .k-delta.bad { color: var(--bad); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi .k-value { font-size: 24px; } }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); list-style: none; padding: 0; margin: 0; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.dtools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.dtool { padding: 16px; display: flex; flex-direction: column; gap: 10px; height: 100%; --cut: 12px; }
.dtool-head { display: flex; align-items: center; gap: 10px; }
.dtool-head .tool-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius); flex: none; }
.dtool-head .tool-icon svg { width: 20px; height: 20px; }
.dtool-head h3 { font-size: 16px; margin: 0; line-height: 1.25; }
.dtool-head .status-label { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.status-ok { color: var(--ok); } .status-warn { color: var(--warn); } .status-bad { color: var(--bad); } .status-off { color: var(--off); }
.dtool .lines { display: grid; gap: 6px; font-size: 13px; line-height: 1.45; }
.dtool .line { display: flex; gap: 8px; align-items: flex-start; }
.dtool .line .dot { width: 8px; height: 8px; margin-top: 6px; box-shadow: none; }
.dtool .line.pending { color: var(--text-2); }
.dtool .line.done { color: var(--text-2); }
.dtool .btn { margin-top: auto; align-self: flex-start; }
.dtool.state-bad { background: var(--bad); }
.dtool.state-off::before { background: var(--panel-2); }
@media (max-width: 1100px) { .dtools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dtool-groups { display: grid; gap: 22px; }
.dgroup-title { font-size: 15px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; color: var(--text); font-family: var(--font-body); }
html[lang="ar"] .dgroup-title { font-family: var(--font-ar); }
.dtool-head h4 { font-size: 16px; margin: 0; line-height: 1.25; font-family: var(--font-display); }
html[lang="ar"] .dtool-head h4 { font-family: var(--font-ar); }
.inbox-list, .ads-list { grid-template-columns: 1fr; }
.inbox-item, .ad-item { padding: 14px; display: grid; gap: 8px; --cut: 12px; }
.inbox-item.is-done, .ad-item.is-done { opacity: .85; }
.inbox-meta, .ad-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.inbox-msg { margin: 0; font-size: 15px; }
.inbox-reply { background: var(--panel-2); border: 1px solid var(--line); border-inline-start: 3px solid var(--accent); border-radius: 3px; padding: 8px 10px; font-size: 14px; display: grid; gap: 4px; }
.inbox-reply > span:first-child { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
html[lang="ar"] .inbox-reply > span:first-child { letter-spacing: 0; }
.inbox-reply .sens { font-size: 12px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.inbox-reply .sens .dot { width: 8px; height: 8px; box-shadow: none; }
.inbox-reply p { margin: 0; color: var(--text-2); }
.inbox-reply.is-sent { border-inline-start-color: var(--ok); }
.ad-item h4 { margin: 0; font-size: 16px; }
.ad-bar { height: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.ad-bar span { display: block; height: 100%; background: var(--accent); }
.ad-nums { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.ads-total { margin: 12px 0 0; font-weight: 700; font-size: 14px; }
@media (max-width: 560px) { .dtools { grid-template-columns: 1fr; } }

.dash-cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .dash-cols { grid-template-columns: 1fr; } }

.toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { min-height: 34px; padding: 4px 12px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text-2); border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip .pdot { width: 8px; height: 8px; border-radius: 50%; }

.cal-wrap { padding: 16px; --cut: 12px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-nav strong { font-size: 15px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-day { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 160px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-day h3 { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 2px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-body); }
html[lang="ar"] .cal-day h3 { font-family: var(--font-ar); letter-spacing: 0; }
.cal-item { width: 100%; text-align: start; background: var(--panel); border: 1px solid var(--line); border-inline-start: 3px solid var(--pc, var(--accent)); border-radius: 3px; padding: 6px 7px; font-size: 12px; line-height: 1.35; cursor: pointer; color: var(--text); display: grid; gap: 2px; min-width: 0; }
.cal-item:hover { border-color: var(--accent); border-inline-start-color: var(--pc, var(--accent)); }
.cal-item .ci-top { display: flex; justify-content: space-between; gap: 4px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.cal-item .ci-top span:last-child { white-space: nowrap; }
.cal-item .ci-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-item .ci-status { font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.cal-item .ci-status .dot { width: 7px; height: 7px; box-shadow: none; }
.cal-empty { color: var(--muted); font-size: 12px; font-style: italic; }
@media (max-width: 1000px) and (min-width: 701px) { .cal { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .cal { grid-template-columns: 1fr; }
  .cal-day { min-height: 0; }
}

.approvals { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.appr { padding: 14px; display: grid; grid-template-columns: 96px 1fr; gap: 14px; --cut: 12px; }
.appr-thumb { width: 96px; height: 120px; border-radius: 3px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 8px; color: #fff; font-size: 11px; font-weight: 700; }
.appr-thumb .type { background: rgba(0, 0, 0, .45); padding: 2px 6px; border-radius: 3px; }
.appr-thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.appr-body { min-width: 0; display: grid; gap: 6px; }
.appr-body h3 { font-size: 16px; margin: 0; }
.appr-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.appr-meta .src { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); }
.appr-caption { margin: 0; font-size: 14px; color: var(--text-2); }
.appr-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.appr-state { font-size: 13px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.btn-approve { --b-bg: var(--ok); --b-fg: #fff; --b-line: var(--ok); }
.btn-approve:hover { filter: brightness(1.08); border-color: var(--ok); }
.appr.is-done { opacity: .82; }
@media (max-width: 420px) { .appr { grid-template-columns: 1fr; } .appr-thumb { width: 100%; height: 110px; } }

.insight { padding: 18px; --cut: 12px; }
.bars { display: grid; gap: 8px; margin: 12px 0 16px; list-style: none; padding: 0; }
.bar-row { display: grid; grid-template-columns: 88px 1fr 52px; gap: 10px; align-items: center; font-size: 13px; }
.bar-track { height: 10px; background: var(--panel-2); border-radius: 0 4px 4px 0; overflow: hidden; border: 1px solid var(--line); }
html[dir="rtl"] .bar-track { border-radius: 4px 0 0 4px; }
.bar-fill { height: 100%; background: var(--accent); }
.bar-row .v { text-align: end; font-variant-numeric: tabular-nums; direction: ltr; color: var(--text-2); }
html[dir="rtl"] .bar-row .v { text-align: left; }
.insight-notes { display: grid; gap: 10px; }
.insight-notes div { padding: 10px 12px; border-inline-start: 3px solid var(--accent); background: var(--panel-2); font-size: 14px; border-radius: 0 3px 3px 0; }
html[dir="rtl"] .insight-notes div { border-radius: 3px 0 0 3px; }
.insight-notes strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
html[lang="ar"] .insight-notes strong { letter-spacing: 0; }

.upload { padding: 18px; --cut: 12px; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 24px 16px; text-align: center; background: var(--panel-2); transition: border-color .2s, background .2s; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { width: 34px; height: 34px; color: var(--accent); }
.dropzone p { margin: 8px 0 12px; color: var(--muted); font-size: 14px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-label { cursor: pointer; }
.file-input:focus-visible + .file-label { box-shadow: inset 0 0 0 2px var(--accent); clip-path: none; outline: 2px solid var(--accent); outline-offset: 2px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; }
.thumbs li { position: relative; aspect-ratio: 1; background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.thumbs img, .thumbs video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .kind { position: absolute; bottom: 4px; inset-inline-start: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 2px; }
.thumbs .rm { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 15px; line-height: 1; }
.thumbs .rm:focus-visible { outline: 2px solid #fff; }
.upload-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.upload-note { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

.dash-footer { border-top: 1px solid var(--line); padding: 28px 0 100px; color: var(--muted); font-size: 14px; }
.dash-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.dash-footer .wordmark { color: var(--text); }
.dash-footer .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* modal */
dialog.modal {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px);
  padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--panel); color: var(--text); box-shadow: var(--shadow);
}
dialog.modal::backdrop { background: rgba(0, 0, 0, .6); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 19px; margin: 0; }
.modal-body { padding: 18px; display: grid; gap: 12px; }
.modal-body p { margin: 0; color: var(--text-2); }
.modal-body textarea { width: 100%; min-height: 110px; padding: 10px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 18px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
