/* Tenaghem — shell styles. A module may add its own rules at the end of this file. */
:root{
  --bg:#000; --surface:#0d0713; --line:#2a1a3d;
  --txt:#ffffff; --txt2:#ececec; --muted:#a3a3a3; --ph:#6f6f6f;
  --mine:#241035; --mine-txt:#ffffff; --other:#0d0a12;
  --safe-t:env(safe-area-inset-top,0px); --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;height:100%;background:var(--bg);color:var(--txt);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Kufi Arabic","Noto Sans Arabic",system-ui,sans-serif;
  font-size:16px;overscroll-behavior:none}
button,input,textarea{font-family:inherit;font-size:inherit;color:inherit}
input::placeholder,textarea::placeholder{color:var(--ph);opacity:1}
button{background:none;border:0;padding:0;cursor:pointer}
.hide{display:none!important}
#app{height:100%;display:flex;flex-direction:column}
.view{position:fixed;inset:0;display:flex;flex-direction:column;background:var(--bg)}
/* ---------- auth ---------- */
#v-auth{overflow-y:auto;padding:calc(28px + var(--safe-t)) 22px calc(28px + var(--safe-b))}
.auth-wrap{max-width:420px;width:100%;margin:auto}
.logo{width:96px;height:96px;border-radius:22px;display:block;margin:0 auto 14px;box-shadow:0 8px 30px rgba(168,85,247,.28)}
h1{font-size:30px;margin:0;text-align:center;letter-spacing:-.5px}
.sub{color:var(--muted);text-align:center;margin:6px 0 26px;font-size:14px}
.tabs{display:flex;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:4px;margin-bottom:18px}
.tab{flex:1;padding:11px 0;border-radius:11px;color:var(--muted);font-weight:600;font-size:15px}
.tab.on{background:#a855f7;color:#14061f}
.form{display:flex;flex-direction:column;gap:6px}
.form label{font-size:13px;color:var(--muted);margin:10px 2px 0}
.form input{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:14px 14px;outline:none;font-size:16px}
.form input:focus{border-color:#a855f7}
.btn{margin-top:18px;padding:15px;border-radius:14px;font-weight:700;font-size:16px}
.btn.primary{background:#a855f7;color:#14061f}
.btn:disabled{opacity:.5}
.msg{min-height:22px;text-align:center;font-size:14px;margin:14px 0 0;color:#ff6b6b}
.msg.ok{color:#ececec}
/* ---------- bars ---------- */
.bar{display:flex;align-items:center;gap:12px;padding:calc(10px + var(--safe-t)) 14px 10px;
  background:var(--bg);border-bottom:1px solid var(--line);flex:0 0 auto}
.me{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.me .t{font-weight:700;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.me .s{font-size:12px;color:var(--muted)}
.av{width:40px;height:40px;border-radius:50%;background:#1c1030;color:var(--txt2);display:flex;align-items:center;
  justify-content:center;font-weight:700;font-size:17px;flex:0 0 auto;overflow:hidden}
.av img{width:100%;height:100%;object-fit:cover}
.icon-btn{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--txt);flex:0 0 auto}
.icon-btn:active{background:#1a0f2b}
.icon-btn svg{width:22px;height:22px;fill:currentColor}
/* ---------- threads ---------- */
.list{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}
.thread{display:flex;gap:12px;align-items:center;padding:13px 16px;border-bottom:1px solid #1a1026}
.thread:active{background:#150c22}
.thread .body{flex:1;min-width:0}
.thread .top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.thread .name{font-weight:600;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thread .time{font-size:11px;color:var(--muted);flex:0 0 auto}
.thread .last{font-size:13.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
.badge{min-width:20px;height:20px;border-radius:10px;background:#a855f7;color:#14061f;font-size:11.5px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 6px;margin-inline-start:8px;flex:0 0 auto}
.empty{padding:60px 24px;text-align:center;color:var(--muted);line-height:1.8}
.fab{position:fixed;left:18px;bottom:calc(76px + var(--safe-b));width:58px;height:58px;border-radius:50%;
  background:#ffffff;color:#000000;font-size:30px;line-height:1;display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 24px rgba(0,0,0,.6);z-index:6;transition:background .12s ease}
.fab.on{background:#a855f7;color:#14061f}
#fab-menu{position:fixed;left:18px;bottom:calc(144px + var(--safe-b));z-index:7;background:#150c22;
  border:1px solid #3a2160;border-radius:14px;padding:6px;min-width:186px;box-shadow:0 12px 30px rgba(0,0,0,.75)}
#fab-menu button{display:flex;align-items:center;gap:10px;width:100%;text-align:right;padding:11px 12px;
  border-radius:10px;color:#ffffff;font-size:15px;font-weight:600}
#fab-menu button:active{background:#221334}
#fab-menu svg{width:20px;height:20px;fill:#ffffff;flex:0 0 auto}
/* ---------- chat ---------- */
.msgs{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px 12px 8px;display:flex;flex-direction:column;gap:6px}
.row{display:flex;width:100%}
.row.mine{justify-content:flex-end}
.row.other{justify-content:flex-start}
.bub{max-width:78%;padding:9px 12px 7px;border-radius:18px;font-size:15.5px;line-height:1.45;
  word-wrap:break-word;overflow-wrap:anywhere;position:relative}
.mine .bub{background:var(--mine);color:var(--mine-txt);border-bottom-right-radius:6px}
.other .bub{background:var(--other);color:var(--txt2);border-bottom-left-radius:6px}
.bub .stamp{font-size:10.5px;opacity:.85;color:#bdbdbd;margin-top:4px;text-align:left;direction:ltr}
.tk{color:#bdbdbd}
.tk.on{color:#ffffff}
.bub img.ph{display:block;max-width:230px;max-height:290px;width:auto;border-radius:12px;margin:-3px 0 2px}
.bub.media{padding:5px 5px 4px}
.bub.media .stamp{padding:0 7px 2px}
.voice{display:flex;align-items:center;gap:10px;min-width:190px;padding:2px 2px}
.vbtn{width:36px;height:36px;border-radius:50%;background:#a855f7;color:#14061f;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.other .vbtn{background:#a855f7;color:#14061f}
.vbar{flex:1;height:3px;background:rgba(168,85,247,.28);border-radius:2px;overflow:hidden}
.other .vbar{background:rgba(201,166,250,.28)}
.vbar i{display:block;height:100%;width:0;background:#a855f7;transition:width .12s linear}
.other .vbar i{background:#ffffff}
.vtime{font-size:11.5px;opacity:.6;flex:0 0 auto;direction:ltr}
.composer{display:flex;align-items:flex-end;gap:6px;padding:8px 10px calc(8px + var(--safe-b));
  border-top:1px solid var(--line);background:var(--bg);flex:0 0 auto}
.composer textarea{flex:1;background:var(--surface);border:1px solid var(--line);border-radius:20px;
  padding:11px 15px;max-height:120px;resize:none;outline:none;line-height:1.4}
.send{background:#a855f7;color:#14061f}
.send svg{transform:scaleX(-1)}
.rec{display:flex;align-items:center;gap:14px;padding:10px 16px calc(10px + var(--safe-b));border-top:1px solid var(--line);background:#170c26}
.rec .dot{width:10px;height:10px;border-radius:50%;background:#ff4d4d;animation:pulse 1s infinite}
@keyframes pulse{50%{opacity:.25}}
.rec .t{font-variant-numeric:tabular-nums;direction:ltr}
.rec .sp{flex:1}
.rec button{padding:9px 14px;border-radius:11px;font-weight:600}
.rec .cancel{background:#2a1020;color:#ff8a9d}
.rec .ok{background:#a855f7;color:#14061f}
/* ---------- sheet ---------- */
#sheet{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:20;display:flex;align-items:flex-end}
#sheet .panel{width:100%;max-height:82%;background:#0a0710;border-top:1px solid var(--line);
  border-radius:20px 20px 0 0;display:flex;flex-direction:column;padding-bottom:var(--safe-b)}
#sheet .head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 10px}
#sheet .head b{font-size:17px}
#sheet .search{margin:0 16px 10px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:11px 14px;outline:none}
#sheet .users{overflow-y:auto;padding:0 0 10px}
#toast{position:fixed;bottom:calc(84px + var(--safe-b));left:50%;transform:translateX(-50%) translateY(20px);
  background:#1a0f2b;color:#ffffff;border:1px solid #3a2160;padding:10px 18px;border-radius:12px;font-size:14px;font-weight:600;opacity:0;
  transition:.22s;pointer-events:none;z-index:40;max-width:88%;text-align:center}
#toast.on{opacity:1;transform:translateX(-50%) translateY(0)}
/* ---------- splash ---------- */
#splash{position:fixed;inset:0;z-index:200;background:#000;display:flex;align-items:center;justify-content:center;
  transition:opacity .25s ease}
#splash.out{opacity:0;pointer-events:none}
.sp-in{display:flex;flex-direction:column;align-items:center;gap:28px}
.sp-logo{width:140px;height:140px;display:block}
.sp-ring{width:38px;height:38px;border-radius:50%;border:3px solid rgba(168,85,247,.28);
  border-top-color:#a855f7;animation:sp-spin .8s linear infinite}
@keyframes sp-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.sp-ring{animation-duration:2s}}
.bar .grow{flex:1}
.brand{width:40px;height:40px;display:block}
.menu{position:fixed;top:calc(58px + var(--safe-t));left:12px;z-index:30;background:#150c22;
  border:1px solid #3a2160;border-radius:12px;padding:6px;min-width:198px;max-height:calc(100vh - 130px);overflow-y:auto;box-shadow:0 12px 30px rgba(0,0,0,.75)}
.menu button{display:block;width:100%;text-align:right;padding:11px 14px;border-radius:9px;color:var(--txt2);font-size:15px;font-weight:600}
.menu button:active{background:#221334}
.tabbar{display:flex;border-top:1px solid var(--line);background:#08050c;padding-bottom:var(--safe-b);flex:0 0 auto}
.tb{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 0 7px;color:#ffffff;font-size:11px;font-weight:600}
.tb svg{width:23px;height:23px;fill:currentColor}
.tb.on{color:#ffffff}
.tb.on svg{fill:#a855f7}
.tb:active svg{fill:#a855f7}
/* ---------- status ---------- */
.srow{display:flex;gap:12px;align-items:center;padding:12px 16px;border-bottom:1px solid #1a1026}
.srow:active{background:#150c22}
.ring{width:52px;height:52px;border-radius:50%;padding:2.5px;background:linear-gradient(140deg,#a855f7,#7a3fd0);flex:0 0 auto}
.ring.seen{background:#2a1a3d}
.ring .av{width:100%;height:100%;border:2px solid #000}
.srow .nm{font-weight:600;font-size:16px}
.srow .tm{font-size:12px;color:var(--muted);margin-top:2px}
.srow .cnt{font-size:11.5px;color:var(--muted);margin-top:2px}
#sv{position:fixed;inset:0;z-index:60;background:#000;display:flex;flex-direction:column}
.sv-bars{display:flex;gap:4px;padding:calc(10px + var(--safe-t)) 12px 0}
.sv-bars i{flex:1;height:3px;border-radius:2px;background:#3a2160;overflow:hidden;display:block}
.sv-bars i b{display:block;height:100%;width:0;background:#ffffff}
.sv-bars i.done b{width:100%}
.sv-head{display:flex;align-items:center;gap:10px;padding:10px 14px}
.sv-who{flex:1;display:flex;flex-direction:column}
.sv-who b{font-size:15px}
.sv-who span{font-size:11.5px;color:var(--muted)}
.sv-body{flex:1;display:flex;align-items:center;justify-content:center;padding:0 22px 40px;text-align:center}
.sv-body .txt{font-size:24px;line-height:1.5;color:#ffffff;font-weight:600}
.sv-body img{max-width:100%;max-height:100%;border-radius:14px;object-fit:contain}
.sv-nav{position:absolute;top:70px;bottom:0;width:38%;background:none;border:0}
.sv-nav.prev{right:0}
.sv-nav.next{left:0}
.sheet-wrap{position:fixed;inset:0;background:rgba(0,0,0,.65);z-index:70;display:flex;align-items:flex-end}
.sheet-wrap .panel{width:100%;background:#0a0710;border-top:1px solid #3a2160;border-radius:20px 20px 0 0;
  padding:8px 16px calc(16px + var(--safe-b));display:flex;flex-direction:column;gap:10px}
.sheet-wrap .head{display:flex;align-items:center;justify-content:space-between;padding:8px 2px}
.sheet-wrap textarea{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px;
  min-height:110px;resize:none;outline:none;font-size:16px;color:var(--txt2)}
.swatches{display:flex;gap:10px}
.sw{width:34px;height:34px;border-radius:50%;border:2px solid #2a1a3d}
.sw.on{border-color:#a855f7}
/* ---------- calls ---------- */
#callui{position:fixed;inset:0;z-index:80;background:#08050c;display:flex;align-items:center;justify-content:center}
.cu-in{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;padding:0 24px}
.cu-name{font-size:22px;font-weight:700;color:var(--txt)}
.cu-st{font-size:14px;color:var(--muted)}
.cu-btns{display:flex;gap:18px;margin-top:22px}
.cu-btn{padding:14px 30px;border-radius:30px;font-weight:700;font-size:16px}
.cu-btn.no{background:#3a1020;color:#ff8a9d}
.cu-btn.ok{background:#1c7a44;color:#eaffef}
/* ---------- signup steps ---------- */
.step{display:flex;flex-direction:column;gap:10px}
.step label{font-size:13px;color:var(--muted);margin:10px 2px 0}
.step input{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:14px;outline:none;font-size:16px;color:var(--txt2)}
.step input:focus{border-color:#a855f7}
.step-t{text-align:center;color:var(--muted);font-size:14px;margin:4px 0 0}
.av.big{width:104px;height:104px;font-size:34px}
.pick-av{display:flex;justify-content:center;margin:6px 0 2px}
.pick-cover{height:124px;border-radius:16px;background:var(--surface);border:1px dashed var(--line);
  display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:13px;overflow:hidden}
.pick-cover img{width:100%;height:100%;object-fit:cover}
.btn.ghost{background:var(--surface);border:1px solid #3a2160;color:var(--txt2)}
.btn.link{background:none;color:var(--muted);padding:6px 0}
.sum{display:flex;flex-direction:column;align-items:center;gap:12px;margin:6px 0 4px;width:100%}
.sum-cover{width:100%;height:104px;border-radius:14px;background:var(--surface);border:1px solid var(--line);overflow:hidden;
  display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:13px}
.sum-cover img{width:100%;height:100%;object-fit:cover}
.sum-phone{color:var(--muted);font-size:15px;direction:ltr}
.name-bar{display:flex;gap:8px;padding:10px 14px;background:#120a1c;border-bottom:1px solid var(--line);flex:0 0 auto}
.name-bar input{flex:1;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px 12px;outline:none;font-size:15px}
.name-bar .btn{padding:0 16px;border-radius:12px;font-size:15px}
