:root {
  /* يلا نكشف — dark brand theme (default) */
  --bg: #0E3B43;
  --surface: #134A53;
  --surface-2: #19555F;
  --ink: #FFFFFF;
  --muted: #D3E4E1;
  --line: #2A6670;
  --primary: #79DDC4;
  --primary-ink: #0B2F35;
  --primary-soft: #1D5F63;
  --accent: #F6D438;
  --accent-soft: #3E5040;
  --ok: #3BEB86;
  --ok-soft: #175443;
  --warn: #F6D438;
  --warn-soft: #3E5040;
  --danger: #FF7B7B;
  --danger-soft: #4D3138;
  --sig-red: #F10C19; --sig-yellow: #F6D438; --sig-green: #20E875;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 28px rgba(0,0,0,.22);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F2F7F6; --surface: #FFFFFF; --surface-2: #E8F1EF; --ink: #0B2F35; --muted: #35575C;
  --line: #CFE0DD; --primary: #0E5B63; --primary-ink: #FFFFFF; --primary-soft: #D8EEEA;
  --accent: #8A6400; --accent-soft: #FBF1C9; --ok: #0B7A3E; --ok-soft: #DDF5E7;
  --warn: #8A5200; --warn-soft: #FBEBC9; --danger: #C0141C; --danger-soft: #FBE0E1;
  --shadow: 0 1px 2px rgba(11,47,53,.06), 0 8px 24px rgba(11,47,53,.08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Noto Kufi Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 17px; line-height: 1.65;
}
a { color: var(--primary); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); }
.logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink); font-size: 18px;
}
.topbar nav a { font-size: 15px; color: var(--muted); font-weight: 600; }
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 64px; }
main.wide { max-width: 1100px; }
.page { display: flex; flex-direction: column; gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 12px; font-size: 18px; }
.muted { color: var(--muted); font-size: 15px; }
.hero { padding: 36px 4px 24px; }
.eyebrow { color: var(--accent); font-weight: 600; margin: 0 0 6px; }
.hero h1 { font-size: clamp(30px, 7vw, 46px); line-height: 1.25; margin: 0 0 14px; letter-spacing: -.5px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; max-width: 34em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 15px;
  min-height: 44px; transition: transform .05s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-lg { padding: 14px 26px; font-size: 18px; border-radius: 14px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: var(--primary-ink); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: transparent; }
.row { display: flex; gap: 10px; }
.row > input { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 15px; }
input, select {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px;
  padding: 10px 12px; min-height: 44px; outline: none; width: 100%;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
.check input { width: 20px; min-height: 20px; height: 20px; }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.option {
  text-align: start; display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  cursor: pointer; min-height: 64px;
}
.option:hover { border-color: var(--primary); }
.option strong { font-size: 16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px;
  padding: 8px 14px; cursor: pointer; text-align: center; line-height: 1.3; min-width: 74px;
}
.chip small { display: block; color: var(--muted); font-size: 12px; }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip.on small { color: inherit; opacity: .85; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 12px; }
.slot { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px 6px; cursor: pointer; direction: ltr; unicode-bidi: plaintext; }
.slot.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.summary { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: var(--ink);
  border: 0; border-radius: 999px; padding: 4px 12px; font-size: 14px; cursor: pointer;
}
.pill span { color: var(--muted); }
.back { font-size: 14px; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); color: var(--ink);
}
.list-item div { display: flex; flex-direction: column; }
.list-item .end { align-items: flex-end; text-align: end; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.how div { padding: 14px; border-radius: 14px; background: var(--surface-2); }
.how b { display: block; color: var(--primary); font-size: 22px; }
.center { text-align: center; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary);
  animation: spin .8s linear infinite; margin: 30px auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* queue tracker */
.tracker { text-align: center; padding: 26px 18px; }
.tracker .label { color: var(--muted); font-size: 16px; }
.big { font-size: clamp(64px, 20vw, 104px); font-weight: 700; line-height: 1; margin: 6px 0; color: var(--primary); font-variant-numeric: tabular-nums; }
.big.now { font-size: clamp(38px, 11vw, 60px); color: var(--ok); }
.eta { font-size: 18px; margin-top: 8px; }
.eta strong { color: var(--accent); }
.msg { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); font-weight: 600; }
.msg.next { background: var(--accent-soft); }
.msg.late, .msg.bad { background: var(--danger-soft); color: var(--danger); }
.msg.good { background: var(--ok-soft); color: var(--ok); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.step { text-align: center; font-size: 12.5px; color: var(--muted); }
.step i { display: block; height: 6px; border-radius: 6px; background: var(--line); margin-bottom: 6px; }
.step.done i { background: var(--primary); }
.step.cur { color: var(--ink); font-weight: 600; }
.step.cur i { background: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fact { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.fact span { display: block; color: var(--muted); font-size: 13px; }
.fact strong { font-size: 16px; }
.code { direction: ltr; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; word-break: break-all; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* staff */
.staff-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.staff-head h2 { margin: 0; }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; min-height: 36px; }
.seg button.on { background: var(--surface); box-shadow: var(--shadow); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.stat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar input { flex: 1; min-width: 180px; }
.qrow {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.qrow + .qrow { margin-top: 8px; }
.qrow.arrived { border-inline-start: 4px solid var(--primary); }
.qrow.in_service { border-inline-start: 4px solid var(--ok); background: var(--ok-soft); }
.qrow.dim { opacity: .7; }
.qnum { font-weight: 700; font-size: 20px; text-align: center; color: var(--primary); font-variant-numeric: tabular-nums; }
.qmain { display: flex; flex-direction: column; min-width: 0; }
.qmain strong { font-size: 16px; }
.qact { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-inline-end: 4px; }
.badge.b-arrived { background: var(--primary-soft); color: var(--primary); }
.badge.b-in_service { background: var(--ok-soft); color: var(--ok); }
.badge.b-completed { background: var(--surface-2); }
.badge.b-no_show, .badge.b-cancelled { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.now-card { border: 2px solid var(--ok); }
.now-card h3, .next-card h3 { margin: 0 0 4px; font-size: 14px; color: var(--muted); font-weight: 500; }
.now-card .who, .next-card .who { font-size: 26px; font-weight: 700; }
.next-card { border: 2px dashed var(--accent); }
.doc-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.empty { text-align: center; padding: 24px 10px; color: var(--muted); }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 0; }

#toast {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none;
}
.toast {
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow);
  font-weight: 500; max-width: 520px; animation: pop .2s ease;
}
.toast.err { background: var(--danger); color: var(--primary-ink); }
.toast.ok { background: var(--ok); color: var(--primary-ink); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 560px) {
  .qrow { grid-template-columns: 40px 1fr; }
  .qact { grid-column: 1 / -1; justify-content: flex-start; }
  .facts { grid-template-columns: 1fr 1fr; }
}

/* ---------- v2 additions ---------- */
.topbar nav { display: flex; gap: 14px; align-items: center; }
.topbar nav a.on { color: var(--primary); font-weight: 600; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 14px; scrollbar-width: none; }
.tabs button {
  flex: 0 0 auto; border: 0; background: transparent; padding: 10px 12px; cursor: pointer; font-weight: 600;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.panel { border: 1px dashed var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2); }
.item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; background: var(--surface-2);
}
.item + .item { margin-top: 8px; }
.item.off { opacity: .6; }
.item .grow { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.day { padding: 10px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.shift { display: grid; grid-template-columns: 1fr 1fr 90px 40px; gap: 8px; align-items: end; margin-top: 6px; }
.shift label { font-size: 12px; color: var(--muted); font-weight: 400; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; min-height: 44px; cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.banner { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.banner.info { background: var(--primary-soft); }
.hr { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font-weight: 600; }
@media (max-width: 560px) {
  .shift { grid-template-columns: 1fr 1fr; }
  .topbar nav { gap: 10px; }
}

/* ---------- v3: directory, facility page, reviews ---------- */
.hero-sm { padding: 20px 4px 8px; }
.hero-sm h1 { font-size: clamp(26px, 6vw, 38px); margin-bottom: 4px; }
.field-label { font-weight: 500; font-size: 15px; }
.combo { position: relative; margin-top: 6px; }
.combo-input { padding-inline-end: 40px; }
.combo-toggle { position: absolute; inset-inline-end: 4px; top: 4px; bottom: 4px; width: 36px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 16px; }
.combo-list {
  position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 30; max-height: 280px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.combo-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; cursor: pointer; font-weight: 400; }
.combo-item small { color: var(--muted); }
.combo-item:hover, .combo-item.on { background: var(--primary-soft); }
.combo-empty { padding: 12px 14px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  padding: 14px 6px; border-radius: 14px; background: var(--surface-2); color: var(--ink); border: 1px solid transparent; min-height: 96px;
}
.tile:hover { border-color: var(--primary); }
.tile i { font-size: 28px; color: var(--primary); }
.tile span { font-size: 14px; line-height: 1.3; font-weight: 500; }
.tile small { font-size: 12px; color: var(--muted); }
.tile.dim { opacity: .6; }
.coming { text-align: center; }
.coming-icon { font-size: 34px; }
.results { display: flex; flex-direction: column; gap: 10px; }
.result, .prov {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow);
}
.prov { box-shadow: none; background: var(--surface-2); align-items: center; }
.prov + .prov { margin-top: 8px; }
.prov.hl { border-color: var(--primary); }
.result .grow, .prov .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.avatar {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 700;
}
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.fac-head { display: flex; gap: 14px; align-items: center; }
.fac-head .grow { flex: 1; }
.stars { color: #d39b1f; font-weight: 700; letter-spacing: 1px; }
.stars-off { color: var(--line); }
.badge.verified { background: var(--ok-soft); color: var(--ok); }
.next { font-size: 13px; font-weight: 600; margin-top: 4px; }
.next.today { color: var(--ok); }
.next.soon { color: var(--accent); }
.next.later, .next.none { color: var(--muted); }
.review { padding: 12px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.review p { margin: 6px 0; }
.star-pick { display: flex; gap: 6px; direction: ltr; justify-content: flex-end; margin: 6px 0 12px; }
.star-pick button { border: 0; background: none; font-size: 38px; line-height: 1; cursor: pointer; color: var(--line); padding: 0 2px; }
.star-pick button.on { color: #d39b1f; }
textarea {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; width: 100%;
  font: inherit; color: inherit; resize: vertical; outline: none;
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chip-check { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.qr-box { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.qr-box img { background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--line); }
.sched-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--surface-2); }
.sched-box .chip-check { background: var(--surface); }
.loc-box { border: 1px dashed var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.loc-box .loc-status { margin: 0; font-size: 14px; }
.soc-box { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.soc-box summary { cursor: pointer; font-weight: 600; }
.soc-box[open] summary { margin-bottom: 10px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.socials .soc { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.socials .soc:hover { border-color: var(--primary); color: var(--primary); }
.done-card { border: 2px solid var(--ok); }
.done-card h2 { color: var(--ok); }
.done-card .big-line { font-size: 18px; margin: 4px 0; }
/* slot board: free = green, booked = grey */
.slots-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.legend .lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.legend .lg.free { background: var(--ok-soft); border: 1px solid var(--ok); }
.legend .lg.taken { background: var(--surface-2); border: 1px solid var(--line); margin-inline-start: 6px; }
.slot.free { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); font-weight: 600; }
.slot.free:hover { border-color: var(--ok); }
.slot.free.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.slot.taken { background: var(--surface-2); color: var(--muted); opacity: .55; cursor: not-allowed; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.slot.taken small { font-size: 11px; }
.banner.warn { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.arrive-tip { font-size: 13px; margin: 10px 0 0; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.wait { background: var(--surface-2); color: var(--muted); }
.tag.risk { background: var(--danger-soft); color: var(--danger); }
.btn-google { width: 100%; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; gap: 10px; font-weight: 600; margin-top: 14px; }
.btn-google:hover { background: #f8f9fa; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0 6px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.site-foot { text-align: center; font-size: 13px; color: var(--muted); padding: 24px 16px 32px; }
.site-foot a { color: var(--muted); }
/* ---------- owner console ---------- */
.otabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: thin; position: sticky; top: 0; z-index: 5; background: var(--bg); }
.otabs button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; min-height: 40px; }
.otabs button.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.owner .stat small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.owner .stat.good b { color: var(--ok); }
.owner .stat.bad b { color: var(--danger); }
.owner .kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.owner h3 { font-size: 15px; margin: 16px 0 8px; }
.owner .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); vertical-align: middle; }
.owner .dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid2 > .card, .grid3 > .card { margin: 0; }
.chart { margin: 0; }
.chart svg { width: 100%; height: 140px; display: block; }
.chart .grid { stroke: var(--line); stroke-width: .3; vector-effect: non-scaling-stroke; }
.chart rect:hover { opacity: .75; }
.chart figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.chart figcaption b { color: var(--ink); font-weight: 600; }
.barlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.barlist li { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.barlist .bl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist .bl-bar { background: var(--surface-2); border-radius: 6px; height: 10px; overflow: hidden; }
.barlist .bl-bar i { display: block; height: 100%; background: var(--primary); border-radius: 6px; min-width: 2px; }
.barlist b { font-variant-numeric: tabular-nums; }
.card.attn { border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); }
.card.off { opacity: .7; }
.mini-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-stats span { background: var(--surface-2); border-radius: 10px; padding: 6px 10px; font-size: 12px; color: var(--muted); text-align: center; min-width: 84px; }
.mini-stats b { display: block; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.confirm-box { margin-top: 10px; border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-soft); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed li > i { font-size: 20px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.feed li.good > i { background: var(--ok-soft); color: var(--ok); }
.feed li.bad > i { background: var(--danger-soft); color: var(--danger); }
.feed .grow { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.feed small { font-size: 12px; }
.owner-filter input, .owner-filter select { min-height: 44px; }
/* ---------- clinic prepayment ---------- */
.pay-note { display: flex; gap: 10px; align-items: flex-start; background: var(--primary-soft); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.pay-note.req { background: var(--accent-soft); }
.pay-note > i { font-size: 22px; color: var(--primary); }
.pay-note.req > i { color: var(--accent); }
.pay-note div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.pay-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-top: 6px; }
.pay-mode { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--surface); }
.pay-mode input { position: absolute; opacity: 0; pointer-events: none; }
.pay-mode.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.pay-mode small { color: var(--muted); font-weight: 400; }
.pay-fields { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.pay-fields:disabled { opacity: .5; }
.pay-card { display: flex; flex-direction: column; gap: 6px; }
.pay-card.req { border: 2px solid var(--accent); }
.pay-card.ok { border: 1px solid var(--ok); background: var(--ok-soft); }
.pay-card.bad { border: 1px solid var(--danger); background: var(--danger-soft); }
.pay-card.wait { border: 1px dashed var(--primary); }
.pay-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pay-head > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.pay-head strong { font-size: 18px; }
.pay-timer { text-align: center; background: var(--accent-soft); border-radius: 12px; padding: 6px 12px; min-width: 88px; }
.pay-timer small { display: block; color: var(--muted); font-size: 12px; }
.pay-timer b { font-size: 22px; font-variant-numeric: tabular-nums; color: var(--accent); }
.pay-warn { color: var(--danger); font-size: 13px; }
.pay-steps { margin: 4px 0; padding-inline-start: 20px; color: var(--muted); font-size: 14px; }
.pay-methods { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pay-methods li { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; }
.pay-methods li > i { font-size: 22px; color: var(--primary); }
.pay-methods .grow { display: flex; flex-direction: column; flex: 1; }
.pay-methods span { font-variant-numeric: tabular-nums; font-size: 16px; letter-spacing: .5px; }
.upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--line); border-radius: 14px; padding: 18px; cursor: pointer; text-align: center; color: var(--muted); }
.upload i { font-size: 32px; color: var(--primary); }
.upload.has { padding: 6px; border-style: solid; }
.upload img { max-width: 100%; max-height: 260px; border-radius: 10px; }
.tag.pay { background: var(--accent-soft); color: var(--accent); }
.btn-pay { background: var(--accent); border-color: var(--accent); color: #fff; }
.proof-panel { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-top: 8px; }
.proof-panel img { max-width: 220px; max-height: 320px; border-radius: 10px; border: 1px solid var(--line); }
.proof-panel .grow { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 200px; }
/* ---------- follow-ups & prescriptions ---------- */
.fu-note { display: block; color: var(--ok); font-size: 12px; margin-top: 2px; }
.btn-note { border-color: var(--primary); color: var(--primary); }
body.sheet-open { overflow: hidden; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: min(760px, 100%); max-height: 94vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px 16px 24px; box-shadow: var(--shadow); }
@media (min-width: 800px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 18px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; position: sticky; top: -16px; background: var(--surface); padding: 4px 0 10px; z-index: 1; }
.sheet-head > div { display: flex; flex-direction: column; }
.sheet-head strong { font-size: 18px; }
.sheet textarea { width: 100%; }
.sheet-foot { display: flex; gap: 8px; margin-top: 16px; position: sticky; bottom: -24px; background: var(--surface); padding: 10px 0; }
.sheet-foot .btn-primary { flex: 1; }
.rx-h { display: flex; align-items: center; gap: 6px; font-size: 16px; margin: 16px 0 8px; }
.rx-h .mic { margin-inline-start: auto; }
.mic { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); display: inline-grid; place-items: center; cursor: pointer; font-size: 18px; color: var(--primary); }
.mic.on, .mic-wide.on { background: var(--danger); color: #fff; border-color: var(--danger); animation: micPulse 1.2s infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .45); } 50% { box-shadow: 0 0 0 8px rgba(179, 38, 30, 0); } }
.dictate-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.dictate-row .muted { font-size: 12px; }
.interim { color: var(--primary); font-size: 14px; margin: 4px 0 8px; min-height: 1em; }
.meds { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.med-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.med-top { display: flex; align-items: center; gap: 8px; }
.med-top input { flex: 1; font-weight: 600; }
.med-n { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-size: 13px; flex: none; }
.med-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; }
.med-note { font-size: 14px; }
.fu-row { gap: 6px; flex-wrap: wrap; align-items: center; }
.fu-row input[type=date] { max-width: 180px; }
.hist { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; }
.hist summary { cursor: pointer; font-weight: 600; }
.hist-item { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.rx-card { border: 2px solid var(--primary); }
.rx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rx-head > div { display: flex; flex-direction: column; }
.rx-list { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.rx-list li b { display: block; font-size: 16px; }
.rx-list li span { color: var(--ink); font-size: 14px; }
.rx-list li small { display: block; color: var(--muted); }
.rx-text { white-space: pre-wrap; margin: 0; line-height: 1.8; }
.rx-fu { display: flex; gap: 10px; align-items: center; background: var(--primary-soft); border-radius: 12px; padding: 10px 12px; margin-top: 12px; }
.rx-fu > i { font-size: 24px; color: var(--primary); }
.rx-fu > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; justify-content: space-between; }
.clinic-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.clinic-box + .clinic-box { margin-top: 8px; }
.clinic-box summary { cursor: pointer; display: flex; flex-direction: column; }
.visit { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.visit-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.visit-head .btn { margin-inline-start: auto; }
@media print {
  body.print-rx * { visibility: hidden !important; }
  body.print-rx #rxCard, body.print-rx #rxCard * { visibility: visible !important; }
  body.print-rx #rxCard { position: absolute; inset: 0 0 auto 0; border: 0; box-shadow: none; }
  body.print-rx .no-print { display: none !important; }
}

/* language toggle */
.lang-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px;
  min-width: 34px; height: 30px; padding: 0 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
html[dir=ltr] body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, "Noto Kufi Arabic", sans-serif; }
.topbar nav a { white-space: nowrap; }
@media (max-width: 420px) { .topbar nav { gap: 10px; } .topbar nav a { font-size: 13px; } .brand { font-size: 18px; } }
.topbar { gap: 10px; }
.topbar nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.brand { flex-shrink: 0; }

/* ---------- doctor delay ---------- */
.delay-note { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 14px; line-height: 1.6; }
.delay-note .ti { color: var(--accent); }
.delay-banner { display: flex; align-items: center; gap: 12px; }
.delay-banner .grow { display: flex; flex-direction: column; gap: 2px; }
.btn-delay { border-color: var(--accent); color: var(--accent); }
.delay-card h2 .ti { color: var(--accent); }

/* ---------- medicine reminders ---------- */
.med-card { display: flex; flex-direction: column; gap: 10px; }
.med-card.on { border-color: var(--primary); }
.med-card-head { display: flex; gap: 12px; align-items: center; }
.med-card-head .grow { display: flex; flex-direction: column; gap: 2px; }
.med-ico { font-size: 28px; line-height: 1; }
.med-plan { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.med-plan.off { opacity: .6; }
.med-plan-name { font-size: 15px; }
.med-times { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.med-time { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 2px 6px; }
.med-time input { border: 0; background: transparent; padding: 4px; min-width: 0; width: 7.5em; }
.med-days { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.med-days input { width: 5em; }
.result .dist { font-size: 13px; }

/* ---------- waiting-room screen ---------- */
body.tv-mode .topbar, body.tv-mode .site-foot { display: none; }
body.tv-mode main { max-width: none; padding: 0; }
.tv { min-height: 100vh; display: flex; flex-direction: column; gap: 2vh; padding: 3vh 3vw; background: var(--bg); }
.tv-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tv-head h1 { margin: 0; font-size: clamp(24px, 3.4vw, 54px); }
.tv-head span { color: var(--muted); font-size: clamp(14px, 1.6vw, 26px); }
.tv-clock { font-size: clamp(22px, 3vw, 48px); font-weight: 700; color: var(--primary); direction: ltr; }
.tv-offline { background: var(--accent-soft); padding: 8px 14px; border-radius: 10px; margin: 0; }
.tv-grid { flex: 1; display: grid; gap: 2vw; grid-template-columns: 1fr; }
.tv-grid.n2 { grid-template-columns: 1fr 1fr; }
.tv-grid.n3 { grid-template-columns: repeat(3, 1fr); }
.tv-grid.n4 { grid-template-columns: 1fr 1fr; }
.tv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 3vh 2vw; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1vh; }
.tv-doc h2 { margin: 0; font-size: clamp(20px, 2.6vw, 44px); }
.tv-doc span { color: var(--muted); font-size: clamp(14px, 1.4vw, 24px); }
.tv-now-label { color: var(--muted); font-size: clamp(16px, 1.8vw, 30px); margin-top: 1vh; }
.tv-now { font-size: clamp(72px, 13vw, 240px); font-weight: 700; line-height: 1; color: var(--primary); direction: ltr; }
.tv-next { font-size: clamp(18px, 2.2vw, 38px); color: var(--ink); }
.tv-next b { color: var(--primary); margin: 0 .25em; direction: ltr; display: inline-block; }
.tv-meta { color: var(--muted); font-size: clamp(14px, 1.3vw, 22px); }
.tv-delay { background: var(--accent-soft); color: var(--ink); border-radius: 14px; padding: .6em 1em; font-size: clamp(16px, 1.8vw, 30px); }
.tv-card.called { animation: tvCall 1.2s ease-in-out 3; }
@keyframes tvCall { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 10px var(--primary-soft); background: var(--primary-soft); } }
.tv-foot { display: flex; align-items: center; gap: 2vw; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.6vh 2vw; }
.tv-foot img { width: clamp(80px, 9vw, 150px); height: auto; border-radius: 8px; background: #fff; }
.tv-foot img[src=""] { visibility: hidden; }
.tv-foot .grow { display: flex; flex-direction: column; gap: 4px; }
.tv-foot strong { font-size: clamp(16px, 1.9vw, 32px); }
.tv-foot span { color: var(--primary); font-weight: 700; font-size: clamp(16px, 1.8vw, 30px); }
.tv-ctrl { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 700px) { .tv-grid.n2, .tv-grid.n3, .tv-grid.n4 { grid-template-columns: 1fr; } .tv-foot { flex-wrap: wrap; } }

/* ---------- suggestions ---------- */
.fb-fab { position: fixed; bottom: 18px; inset-inline-start: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 14px 8px 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12); cursor: pointer; font-size: 14px; }
.fb-fab span { font-size: 18px; line-height: 1; }
.fb-fab:hover { border-color: var(--primary); color: var(--primary); }
.fb-fab[hidden] { display: none; }
body.sheet-open .fb-fab, body.print-rx .fb-fab { display: none; }
@media print { .fb-fab { display: none; } }
@media (max-width: 480px) { .fb-fab b { display: none; } .fb-fab { padding: 10px; } }
.fb-sheet .chips { margin: 4px 0 10px; }
.fb-box { position: relative; }
.fb-box textarea { padding-inline-end: 52px; font-size: 16px; }
.fb-mic { position: absolute; inset-inline-end: 8px; top: 8px; width: 40px; height: 40px; }
.fb-hint { font-size: 13px; margin: 6px 0 10px; }
.btn-idea { border-color: var(--accent); }
.fb-item.new { border-inline-start: 4px solid var(--accent); }
.fb-item.done { opacity: .7; }
.fb-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.fb-msg { white-space: pre-wrap; font-size: 16px; margin: 10px 0; }
.fb-status button { font-size: 13px; }
.fb-sheet .chips, .owner .chips { flex-wrap: wrap; overflow: visible; }
.fb-status { flex-wrap: wrap; }

/* ---------- brand: logo, theme toggle, splash, loading dots ---------- */
.brand-logo { height: 40px; width: auto; display: block; }
.brand-logo.l { display: none; }
:root[data-theme="light"] .brand-logo.d { display: none; }
:root[data-theme="light"] .brand-logo.l { display: block; }
.theme-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; width: 34px; height: 30px; cursor: pointer; display: inline-grid; place-items: center; font-size: 16px; }
.theme-btn:hover { border-color: var(--primary); color: var(--primary); }
.sig { display: inline-flex; gap: .35em; direction: rtl; align-items: center; }
.sig i { display: block; border-radius: 50%; opacity: .2; transform: scale(.75); animation: sigOn 1.2s infinite; }
.sig i:nth-child(1) { background: var(--sig-red); width: .6em; height: .6em; }
.sig i:nth-child(2) { background: var(--sig-yellow); width: .85em; height: .85em; animation-delay: .25s; }
.sig i:nth-child(3) { background: var(--sig-green); width: 1.1em; height: 1.1em; animation-delay: .5s; }
@keyframes sigOn { 0%, 100% { opacity: .2; transform: scale(.75); } 30%, 60% { opacity: 1; transform: scale(1); } }
.loader-dots { font-size: 26px; margin: 18px auto 10px; justify-content: center; }
#splash { position: fixed; inset: 0; z-index: 100; background: #0E3B43; display: grid; place-items: center; transition: opacity .35s ease; }
#splash.out { opacity: 0; pointer-events: none; }
#splash .sp { position: relative; width: min(88vw, 520px); }
#splash .sp img { width: 100%; display: block; opacity: 0; transition: opacity .4s ease; }
#splash .sp.done img { opacity: 1; }
#splash .sp-dots { position: absolute; left: 0; right: 0; top: 0; height: 100%; }
#splash .sp-dots b { position: absolute; border-radius: 50%; opacity: .12; transform: scale(.6); transition: opacity .22s ease, transform .22s ease; }
#splash .sp-dots b.on { opacity: 1; transform: scale(1); }
#splash .sp.done .sp-dots { display: none; }
@media (prefers-reduced-motion: reduce) { .sig i { animation: none; opacity: 1; transform: none; } }
@media (max-width: 480px) {
  .topbar { padding: 10px 12px; }
  .brand-logo { height: 32px; }
  .topbar nav { gap: 9px; }
  .topbar nav a { font-size: 14px; }
  .theme-btn, .lang-btn { width: 30px; min-width: 30px; height: 28px; padding: 0; font-size: 12px; }
}

/* ---------- doctor card ---------- */
.avatar.ph { padding: 0; overflow: hidden; }
.avatar.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 76px; height: 76px; font-size: 24px; border-radius: 18px; flex-shrink: 0; }
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.dcard-top { display: flex; gap: 14px; padding: 16px 16px 10px; color: var(--ink); }
.dcard-top .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dcard-top h3 { margin: 0; font-size: 19px; line-height: 1.4; color: var(--ink); }
.verified-ic { color: var(--primary); font-size: 20px; vertical-align: -3px; }
.dc-sub { color: var(--muted); font-size: 15px; }
.dcard-body { display: flex; flex-direction: column; gap: 8px; padding: 6px 16px 14px; }
.dc-row { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.dc-row .ti { color: var(--primary); font-size: 18px; margin-top: 2px; }
.dc-row span { flex: 1; }
.dc-row b { color: var(--ink); }
.dc-row .price { color: var(--primary); font-size: 17px; }
.dc-row .dist { background: var(--primary-soft); color: var(--ink); border-radius: 999px; padding: 1px 10px; font-size: 13px; white-space: nowrap; }
.crowd { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; background: var(--surface-2); color: var(--ink); }
.crowd.c-g { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sig-green) 55%, transparent); }
.crowd.c-y { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sig-yellow) 60%, transparent); }
.crowd.c-r { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sig-red) 60%, transparent); }
.sig-static { font-size: 13px; }
.sig-static i { animation: none; opacity: .22; transform: none; }
.sig-static i.on { opacity: 1; }
.dcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--surface-2); border-top: 1px solid var(--line); }
.dcard-foot .next { font-size: 15px; font-weight: 600; }
.btn-go { background: var(--sig-green); border-color: var(--sig-green); color: #0B2F35; min-width: 96px; font-size: 16px; }
:root[data-theme="light"] .btn-go { background: #0B7A3E; border-color: #0B7A3E; color: #fff; }
h2 .count { font-weight: 400; font-size: 15px; white-space: nowrap; }
.find-sticky { position: fixed; top: 64px; inset-inline: 12px; z-index: 9; margin: 0 auto; max-width: 736px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 600; box-shadow: var(--shadow); cursor: pointer; text-align: start; }
.find-sticky[hidden] { display: none; }
.photo-edit { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px dashed var(--line); border-radius: 14px; }
.photo-edit .grow { display: flex; flex-direction: column; gap: 4px; }
.photo-edit label.btn { flex-direction: row; font-weight: 600; }

/* ---------- category icons ---------- */
.tile { gap: 8px; min-height: 118px; transition: transform .15s ease, border-color .15s ease; --k: var(--primary); }
.tile.k-diagnostics { --k: var(--sig-yellow); }
.tile.k-therapy { --k: var(--sig-green); }
.tile-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--k) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 45%, transparent);
  transition: background .15s ease, transform .15s ease; }
.tile .tile-ic i { font-size: 30px; color: var(--k); transition: color .15s ease; }
.tile span:not(.tile-ic) { font-size: 15px; font-weight: 600; }
.tile:hover, .tile:focus-visible { transform: translateY(-2px); border-color: var(--k); }
.tile:hover .tile-ic, .tile:active .tile-ic { background: var(--k); transform: scale(1.06); }
.tile:hover .tile-ic i, .tile:active .tile-ic i { color: #0B2F35; }
:root[data-theme="light"] .tile.k-diagnostics { --k: #8A6400; }
:root[data-theme="light"] .tile.k-therapy { --k: #0B7A3E; }
:root[data-theme="light"] .tile:hover .tile-ic i { color: #fff; }

/* ---------- home services ---------- */
.brand:focus { outline: none; }
.brand:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 8px; }
.nav-home { display: inline-flex; align-items: center; gap: 4px; position: relative; color: var(--primary) !important; }
.nav-home .ti { font-size: 18px; }
.soon-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sig-yellow); display: inline-block; margin-inline-start: 2px; }
@media (max-width: 480px) { .nav-home .nh-t { display: none; } }
.soon { display: inline-block; background: var(--sig-yellow); color: #3A2E00; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; vertical-align: middle; }
.soon.big { font-size: 14px; padding: 3px 14px; }
.hc-banner { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.hc-banner .grow { display: flex; flex-direction: column; gap: 2px; }
.hc-banner .grow strong { font-size: 18px; }
.hc-banner > .ti { color: var(--muted); font-size: 22px; }
html[dir=ltr] .hc-banner > .ti { transform: scaleX(-1); }
.hc-ic { width: 56px; height: 56px; flex-shrink: 0; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 45%, transparent); }
.hc-ic .ti { font-size: 30px; color: var(--primary); }
.hc-hero { padding: 18px 2px 4px; }
.hc-hero h1 { font-size: clamp(28px, 6vw, 40px); margin: 10px 0 8px; }
.hc-trust { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.hc-trust li { display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: 15px; }
.hc-trust .ti { color: var(--sig-green); font-size: 20px; }
:root[data-theme="light"] .hc-trust .ti { color: #0B7A3E; }
.hc-card { display: flex; flex-direction: column; gap: 12px; }
.hc-head { display: flex; gap: 14px; align-items: flex-start; }
.hc-head h2 { margin: 0 0 4px; }
.hc-head p { margin: 0; }
.hc-card > .btn { align-self: flex-start; }
.hc-done { margin: 0; color: var(--ok); font-weight: 600; display: flex; gap: 8px; align-items: center; }
:root[data-theme="light"] .toast.ok { color: #fff; }
@media (max-width: 400px) { .topbar nav { gap: 7px; } .topbar nav a { font-size: 13px; } .brand-logo { height: 28px; } }
:root[data-theme="light"] .toast.err { color: #fff; }

/* ---------- mandatory account data ---------- */
.onb-backdrop { z-index: 120; }
.onb-sheet { display: flex; flex-direction: column; gap: 12px; }
.onb-field { display: flex; flex-direction: column; gap: 6px; }
.onb-label { font-weight: 600; }
.onb-gender { display: grid; grid-template-columns: 1fr 1fr; }
.onb-gender button { min-height: 46px; font-size: 16px; }
.onb-gender button:disabled { opacity: .85; cursor: default; }
.onb-note { font-size: 13px; }
.acc-gender { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.onb-gender button { color: var(--ink); }
.onb-gender button.on { background: var(--primary); color: var(--primary-ink); }
.avatar.xs { width: 24px; height: 24px; font-size: 11px; border-radius: 50%; flex-shrink: 0; }
.my-photo { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; cursor: pointer; }
/* ---------- owner billing ---------- */
.bill-month { display: flex; align-items: center; gap: 6px; }
.bill-amt { font-size: 18px; white-space: nowrap; }
.item.bill-paid .bill-amt { color: var(--ok); }
.item.bill-paid .bill-amt::after { content: ' ✓'; }
.owner .stat.warn b { color: var(--warn); }
.bill-info p { margin: 0 0 6px; }
/* ---------- home stats (shown only after 10+ clinics) ---------- */
.hero-stats { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px 18px; margin-top: 14px; }
.hero-stats span { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--muted); }
.hero-stats b { font-size: 22px; color: var(--ink); line-height: 1.2; }

/* ---------- "get the app" guide ---------- */
.app-banner { display: flex; gap: 12px; align-items: flex-start; }
.app-banner .grow { display: flex; flex-direction: column; gap: 4px; }
.app-btns { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.app-btns .btn { flex: 1; min-width: 120px; justify-content: center; }
.ig-sheet { display: flex; flex-direction: column; gap: 12px; }
.ig-os { display: grid; grid-template-columns: 1fr 1fr; }
.ig-os button { min-height: 44px; font-size: 16px; color: var(--ink); }
.ig-os button.on { background: var(--primary); color: var(--primary-ink); }
.ig-onetap { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border: 1px dashed var(--primary); border-radius: 14px; }
.ig-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .ig-steps { grid-template-columns: 1fr 1fr; } }
.ig-step { position: relative; display: flex; gap: 12px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.ig-num { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-inline-end: 6px; border-radius: 50%; background: var(--accent); color: #0B2F35; font-weight: 800; font-size: 13px; vertical-align: 2px; }
.ig-pic { width: 104px; flex-shrink: 0; height: auto; }
.ig-txt { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.ig-txt .muted { font-size: 13px; line-height: 1.7; }
.ig-body { fill: #0A2328; stroke: var(--line); stroke-width: 2; }
.ig-screen { fill: #F4FAF9; }
.ig-bar { fill: #E2EEEC; }
.ig-faint { fill: #D3E3E0; }
.ig-faint-i { fill: none; stroke: #9DB6B2; stroke-width: 2; stroke-linecap: round; }
.ig-faint-i circle { fill: #9DB6B2; stroke: none; }
.ig-menu { fill: #FFFFFF; stroke: #CFE0DD; }
.ig-hl { fill: #D6F7EC; stroke: #20B07A; stroke-width: 2; }
.ig-share { fill: none; stroke: #0A84FF; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ig-share-f circle { fill: #0A84FF; }
.ig-safari { fill: #E8F2FF; stroke: #0A84FF; stroke-width: 3; }
.ig-needle { fill: #F10C19; }
.ig-dot { fill: #0E3B43; }
.ig-url { font: 600 10px system-ui, sans-serif; fill: #0E3B43; text-anchor: middle; }
.ig-t { font: 700 9px "Noto Kufi Arabic", system-ui, sans-serif; fill: #0E3B43; direction: rtl; text-anchor: start; unicode-bidi: plaintext; }
.ig-t.ig-sm { font-size: 9px; }
.ig-t.ig-mid { text-anchor: middle; font-size: 11px; }
.ig-tap .ig-ring { fill: none; stroke: #F10C19; stroke-width: 2.5; }
.ig-tap .ig-dot { fill: #F10C19; }
.ig-tap { animation: igPulse 1.6s ease-in-out infinite; }
@keyframes igPulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .ig-tap { animation: none; } }
.ig-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0; font-size: 14px; }
.ig-inapp { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--warn-soft); border: 1px solid var(--warn); }
.ig-inapp .muted { font-size: 13px; }

/* ---------- nav: phones get logo + حجوزاتي + ☰ ---------- */
.nav-wide { display: contents; }
.nav-burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; place-items: center; font-size: 22px; }
.nav-menu { position: fixed; top: 64px; inset-inline-end: 12px; z-index: 60; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-menu[hidden] { display: none; }
.nav-menu a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; color: var(--ink) !important; font-size: 16px !important; font-weight: 600; text-decoration: none; }
.nav-menu a:hover { background: var(--surface-2); }
.nav-menu .ti { font-size: 20px; color: var(--primary); }
.nav-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); margin-top: 4px; color: var(--muted); font-size: 14px; }
.nav-menu-tools { display: flex; gap: 8px; }
@media (max-width: 700px) {
  .nav-wide { display: none; }
  .nav-burger { display: inline-grid; }
  .topbar nav { overflow: visible; }
}
@media (min-width: 701px) { .nav-menu { display: none !important; } }

/* ---------- home banner (animated) ---------- */
.hero2 { position: relative; overflow: hidden; border-radius: 24px; padding: 28px 22px 22px; margin-bottom: 14px;
  background: #0E3B43; color: #FFFFFF; display: grid; gap: 18px; border: 1px solid rgba(255,255,255,.08); }
:root[data-theme="light"] .hero2 { background: #0E3B43; }
.hero2::before { content: ''; position: absolute; top: -50px; left: -50px; width: 200px; height: 200px; border-radius: 50%; background: rgba(121,221,196,.10); }
.hero2-text { position: relative; display: flex; flex-direction: column; gap: 14px; }
.hero2-eyebrow { margin: 0; display: flex; align-items: center; gap: 8px; color: #F6D438; font-weight: 700; font-size: 15px; }
.h2dots { display: inline-flex; gap: 5px; }
.h2dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.h2dots i:nth-child(1) { background: #F10C19; } .h2dots i:nth-child(2) { background: #F6D438; } .h2dots i:nth-child(3) { background: #20E875; }
.hero2 h1 { margin: 0; font-size: clamp(28px, 6.5vw, 50px); line-height: 1.45; font-weight: 800; color: #FFFFFF; }
.hero2-lead { margin: 0; font-size: 16px; line-height: 1.9; color: #D5E8E4; max-width: 520px; }
.hero2-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hero2-btns .btn { flex: 1 1 0; min-width: 0; min-height: 54px; justify-content: center; font-size: 16px; font-weight: 800; white-space: nowrap; padding: 0 12px; gap: 6px; }
.hero2-doc { background: transparent; border: 1.5px solid #79DDC4; color: #FFFFFF; }
.hero2-doc:hover { background: rgba(121,221,196,.12); color: #FFFFFF; }
.hero2 .hero-stats { justify-content: flex-start; }
.hero2 .hero-stats span { color: #BFD6D2; }
.hero2 .hero-stats b { color: #FFFFFF; }
.hero2-art { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero2-note { min-height: 0; padding: 10px 14px; border-radius: 14px; background: #FFFFFF; color: #0B2F35; box-shadow: 0 10px 24px rgba(0,0,0,.3); display: flex; gap: 10px; align-items: center; animation: noteIn .35s ease; }
.hero2-note[hidden] { display: flex; visibility: hidden; }
.hn-ic { width: 34px; height: 34px; border-radius: 10px; background: #FFF4C2; color: #9A7A00; display: grid; place-items: center; font-size: 19px; }
.hero2-note b { display: block; font-size: 14px; } .hero2-note small { display: block; font-size: 12px; color: #35575C; font-weight: 600; }
@keyframes noteIn { from { transform: translateY(-6px); opacity: 0; } }
.hero2-phone { width: 250px; border-radius: 26px; padding: 10px; background: #072226; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.hero2-screen { border-radius: 18px; background: #F4FAF9; color: #0B2F35; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.hp-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #35575C; font-weight: 600; }
.hp-lights { display: flex; gap: 4px; }
.hp-lights i { width: 9px; height: 9px; border-radius: 50%; background: #D3E3E0; transition: background .4s; }
.hp-lights.l-r i:nth-child(1) { background: #F10C19; } .hp-lights.l-y i:nth-child(2) { background: #E2B800; } .hp-lights.l-g i:nth-child(3) { background: #20B07A; }
.hp-num { display: flex; align-items: baseline; gap: 8px; } .hp-num span { font-size: 14px; font-weight: 700; }
.hp-num b { font-size: 46px; line-height: 1; font-weight: 800; } .hp-num b.ok { color: #0E7A55; }
.hp-line { font-size: 14px; font-weight: 700; min-height: 24px; }
.hp-bar { height: 8px; border-radius: 6px; background: #D3E3E0; overflow: hidden; }
.hp-bar span { display: block; height: 100%; border-radius: 6px; transition: width .8s ease; }
.hp-bar .l-r { background: #E0444C; } .hp-bar .l-y { background: #E2B800; } .hp-bar .l-g { background: #20B07A; }
.hp-arr { font-size: 12px; font-weight: 700; color: #0E7A55; display: flex; align-items: center; gap: 6px; }
@media (min-width: 820px) {
  .hero2 { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 48px 52px; gap: 36px; }
  .hero2-btns .btn { flex: 0 0 auto; padding: 0 30px; }
  .hero2-phone { width: 290px; }
}
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sec-head h2 { margin: 0 0 10px; }
.linkish { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; padding: 8px 0; }
.tiles-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 380px) { .tiles-8 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.doc-cta { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.doc-cta .grow { display: flex; flex-direction: column; gap: 2px; }
.doc-cta > .ti:first-child { font-size: 26px; color: var(--primary); }

/* ---------- عياداتي: one card per branch ---------- */
.bcards { display: grid; gap: 14px; }
@media (min-width: 900px) { .bcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bcard { border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.bcard.off { opacity: .65; }
.bcard-h { display: flex; gap: 10px; align-items: flex-start; }
.bcard-h h3 { margin: 0 0 4px; font-size: 18px; }
.bcard-h .grow { display: flex; flex-direction: column; }
.bsec { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.bsec-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }
.bsec-h .ti { color: var(--primary); }
.bh-row { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; }
.bh-row span { color: var(--muted); }
.bprice label { min-width: 120px; }
.bsec-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.bsec-add input { flex: 1; min-width: 0; }
.bcard-f { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.small { font-size: 12px; }
.who-seg { display: grid; grid-template-columns: 1fr 1fr; } .who-seg button { color: var(--ink); min-height: 44px; } .who-seg button.on { background: var(--primary); color: var(--primary-ink); }
.btn-arrived { border-color: var(--sig-green); color: var(--ink); }
.btn-arrived .ti { color: var(--sig-green); }
.btn-arrived.on { background: color-mix(in srgb, var(--sig-green) 18%, var(--surface)); }
.arr-banner { display: flex; gap: 10px; align-items: center; }
.arr-banner .ti { font-size: 24px; color: var(--sig-green); }
.arr-note { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ink); font-size: 15px; font-weight: 700; display: flex; gap: 8px; align-items: center; } .arr-note .ti { color: var(--ok); font-size: 20px; }
.review-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.rev-report { font-size: 13px; color: var(--muted); font-weight: 600; }
.rev-report:hover { color: var(--danger); }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 700; }
.danger-zone[open] summary { margin-bottom: 8px; }
.join-login{margin:0;font-size:.95rem;color:var(--muted)}
.join-login a{font-weight:700}
.login-title{display:flex;align-items:center;gap:8px;font-size:1.15rem;margin:0 0 12px}
