/* inCall — الهوية العملية: واضحة تحت الشمس، مريحة في الليل */
:root{
  --bg:#EEF1F5;--surface:#FFFFFF;--surface2:#F3F5F8;--line:#CBD3DD;--text:#0B1220;--muted:#3F4B5C;--faint:#5F6B7B;
  --primary:#1D4ED8;--onPrimary:#FFFFFF;--primarySoft:#E0E8FF;--primaryText:#1D4ED8;
  --ok:#0E7A3E;--okSoft:#DDF3E6;--okText:#0B6B35;--warn:#B45309;--warnSoft:#FFEFD9;--warnText:#8F4204;
  --bad:#B42318;--badSoft:#FDE4E1;--badText:#9A1D14;--violet:#6D28D9;--violetSoft:#EDE7FE;
  --shadow:0 1px 2px rgba(11,18,32,.06),0 6px 16px rgba(11,18,32,.07);
  --btnShadow:0 8px 18px rgba(29,78,216,.28),inset 0 1px 0 rgba(255,255,255,.22);
  --overlay:rgba(11,18,32,.45);
  color-scheme:light;
}
:root.dark{
  --bg:#0A0E13;--surface:#141A22;--surface2:#1B232D;--line:#2B3644;--text:#F4F6F9;--muted:#B4BECB;--faint:#8A96A6;
  --primary:#6E9BFF;--onPrimary:#07101F;--primarySoft:rgba(110,155,255,.16);--primaryText:#8DB0FF;
  --ok:#2FB46B;--okSoft:rgba(63,203,126,.15);--okText:#5FE09A;--warn:#D9860B;--warnSoft:rgba(245,165,36,.15);--warnText:#F8B94F;
  --bad:#E5483B;--badSoft:rgba(255,107,94,.15);--badText:#FF8A80;--violet:#A78BFA;--violetSoft:rgba(167,139,250,.16);
  --shadow:none;--btnShadow:0 8px 20px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.28);--overlay:rgba(0,0,0,.6);
  color-scheme:dark;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%}
body{background:var(--bg);color:var(--text);font-family:'IBM Plex Sans Arabic',system-ui,-apple-system,'Segoe UI',Tahoma,sans-serif;font-size:15px;line-height:1.5;transition:background .3s}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--primaryText)}
button,a,.tap{transition:transform .12s ease,box-shadow .2s ease,background-color .2s ease}
button:active,a:active,.tap:active{transform:scale(.97)}
:focus-visible{outline:3px solid #6E9BFF;outline-offset:2px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@keyframes pulse{0%{transform:scale(.7);opacity:.6}100%{transform:scale(2.4);opacity:0}}
@keyframes rise{0%{transform:translateY(12px);opacity:0}100%{transform:none;opacity:1}}
@keyframes spin{to{transform:rotate(360deg)}}

#app{max-width:560px;margin:0 auto;min-height:100%;padding-bottom:96px}
.page{padding:16px;display:flex;flex-direction:column;gap:14px;animation:rise .25s ease-out}
.row{display:flex;align-items:center;gap:10px}
.col{display:flex;flex-direction:column;gap:4px}
.grow{flex:1;min-width:0}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.muted{color:var(--muted)}.faint{color:var(--faint)}
.small{font-size:12px}.xs{font-size:11px}
.b{font-weight:700}.sb{font-weight:600}
h1{margin:0;font-size:22px;font-weight:700}
h2{margin:0;font-size:17px;font-weight:700}
.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.card{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:16px;box-shadow:var(--shadow)}
.card.tight{padding:12px}
.soft{background:var(--surface2);border:1px solid var(--line);border-radius:16px;padding:12px}

.btn{min-height:52px;border-radius:16px;border:1.5px solid var(--line);background:var(--surface);font-weight:700;font-size:15px;padding:0 16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;color:var(--text)}
.btn.primary{border:0;background:var(--primary);color:var(--onPrimary);box-shadow:var(--btnShadow)}
.btn.ok{border:0;background:var(--ok);color:#fff;box-shadow:0 8px 20px rgba(14,122,62,.3)}
.btn.warn{border:0;background:var(--warn);color:#fff}
.btn.danger{border:1.5px solid var(--bad);background:var(--badSoft);color:var(--badText)}
.btn.block{width:100%}
.btn.big{min-height:58px;font-size:16px}
.btn.sm{min-height:42px;border-radius:12px;font-size:13px;padding:0 12px}
.btn[disabled]{opacity:.55;pointer-events:none;box-shadow:none}
.icon-btn{width:46px;height:46px;border-radius:15px;border:1px solid var(--line);background:var(--surface);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;color:var(--text);text-decoration:none}
.ico{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.ico.f{fill:currentColor;fill-opacity:.18}
.ico.sm{width:18px;height:18px}

.chips{display:flex;flex-wrap:wrap;gap:8px}
.chips.scroll{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}
.chip{flex:0 0 auto;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-weight:600;font-size:14px;display:inline-flex;align-items:center;gap:6px}
.chip.on{border:1.5px solid var(--primary);background:var(--primarySoft);color:var(--primaryText);font-weight:700}
.seg{display:flex;padding:4px;border-radius:14px;background:var(--surface);border:1px solid var(--line);gap:4px}
.seg button{flex:1;min-height:44px;border-radius:10px;border:0;background:transparent;color:var(--muted);font-weight:600;font-size:14px;display:flex;align-items:center;justify-content:center;gap:6px}
.seg button.on{background:var(--primary);color:var(--onPrimary);font-weight:700;box-shadow:var(--btnShadow)}
.tag{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.tag.ok{background:var(--okSoft);color:var(--okText)}.tag.warn{background:var(--warnSoft);color:var(--warnText)}
.tag.pri{background:var(--primarySoft);color:var(--primaryText)}.tag.bad{background:var(--badSoft);color:var(--badText)}
.tag.gray{background:var(--surface2);color:var(--muted);border:1px solid var(--line)}
.dot{position:relative;width:10px;height:10px;flex:0 0 auto}
.dot::before,.dot::after{content:'';position:absolute;inset:0;border-radius:50%;background:currentColor}
.dot::before{animation:pulse 1.6s ease-out infinite}

label.f{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700}
.input{width:100%;min-height:54px;border-radius:14px;border:1.5px solid var(--line);background:var(--surface);padding:0 14px;font-size:16px;font-weight:600}
.input:focus{border-color:var(--primary);outline:none}
textarea.input{padding:12px 14px;min-height:80px;resize:vertical}
.input.big{font-size:22px;font-weight:700}
.hint{font-size:12px;color:var(--muted);font-weight:500}
.err{padding:12px 14px;border-radius:14px;background:var(--badSoft);color:var(--badText);font-weight:700;font-size:14px}

.opt{min-height:64px;border-radius:16px;border:1px solid var(--line);background:var(--surface);display:flex;align-items:center;gap:12px;padding:10px 12px;text-align:right;width:100%}
.opt.on{border:2px solid var(--primary);background:var(--primarySoft)}
.svc{position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px;min-height:112px;border-radius:22px;border:1px solid var(--line);background:var(--surface);text-align:right;box-shadow:var(--shadow);width:100%}
.svc .glow{position:absolute;left:-18px;bottom:-18px;width:70px;height:70px;border-radius:50%;opacity:.12}
.badge-ico{width:46px;height:46px;border-radius:15px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}

.topbar{display:flex;align-items:center;gap:10px}
.logo{display:flex;align-items:center;gap:8px;font-weight:700;font-size:20px;direction:ltr}
.logo i{width:34px;height:34px;border-radius:11px;background:var(--primary);color:var(--onPrimary);display:flex;align-items:center;justify-content:center;font-style:normal}

.map{height:220px;border-radius:22px;overflow:hidden;border:1px solid var(--line);box-shadow:var(--shadow);background:var(--surface2);position:relative;z-index:0}
.map.tall{height:300px}
.map-chip{position:absolute;z-index:500;top:10px;right:10px;padding:5px 10px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:12px;font-weight:700;display:flex;align-items:center;gap:6px;box-shadow:var(--shadow)}
.leaflet-container{font-family:inherit;background:var(--surface2)}
:root.dark .leaflet-tile-pane{filter:brightness(.62) invert(1) contrast(3) hue-rotate(200deg) saturate(.3) brightness(.7)}
.pin-me{width:22px;height:22px;border-radius:50%;background:var(--primary);border:4px solid #fff;box-shadow:0 0 0 6px rgba(29,78,216,.25),0 2px 6px rgba(0,0,0,.35)}
.pin-drv{width:34px;height:34px;border-radius:12px;background:var(--primary);color:#fff;border:3px solid #fff;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 8px rgba(0,0,0,.35)}
.pin-dst{width:34px;height:34px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:var(--warn);border:3px solid #fff;box-shadow:0 3px 8px rgba(0,0,0,.35)}

.nav{position:fixed;bottom:0;right:0;left:0;z-index:900;background:var(--surface);border-top:1px solid var(--line);padding:6px 8px calc(10px + env(safe-area-inset-bottom))}
.nav-in{max-width:560px;margin:0 auto;display:flex}
.nav a{flex:1;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:12px;font-weight:600;color:var(--muted);text-decoration:none}
.nav a .pill{width:58px;height:32px;border-radius:999px;display:flex;align-items:center;justify-content:center;position:relative}
.nav a.on{color:var(--primaryText);font-weight:700}
.nav a.on .pill{background:var(--primarySoft)}
.nav a.on .ico{fill:currentColor;fill-opacity:.22}
.nav .badge{position:absolute;top:-2px;left:8px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:var(--bad);color:#fff;border:2px solid var(--surface);font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center}

.toast{position:fixed;z-index:2000;right:16px;left:16px;bottom:110px;display:flex;justify-content:center;pointer-events:none}
.toast span{max-width:520px;padding:12px 16px;border-radius:14px;background:var(--text);color:var(--bg);font-size:14px;font-weight:700;text-align:center;box-shadow:0 8px 24px rgba(0,0,0,.3);animation:rise .25s ease-out}
.sheet-wrap{position:fixed;inset:0;z-index:1500;background:var(--overlay);display:flex;flex-direction:column;justify-content:flex-end}
.sheet{background:var(--surface);border-radius:26px 26px 0 0;padding:18px 16px calc(22px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;max-height:88vh;overflow-y:auto;max-width:560px;width:100%;margin:0 auto;animation:rise .25s ease-out}

.steps{display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,1fr));gap:6px}
.steps button{min-height:54px;border-radius:14px;border:1px solid var(--line);background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:12px;font-weight:700;color:var(--muted)}
.steps button i{width:22px;height:22px;border-radius:50%;background:var(--surface2);display:flex;align-items:center;justify-content:center;font-style:normal;font-size:12px}
.steps button.on{border:0;background:var(--primary);color:var(--onPrimary);box-shadow:var(--btnShadow)}
.steps button.on i{background:rgba(255,255,255,.22)}
.steps button.done{border-color:var(--ok);background:var(--okSoft);color:var(--okText)}
.steps button.done i{background:var(--ok);color:#fff}
.footer-bar{position:sticky;bottom:96px;background:var(--bg);padding-top:6px;display:flex;gap:10px;z-index:5}

.timeline{display:flex;flex-direction:column}
.tl{display:flex;gap:12px}
.tl .rail{display:flex;flex-direction:column;align-items:center;width:34px;flex:0 0 auto}
.tl .node{width:34px;height:34px;border-radius:11px;display:flex;align-items:center;justify-content:center;border:1.5px solid var(--line);background:var(--surface2);color:var(--faint)}
.tl .bar{width:3px;flex:1;min-height:12px;border-radius:3px;margin:3px 0;background:var(--line)}
.tl .txt{flex:1;display:flex;justify-content:space-between;gap:8px;padding:6px 10px 14px;border-radius:12px}
.hero{border-radius:22px;padding:16px;display:flex;flex-direction:column;gap:12px}
.segbar{display:grid;gap:4px}
.segbar span{height:7px;border-radius:7px;background:var(--line);transition:background .4s}

.bubble{max-width:82%;padding:9px 13px;border-radius:16px;font-size:14px;line-height:1.6}
.bubble.me{align-self:flex-end;background:var(--primary);color:var(--onPrimary);border-bottom-left-radius:5px}
.bubble.them{align-self:flex-start;background:var(--surface2);border:1px solid var(--line);border-bottom-right-radius:5px}
.empty{padding:22px 16px;border-radius:20px;border:1.5px dashed var(--line);text-align:center;color:var(--muted);display:flex;flex-direction:column;gap:10px;align-items: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:40px auto}
.install{display:flex;gap:12px;align-items:center;padding:12px 14px;border-radius:18px;background:var(--primarySoft);border:1px solid var(--primary)}
