/* SAHL AI — interface styles.
   White surfaces, sand and metallic-gold accents, charcoal text.
   Arabic (RTL) is the default; every rule uses logical properties so English (LTR) mirrors cleanly. */

:root {
  color-scheme: light;
  --gold: #b3924f; --gold-deep: #86682b; --gold-ink: #6f5520;
  --gold-soft: #eadfc6; --gold-mist: #f6f0e2;
  --sand: #faf8f3; --white: #fff;
  --ink: #25262a; --muted: #6a665e;
  --line: #ece7dc; --line-strong: #ded6c4;
  --ok: #24724f; --warn: #94600a; --bad: #ad332b;
  --radius: 16px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(48, 38, 16, .04), 0 8px 28px rgba(48, 38, 16, .06);
  --shadow-lift: 0 2px 4px rgba(48, 38, 16, .05), 0 18px 44px rgba(48, 38, 16, .11);
  --metal: linear-gradient(135deg, #8a6b2c 0%, #cdb072 46%, #a5843f 62%, #7a5d23 100%);
  --pad: clamp(16px, 4vw, 40px);
  --top-h: 64px;
  --latin-serif: "Cormorant Garamond", Georgia, serif;
  --latin-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ar-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --ar-body: "IBM Plex Sans Arabic", "Noto Kufi Arabic", system-ui, -apple-system, sans-serif;
  --head: var(--ar-head), var(--latin-serif);
  --body: var(--ar-body), var(--latin-sans);
  --sub: var(--ar-body);
  --lh: 1.8;
}
html[lang="en"] {
  --head: var(--latin-serif); --body: var(--latin-sans); --sub: var(--latin-sans); --lh: 1.6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: var(--lh);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
h1, h2, h3 { margin: 0 0 .4em; text-wrap: balance; color: var(--ink); }
h1, h2 { font-family: var(--head); font-weight: 700; line-height: 1.4; }
h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h2 { font-size: 1.2rem; }
h3 { font-family: var(--sub); font-weight: 600; font-size: 1.02rem; line-height: 1.5; }
html[lang="en"] h1 { font-size: clamp(1.85rem, 3.8vw, 2.5rem); line-height: 1.2; letter-spacing: .005em; }
html[lang="en"] h2 { font-size: 1.5rem; line-height: 1.25; }
p { margin: 0 0 .7em; }
a { color: var(--gold-ink); text-underline-offset: 3px; }
ul { padding-inline-start: 1.2em; margin: 0 0 .7em; }
li::marker { color: var(--gold); }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .9em; background: var(--gold-mist); padding: 2px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); font-size: .92rem; }
::selection { background: var(--gold-soft); }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(var(--pad), env(safe-area-inset-right)) 0 max(var(--pad), env(safe-area-inset-left));
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; text-decoration: none; min-height: 44px; flex: none; }
.brand img { height: 40px; width: auto; display: block; }
.wordmark { font-family: var(--latin-serif); font-size: 1.45rem; color: var(--gold-ink); white-space: nowrap; direction: ltr; }
.wordmark b { font-weight: 700; letter-spacing: .1em; }
.wordmark i { font-family: var(--ar-head); font-style: normal; font-size: 1.02rem; margin-inline-start: 8px; color: var(--gold); }
.top-end { display: flex; align-items: center; gap: 12px; min-width: 0; }
#userbox { display: flex; align-items: center; gap: 10px; font-size: .9rem; min-width: 0; }
#userbox a { color: var(--ink); text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.lang { display: flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); flex: none; }
.lang span { display: none; }
.lang button { background: none; border: 0; font: inherit; font-size: .86rem; color: var(--muted); cursor: pointer; padding: 5px 14px; border-radius: 999px; min-height: 34px; }
.lang button[data-lang="ar"] { font-family: var(--ar-body); }
.lang button[data-lang="en"] { font-family: var(--latin-sans); }
.lang button.on { background: var(--gold-mist); color: var(--gold-ink); font-weight: 600; }

.demo-bar {
  background: var(--sand); border-bottom: 1px solid var(--line); color: var(--gold-ink);
  text-align: center; font-size: .8rem; line-height: 1.6; text-wrap: balance;
  padding: 7px max(var(--pad), env(safe-area-inset-right)) 7px max(var(--pad), env(safe-area-inset-left));
}

main {
  flex: 1; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 32px max(var(--pad), env(safe-area-inset-right)) 72px max(var(--pad), env(safe-area-inset-left));
}
main > * { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
footer {
  border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .82rem; text-wrap: balance;
  padding: 20px var(--pad) calc(20px + env(safe-area-inset-bottom));
}

/* ---------------------------------------------------------------- home */
.hero { text-align: center; padding: clamp(20px, 5vw, 52px) 0 clamp(26px, 4vw, 40px); }
.hero .mark { font-family: var(--latin-serif); font-weight: 600; font-size: clamp(2.6rem, 8vw, 4rem); letter-spacing: .14em; margin-inline-end: -.14em; line-height: 1.1; direction: ltr;
  background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .mark span { letter-spacing: .14em; }
.hero img { max-height: 132px; max-width: min(78%, 420px); height: auto; }
.hero h1 { margin: 14px auto 10px; max-width: 26ch; }
html[lang="en"] .hero h1 { max-width: 24ch; }
.hero p { color: var(--muted); max-width: 56ch; margin-inline: auto; font-size: 1.02rem; text-wrap: balance; }
.rule { width: 84px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 18px auto 0; }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 820px; margin-inline: auto; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
a.card { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s, transform .2s; }
a.card .badge { align-self: flex-start; margin-top: auto; }
a.card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a.card:active { transform: scale(.985); }
@media (hover: hover) {
  a.card:hover { border-color: var(--gold); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
  a.card:hover .chev { transform: translateX(3px); }
  html[dir="rtl"] a.card:hover .chev { transform: scaleX(-1) translateX(3px); }
}
.cat { text-align: center; align-items: center; padding: 34px 24px 26px; position: relative; overflow: hidden; }
.cat::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 2px; background: var(--metal); opacity: .9; }
.cat h2 { margin-bottom: .25em; }
.cat p { margin: 0; }
.chev { width: 18px; height: 18px; margin-top: 16px; color: var(--gold); stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
html[dir="rtl"] .chev { transform: scaleX(-1); }
.ico { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--gold-soft); background: var(--sand); display: grid; place-items: center; margin: 0 auto 14px; color: var(--gold-deep); flex: none; }
.ico svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 980px; margin: clamp(36px, 6vw, 60px) auto 0; border-top: 1px solid var(--line); }
.trust > div { text-align: center; padding: 26px 20px 0; }
.trust > div + div { border-inline-start: 1px solid var(--line); }
.trust .ico { width: 44px; height: 44px; margin-bottom: 10px; }
.trust .ico svg { width: 21px; height: 21px; }
.trust h3 { font-size: .98rem; margin-bottom: .25em; }
.trust p { margin: 0; color: var(--muted); font-size: .88rem; text-wrap: balance; }
@media (max-width: 720px) {
  .trust { grid-template-columns: 1fr; }
  .trust > div { padding: 22px 8px; }
  .trust > div + div { border-inline-start: 0; border-top: 1px solid var(--line); }
}

/* ---------------------------------------------------------------- building blocks */
.kpi { padding: 18px 20px; box-shadow: none; }
.kpi b { display: block; font-family: var(--latin-sans); font-weight: 600; font-size: 1.45rem; line-height: 1.3; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.kpi span { color: var(--muted); font-size: .86rem; display: block; margin-top: 2px; }
.kpi::before { content: ""; display: block; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; margin-bottom: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 500; line-height: 1.3; text-decoration: none; white-space: nowrap;
  min-height: 44px; padding: 9px 20px; border-radius: var(--radius-sm);
  border: 1px solid #745820; background: linear-gradient(180deg, #8d6e31, #745820); color: #fff;
  cursor: pointer; transition: filter .15s, background-color .15s, border-color .15s, transform .1s;
  -webkit-appearance: none; appearance: none; touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--white); border-color: var(--line-strong); color: var(--gold-ink); }
.btn.danger { background: var(--white); border-color: #e3bdb9; color: var(--bad); }
.btn.sm { min-height: 36px; padding: 5px 14px; font-size: .88rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: hover) {
  .btn:hover:not(:disabled) { filter: brightness(1.07); }
  .btn.ghost:hover:not(:disabled) { filter: none; background: var(--sand); border-color: var(--gold); }
  .btn.danger:hover:not(:disabled) { filter: none; background: #fdf3f2; border-color: var(--bad); }
}
@media (pointer: coarse) { .btn.sm { min-height: 40px; } }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 18px; }
.stack > h1, .stack > h2, .stack > h3 { margin-bottom: 0; }
.row.between > h1, .row.between > h3 { margin: 0; }

label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  min-height: 44px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white);
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
select {
  padding-inline-end: 36px; background-repeat: no-repeat; background-position: right 13px center; background-size: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%2386682b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
}
html[dir="rtl"] select { background-position: left 13px center; }
input::placeholder, textarea::placeholder { color: #a39e93; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(179, 146, 79, .2); }
input[type="checkbox"] { -webkit-appearance: auto; appearance: auto; width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--gold-deep); vertical-align: middle; flex: none; }
input[type="date"] { min-width: 150px; }
label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; color: var(--ink); font-size: .95rem; cursor: pointer; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.inline input, .inline select { width: auto; flex: 1 1 140px; max-width: 220px; }
td input, td select { min-height: 38px; padding: 5px 10px; }
.login { max-width: 420px; margin: clamp(8px, 4vw, 40px) auto; padding: 30px 26px; position: relative; overflow: hidden; }
.login::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 2px; background: var(--metal); }
.login h1 { font-size: 1.35rem; }
html[lang="en"] .login h1 { font-size: 1.7rem; }

.badge { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: .79rem; line-height: 1.7; border: 1px solid var(--line); background: var(--sand); color: var(--muted); white-space: nowrap; }
p.badge { white-space: normal; border-radius: 10px; padding: 6px 12px; margin: 0; }
.badge.ok { color: var(--ok); border-color: #c4dfd1; background: #f2f9f5; }
.badge.warn { color: var(--warn); border-color: #ecdcb6; background: #fdf9ee; }
.badge.bad { color: var(--bad); border-color: #ecc8c4; background: #fdf4f3; }
.badge.sim { color: var(--gold-ink); border-color: var(--gold-soft); background: var(--gold-mist); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.wide { min-width: 600px; }
table.wide td { white-space: nowrap; }
table.wide td.long { white-space: normal; min-width: 240px; }
th, td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--sand); color: var(--muted); font-weight: 500; font-size: .84rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
@media (hover: hover) { tbody tr:hover td { background: #fdfcf9; } }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }
.fees td:last-child { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pager span { font-family: var(--latin-sans); font-variant-numeric: tabular-nums; text-align: center; }

/* ---------------------------------------------------------------- dashboards */
.dash { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 26px; align-items: start; }
.side { position: sticky; top: calc(var(--top-h) + 20px); display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sand); }
.side a { display: flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .94rem; transition: background-color .15s, color .15s; }
.side a.on { background: var(--white); color: var(--gold-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(48, 38, 16, .06), 0 0 0 1px var(--gold-soft); }
@media (hover: hover) { .side a:not(.on):hover { background: rgba(255, 255, 255, .7); } }
.panel { min-width: 0; }
@media (max-width: 860px) {
  .dash { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .side {
    top: calc(var(--top-h) + env(safe-area-inset-top)); z-index: 5; flex-direction: row; gap: 6px;
    margin-inline: calc(-1 * var(--pad)); padding: 10px var(--pad); border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .side::-webkit-scrollbar { display: none; }
  .side a { white-space: nowrap; flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; background: var(--white); }
  .side a.on { background: var(--gold-mist); border-color: var(--gold-soft); box-shadow: none; }
}

.steps { display: flex; overflow-x: auto; padding: 8px 0 12px; list-style: none; margin: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.steps::-webkit-scrollbar { display: none; }
.steps li { flex: 1 0 88px; text-align: center; font-size: .76rem; line-height: 1.5; color: var(--muted); position: relative; padding: 34px 4px 0; }
.steps li::before { content: attr(data-n); position: absolute; top: 0; inset-inline-start: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--white); display: grid; place-items: center; font-family: var(--latin-sans); font-size: .74rem; font-variant-numeric: tabular-nums; z-index: 1; }
html[dir="rtl"] .steps li::before { transform: translateX(50%); }
.steps li::after { content: ""; position: absolute; top: 13px; inset-inline-start: -50%; width: 100%; height: 1px; background: var(--line-strong); }
.steps li:first-child::after { display: none; }
.steps li.done::before { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }
.steps li.done::after, .steps li.cur::after { background: var(--gold); }
.steps li.cur::before { border-color: var(--gold-deep); color: var(--gold-ink); font-weight: 700; box-shadow: 0 0 0 4px var(--gold-mist); }
.steps li.cur { color: var(--ink); font-weight: 600; }
.next { border: 1px solid var(--gold-soft); border-inline-start: 3px solid var(--gold); background: var(--sand); padding: 12px 16px; border-radius: var(--radius-sm); overflow-wrap: anywhere; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; overflow-wrap: anywhere; }
.timeline li:last-child { border-bottom: 0; }
.timeline small { color: var(--muted); display: block; font-size: .8rem; margin-top: 2px; }

/* ---------------------------------------------------------------- assistant */
.chat { max-width: 720px; margin-inline: auto; }
.msgs { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; height: 48vh; height: min(50dvh, 520px); min-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--sand); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 84%; padding: 9px 15px; border-radius: 16px; border-end-start-radius: 5px; align-self: flex-start; background: var(--white); border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; border-radius: 16px; border-end-end-radius: 5px; background: #7a5d23; color: #fff; border-color: #7a5d23; }
.bubble { background: var(--sand); border: 1px solid var(--gold-soft); border-radius: var(--radius); padding: 22px 24px; }
.bubble h2 { margin-bottom: .2em; }
.bubble p { color: var(--muted); }

/* ---------------------------------------------------------------- customer screen */
.desk { max-width: 820px; margin-inline: auto; }
.center { text-align: center; }
.agent { display: flex; gap: 14px; align-items: flex-start; background: var(--sand); border: 1px solid var(--gold-soft); border-radius: var(--radius); padding: 18px 20px; }
.agent .ico { margin: 0; width: 46px; height: 46px; background: var(--white); }
.agent .ico svg { width: 22px; height: 22px; }
.agent b { color: var(--gold-ink); font-size: .9rem; }
.agent p { margin: 2px 0 0; font-size: 1.08rem; text-wrap: pretty; }
button.card.pickc { font: inherit; color: inherit; text-align: start; cursor: pointer; display: block; width: 100%; transition: border-color .2s, box-shadow .2s, transform .2s; -webkit-appearance: none; appearance: none; }
button.card.pickc h3 { margin-bottom: .2em; }
button.card.pickc p { margin: 0; }
button.card.pickc:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button.card.pickc:active { transform: scale(.985); }
@media (hover: hover) { button.card.pickc:hover { border-color: var(--gold); box-shadow: var(--shadow-lift); transform: translateY(-2px); } }
.dchat { height: auto; min-height: 200px; max-height: min(46dvh, 460px); }
.msg { white-space: pre-line; }
.msg.typing { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 10px; }
.msg.typing::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; animation: pulse 1.4s ease-in-out infinite; }
.idv { text-align: center; align-items: center; border-color: var(--gold-soft); }
.idv .row { justify-content: center; }
.idvnum { font-family: var(--latin-sans); font-weight: 600; font-size: clamp(3.4rem, 14vw, 5rem); line-height: 1; letter-spacing: .06em; margin: 4px 0 10px; color: var(--gold-ink); font-variant-numeric: tabular-nums; direction: ltr; }
.dref { margin: 0; }
.dref b { font-family: var(--latin-sans); font-size: 1.25rem; letter-spacing: .02em; direction: ltr; unicode-bidi: isolate; }
.fees tr.total td { font-weight: 700; background: var(--sand); border-top: 1px solid var(--line-strong); }
.wait { display: flex; align-items: center; gap: 10px; margin: 0; }
.wait::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: none; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.paydesk { border-color: var(--gold-soft); position: relative; overflow: hidden; }
.paydesk::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 2px; background: var(--metal); }

/* ---------------------------------------------------------------- charts */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 132px; padding-top: 8px; }
.bars div { flex: 1; background: linear-gradient(180deg, #cdb072, var(--gold-deep)); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars div span { position: absolute; bottom: -20px; inset-inline-start: 0; width: 100%; text-align: center; font-family: var(--latin-sans); font-size: .62rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) { .bars { gap: 4px; } .bars div:nth-child(even) span { display: none; } }
.narrow { max-width: 820px; margin-inline: auto; }
ul.plain { margin: 0; padding-inline-start: 1.2em; line-height: 1.9; }
ul.plain li + li { margin-top: 6px; }
#userbox .badge { margin-inline-end: 8px; }
.terms { margin: 0; padding-inline-start: 1.3em; }
.terms li { margin-bottom: 14px; }
.terms li::marker { color: var(--gold-deep); font-weight: 600; }
.terms h4 { margin: 0 0 4px; font-size: 1rem; color: var(--ink); }
.terms p { margin: 0 0 8px; line-height: 1.9; color: var(--ink); }
.termsbox { max-height: 52vh; overflow-y: auto; overscroll-behavior: contain; }
label.tick { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; line-height: 1.7; cursor: pointer; }
label.tick input { width: 20px; height: 20px; flex: none; margin-top: 4px; accent-color: var(--gold-deep); }
td.hash { font-family: var(--latin-sans); font-size: .74rem; overflow-wrap: anywhere; white-space: normal !important; }
details.card > summary { cursor: pointer; font-weight: 600; }
details.card[open] > summary { margin-bottom: 14px; }
.kpi.in::before { background: var(--ok); }
.kpi.out::before { background: var(--bad); }
.bars.two { gap: 14px; }
.bars.two .pair { background: none; display: flex; align-items: flex-end; gap: 3px; height: 100%; }
.bars.two .pair i { flex: 1; min-height: 2px; border-radius: 4px 4px 0 0; }
.bars.two i.in, .legend i.in { background: linear-gradient(180deg, #cdb072, var(--gold-deep)); }
.bars.two i.out, .legend i.out { background: var(--ink); opacity: .78; }
.legend { color: var(--muted); font-size: .82rem; display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend i.out { margin-inline-start: 10px; }
.hbar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--metal); border-radius: 999px; }

#toast { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); inset-inline: 0; margin-inline: auto; width: fit-content; max-width: min(90vw, 480px); padding: 11px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .9rem; text-align: center; box-shadow: var(--shadow-lift); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; }
#toast.show { opacity: 1; transform: none; }
#toast.err { background: var(--bad); }
pre { background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; font-size: .8rem; line-height: 1.6; direction: ltr; text-align: left; margin: 0; }

/* ---------------------------------------------------------------- small screens (iPhone) */
@media (max-width: 560px) {
  :root { --top-h: 58px; }
  main { padding-top: 22px; padding-bottom: 56px; }
  .brand img { height: 34px; }
  .wordmark { font-size: 1.25rem; }
  .wordmark i { font-size: .92rem; }
  .top-end { gap: 8px; }
  #userbox { gap: 6px; }
  #userbox a { max-width: 11ch; font-size: .86rem; }
  /* Show only the language you can switch to. */
  .lang { border-color: var(--line-strong); }
  .lang button.on { display: none; }
  .lang { padding: 0; }
  .lang button { color: var(--gold-ink); min-height: 40px; padding: 4px 16px; }
  .card { padding: 18px; }
  .btn { white-space: normal; text-align: center; max-width: 100%; }
  .cat { padding: 28px 20px 22px; }
  .login { padding: 26px 20px; }
  .bubble { padding: 18px; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px 16px; }
  .kpi b { font-size: 1.2rem; }
  th, td { padding: 10px 12px; }
  .bubble .row > .btn, form.card > div > .btn:only-child, .login .btn { flex: 1 1 100%; width: 100%; }
  .login .row.between { flex-direction: column; align-items: stretch; text-align: center; gap: 14px; }
  .msg { max-width: 90%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- voice conversation */
.btn.big { padding: 14px 26px; font-size: 1.05rem; border-radius: 999px; gap: 10px; }
.btn.big svg, .btn.ghost[data-act="dtalk"] svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.vstart { text-align: center; padding: 18px 0 6px; }
.vstart .muted { max-width: 460px; margin: 12px auto 0; }
.vc { --lvl: 0; position: fixed; z-index: 30; color: var(--ink); font-family: inherit; }
.vc.full { inset: 0; background: radial-gradient(120% 80% at 50% 0%, var(--gold-mist), var(--white) 62%); display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(22px + env(safe-area-inset-top)) 22px calc(26px + env(safe-area-inset-bottom)); text-align: center; }
.vc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 560px; }
.vc-title { font-family: var(--ar-head, inherit); font-weight: 600; color: var(--gold-ink); }
.vc-engine { font-size: .78rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 12px; background: var(--white); }
.vc-orb { position: relative; width: min(56vw, 230px); aspect-ratio: 1; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.vc-orb:focus-visible { outline: 2px solid var(--gold); outline-offset: 8px; }
.vc-halo, .vc-core { position: absolute; inset: 0; border-radius: 50%; }
.vc-halo { background: radial-gradient(circle, rgba(179, 146, 79, .30), rgba(179, 146, 79, 0) 68%); transform: scale(calc(1.05 + var(--lvl) * .55)); transition: transform .09s linear; }
.vc-core { inset: 17%; background: radial-gradient(circle at 34% 28%, #f3e3b9, var(--gold) 46%, var(--gold-deep)); box-shadow: 0 18px 44px rgba(134, 104, 43, .32), inset 0 -10px 22px rgba(60, 44, 10, .22);
  transform: scale(calc(1 + var(--lvl) * .10)); transition: transform .09s linear, filter .3s, opacity .3s; }
.vc[data-state="thinking"] .vc-core, .vc[data-state="starting"] .vc-core { animation: vc-breathe 1.3s ease-in-out infinite; }
.vc[data-state="paused"] .vc-core, .vc[data-state="error"] .vc-core { filter: grayscale(.85); opacity: .55; }
.vc[data-state="hearing"] .vc-halo { background: radial-gradient(circle, rgba(179, 146, 79, .46), rgba(179, 146, 79, 0) 70%); }
@keyframes vc-breathe { 0%, 100% { transform: scale(.94); opacity: .78; } 50% { transform: scale(1.03); opacity: 1; } }
.vc-text { width: 100%; max-width: 560px; min-height: 8.2em; }
.vc-state { font-size: 1.05rem; font-weight: 600; color: var(--gold-ink); margin: 0 0 10px; }
.vc-me { color: var(--muted); margin: 0 0 8px; font-size: .95rem; }
.vc-ai { margin: 0; font-size: 1.08rem; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.vc-me:empty, .vc-ai:empty { display: none; }
.vc-actions { display: flex; gap: 12px; justify-content: center; }
.vc-btn { font: inherit; min-width: 104px; min-height: 48px; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--white); color: var(--ink); cursor: pointer; }
.vc-btn.on { background: var(--gold-mist); border-color: var(--gold); }
.vc-end { background: var(--bad); border-color: var(--bad); color: #fff; }
.vc.dock { inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 720px; margin-inline: auto; background: var(--white); border: 1px solid var(--gold-soft); border-radius: 20px;
  box-shadow: 0 14px 40px rgba(60, 44, 10, .18); padding: 10px 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.vc.dock .vc-top { display: none; }
.vc.dock .vc-orb { width: 58px; }
.vc.dock .vc-text { min-height: 0; text-align: start; min-width: 0; }
.vc.dock .vc-state { font-size: .95rem; margin: 0; }
.vc.dock .vc-me { display: none; }
.vc.dock .vc-ai { font-size: .88rem; color: var(--muted); -webkit-line-clamp: 1; line-height: 1.5; }
.vc.dock .vc-btn { min-width: 0; min-height: 44px; padding: 8px 16px; }
.vc.dock .vc-mute { display: none; }
body.vc-open-full { overflow: hidden; }
body.vc-open-dock main { padding-bottom: 120px; }
@media (prefers-reduced-motion: reduce) { .vc-halo, .vc-core { transition: none; animation: none !important; } }

.staff-link { display: block; margin-top: 8px; font-size: .82rem; color: var(--muted); }

/* ---- the customers' front door: one bar to say what you need */
.entry { text-align: center; max-width: 720px; margin: 0 auto; padding: clamp(8px, 3vw, 28px) 0 8px; position: relative; }
.entry-back { display: inline-block; font-size: .88rem; color: var(--muted); text-decoration: none; margin-bottom: 18px; }
.entry-back:hover { color: var(--gold-ink); }
.eyebrow { font-size: .8rem; letter-spacing: .14em; color: var(--gold-deep); font-weight: 600; margin: 0 0 10px; text-transform: uppercase; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .92rem; }
.entry h1 { font-size: clamp(1.7rem, 5.2vw, 2.5rem); line-height: 1.35; margin: 0 auto 10px; max-width: 20ch; }
.entry-sub { color: var(--muted); font-size: 1.04rem; margin: 0 auto 26px; max-width: 44ch; }
.composer { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 8px; padding-inline-start: 24px; box-shadow: 0 14px 40px rgba(60, 44, 10, .10), 0 2px 6px rgba(60, 44, 10, .05); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: var(--gold); box-shadow: 0 16px 44px rgba(134, 104, 43, .18), 0 0 0 4px rgba(179, 146, 79, .14); }
.composer input[name="message"] { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 1.06rem; color: var(--ink); padding: 12px 0; box-shadow: none; }
.composer input::placeholder { color: #a8a294; }
.composer button { flex: none; width: 50px; height: 50px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .2s; }
.composer button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.composer button:active { transform: scale(.94); }
.composer button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.c-mic { background: var(--gold-mist); color: var(--gold-ink); }
.c-go { background: linear-gradient(160deg, #c2a25f, var(--gold-deep)); color: #fff; box-shadow: 0 6px 16px rgba(134, 104, 43, .32); }
html[dir="rtl"] .c-go svg { transform: scaleX(-1); }
@media (hover: hover) { .c-mic:hover { background: var(--gold-soft); } }
.assure { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; color: var(--muted); font-size: .9rem; }
.assure li { display: flex; align-items: center; gap: 8px; }
.assure li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
.entry-list { margin-top: clamp(34px, 7vw, 60px); }
.entry-list h2 { text-align: center; font-size: 1rem; font-weight: 500; color: var(--muted); margin: 0 0 18px; display: flex; align-items: center; gap: 16px; }
.entry-list h2::before, .entry-list h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.card.svc { padding: 20px 22px; display: flex; flex-direction: column; }
.card.svc h3 { margin: 0 0 6px; }
.card.svc p { margin: 0; flex: 1; }
.card.svc .chev { margin-top: 14px; }
.entry-ask { text-align: center; margin: 26px 0 0; font-size: .92rem; }
@media (max-width: 560px) {
  .composer { padding: 6px; padding-inline-start: 18px; }
  .composer button { width: 46px; height: 46px; }
  .composer input[name="message"] { font-size: 1rem; }
  .assure { flex-direction: column; align-items: center; gap: 8px; }
}

/* ---- grouped service catalogue */
.grp { border-top: 1px solid var(--line); }
.grp:last-of-type { border-bottom: 1px solid var(--line); }
.grp summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 4px; font-family: var(--head); font-weight: 600; font-size: 1.08rem; }
.grp summary::-webkit-details-marker { display: none; }
.grp summary small { font-family: var(--body, inherit); font-weight: 500; font-size: .8rem; color: var(--gold-ink); background: var(--gold-mist); border-radius: 999px; padding: 2px 11px; }
.grp summary::after { content: ""; width: 9px; height: 9px; border-inline-end: 1.6px solid var(--gold-deep); border-bottom: 1.6px solid var(--gold-deep); transform: rotate(45deg); transition: transform .2s; margin-inline-start: 4px; flex: none; }
.grp summary span { flex: 1; }
.grp[open] summary::after { transform: rotate(-135deg); }
.grp summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.grp > .grid { padding: 2px 0 22px; }
