:root{
  --ground:#eceeed;--glow-blue:#d6eeec;--glow-lime:#eef3da;
  --ink:#15181a;--ink-2:#3e4447;--muted:#80868a;
  --glass:rgba(255,255,255,.42);--glass-edge:rgba(255,255,255,.7);--glass-strong:rgba(255,255,255,.72);
  --hairline:rgba(0,0,0,.06);--hero-a:#11a8a2;--hero-b:#1e4a4f;
  --lime:#d9f53e;--lime-soft:#e3f59a;--good:#3c8a5a;--bad:#c0563b;
  --radius:16px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;color:var(--ink);font:300 14px/1.55 "IBM Plex Sans Arabic",system-ui,sans-serif;
  background:radial-gradient(60% 55% at 10% 100%,var(--glow-blue) 0%,transparent 70%),
  radial-gradient(55% 50% at 95% 0%,var(--glow-lime) 0%,transparent 70%),var(--ground);
  background-attachment:fixed;-webkit-font-smoothing:antialiased;overflow-x:hidden}
button,input,select,textarea{font:inherit;color:inherit}
button{border:0;background:none;cursor:pointer;padding:0}
:focus-visible{outline:2px solid var(--hero-b);outline-offset:2px;border-radius:8px}
[hidden]{display:none!important}
.num{font-family:Outfit,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.app{max-width:560px;margin:0 auto;min-height:100%;display:flex;flex-direction:column}
.top{display:flex;justify-content:space-between;align-items:center;padding:calc(12px + env(safe-area-inset-top)) 16px 6px;gap:8px}
.logo{font-weight:500;font-size:20px}
.iconbtn{width:36px;height:36px;border-radius:10px;background:rgba(255,255,255,.55);display:grid;place-items:center;flex:none}
.iconbtn svg{width:18px;height:18px}
.screen{flex:1;padding:6px 16px 120px;display:none;flex-direction:column;gap:12px}
.screen.on{display:flex}
.hero{border-radius:var(--radius);padding:18px 20px;color:#fff;background:linear-gradient(160deg,var(--hero-a),var(--hero-b));display:grid;grid-template-columns:1fr auto;gap:6px 12px;align-items:end}
.hero .xl{font-size:56px;font-weight:200;line-height:1}
.hero .lbl{opacity:.75;font-size:13px}
.hero .side{display:flex;flex-direction:column;gap:6px;align-items:flex-end}
.pill{font-size:11.5px;padding:2px 9px;border-radius:7px;background:rgba(0,0,0,.05);color:#5f666a;white-space:nowrap;display:inline-flex;gap:4px;align-items:center}
.pill.lime{background:var(--lime);color:var(--ink);font-weight:400}
.pill.warn{background:rgba(192,86,59,.12);color:var(--bad)}
.pill.ok{background:rgba(60,138,90,.12);color:var(--good)}
.pill.w{background:rgba(255,255,255,.18);color:#fff}
.pill.dark{background:var(--ink);color:#fff}
.seg{display:flex;gap:3px;padding:3px;border-radius:12px;background:rgba(255,255,255,.4);overflow-x:auto;scrollbar-width:none;flex:none}
.seg::-webkit-scrollbar,.chips::-webkit-scrollbar{display:none}
.seg button{padding:7px 13px;border-radius:9px;font-size:13px;color:#5e6468;white-space:nowrap}
.seg button[aria-pressed=true]{background:#fff;color:var(--ink);font-weight:400;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.seg .c{font-family:Outfit;margin-inline-start:4px;opacity:.6}
.people{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;flex:none}
.people::-webkit-scrollbar{display:none}
.person{display:flex;align-items:center;gap:6px;padding:5px 11px 5px 5px;border-radius:20px;background:rgba(255,255,255,.5);border:1px solid var(--glass-edge);white-space:nowrap;font-size:13px}
.person[aria-pressed=true]{background:var(--ink);color:#fff;border-color:var(--ink)}
.av{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:500;background:var(--lime-soft);color:var(--ink);flex:none}
.avs{display:flex}
.avs .av{width:20px;height:20px;font-size:10px;border:1.5px solid #f2f3f2;margin-inline-start:-6px}
.avs .av:first-child{margin-inline-start:0}
.list{display:flex;flex-direction:column;gap:8px}
.group{font-size:12px;color:var(--muted);margin:6px 2px 0}
.task{background:var(--glass);border:1px solid var(--glass-edge);border-radius:14px;padding:12px 14px;display:flex;gap:12px;align-items:flex-start;text-align:start;width:100%}
.task:active{transform:scale(.995)}
.chk{flex:none;width:22px;height:22px;border-radius:50%;border:1.5px solid rgba(0,0,0,.22);margin-top:1px;display:grid;place-items:center}
.chk[disabled]{opacity:.35}
.task .t{flex:1;min-width:0}
.task .n{font-weight:400;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.task .m{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px;align-items:center}
.par{font-size:11.5px;color:var(--muted);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.star{color:#c9a400;font-size:12px}
.glass{background:var(--glass);border:1px solid var(--glass-edge);border-radius:var(--radius);padding:14px 16px}
.proj{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;text-align:start}
.proj .lg{font-size:30px;font-weight:300;line-height:1}
.bar{height:6px;border-radius:4px;background:rgba(0,0,0,.06);overflow:hidden;margin-top:10px;display:flex}
.bar i{display:block;height:100%}
.empty{border:1px dashed rgba(0,0,0,.12);border-radius:12px;padding:18px;color:var(--muted);font-size:13px}
.skel{height:64px;border-radius:14px;background:linear-gradient(90deg,rgba(255,255,255,.35),rgba(255,255,255,.6),rgba(255,255,255,.35));background-size:200% 100%;animation:sk 1.2s infinite}
@keyframes sk{to{background-position:-200% 0}}
.fab{position:fixed;bottom:calc(92px + env(safe-area-inset-bottom));inset-inline-start:max(16px,calc(50% - 264px));width:52px;height:52px;border-radius:16px;background:var(--lime);display:grid;place-items:center;box-shadow:0 8px 24px rgba(0,0,0,.12);z-index:3}
.fab svg{width:22px;height:22px}
/* tabbar */
.tabbar{position:fixed;bottom:0;inset-inline:0;max-width:560px;margin:0 auto;padding:10px 16px calc(12px + env(safe-area-inset-bottom));background:linear-gradient(180deg,transparent,rgba(236,238,237,.95) 30%);z-index:4}
.tabbar .in{display:flex;gap:4px;padding:5px;border-radius:16px;background:rgba(255,255,255,.72);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid var(--glass-edge)}
.tabbar button{flex:1;padding:8px 2px;border-radius:12px;font-size:12px;color:#5e6468;display:flex;flex-direction:column;align-items:center;gap:2px}
.tabbar button svg{width:20px;height:20px}
.tabbar button[aria-current=page]{background:var(--ink);color:#fff}
/* chat */
.msgs{display:flex;flex-direction:column;gap:10px}
.b{max-width:88%;padding:10px 13px;border-radius:16px;line-height:1.65;overflow-wrap:anywhere}
.b.me{align-self:flex-start;background:var(--ink);color:#fff;border-end-start-radius:5px;white-space:pre-wrap}
.b.ai{align-self:flex-end;background:var(--glass-strong);border:1px solid var(--glass-edge);border-end-end-radius:5px}
.b.ai ul{margin:4px 0;padding-inline-start:18px}
.b.ai p{margin:0 0 6px}.b.ai p:last-child{margin:0}
.b .files{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px}
.b.me .pill{background:rgba(255,255,255,.15);color:#fff}
.tool{align-self:flex-end;font-size:11.5px;color:var(--muted);display:flex;gap:6px;align-items:center}
.tool i{width:6px;height:6px;border-radius:50%;background:var(--hero-a);animation:pulse 1s infinite alternate}
@keyframes pulse{to{opacity:.3}}
.hello{padding:18px;text-align:center;color:var(--muted)}
.hello b{display:block;color:var(--ink);font-weight:400;font-size:16px;margin-bottom:4px}
.composer{position:fixed;bottom:calc(76px + env(safe-area-inset-bottom));inset-inline:0;max-width:560px;margin:0 auto;padding:0 16px;display:none;flex-direction:column;gap:8px;z-index:3}
.composer.on{display:flex}
.chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.chips button{white-space:nowrap;font-size:12.5px;padding:7px 12px;border-radius:20px;background:rgba(255,255,255,.7);border:1px solid var(--glass-edge)}
.inp{display:flex;gap:4px;align-items:flex-end;padding:6px;border-radius:16px;background:#fff;border:1px solid var(--hairline);box-shadow:0 6px 24px rgba(0,0,0,.06)}
.inp textarea{flex:1;border:0;outline:0;padding:9px 8px;background:none;min-width:0;resize:none;max-height:120px;line-height:1.5}
.inp .send{width:38px;height:38px;border-radius:11px;background:var(--ink);color:#fff;display:grid;place-items:center;flex:none}
.inp .send[disabled]{opacity:.35}
.inp .att{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;color:var(--ink-2);flex:none}
.inp svg{width:18px;height:18px}
.tray{display:flex;gap:6px;flex-wrap:wrap}
.tray .pill{background:#fff;border:1px solid var(--hairline);padding:4px 6px 4px 10px}
.tray .pill button{width:18px;height:18px;border-radius:50%;background:rgba(0,0,0,.06);font-size:11px;line-height:1}
/* confirm card */
.confirm{border-radius:16px;background:#fff;border:1px solid var(--hairline);padding:14px;display:flex;flex-direction:column;gap:10px;box-shadow:0 6px 24px rgba(0,0,0,.05)}
.confirm h4{margin:0;font-weight:500;font-size:14px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.confirm .tn{font-size:12.5px;color:var(--muted);margin-top:-6px}
.confirm .rows{display:flex;flex-direction:column;gap:6px;font-size:13px}
.confirm .r{display:grid;grid-template-columns:auto 1fr;gap:10px;padding:7px 10px;border-radius:9px;background:rgba(0,0,0,.03)}
.confirm .r .k{color:var(--muted)}
.confirm .r .v{overflow-wrap:anywhere}
.from{color:var(--muted);text-decoration:line-through;margin-inline-end:6px}
.acts{display:flex;gap:8px}
.btn{border-radius:11px;padding:10px 14px;background:var(--ink);color:#fff;font-weight:400;font-size:13.5px;display:inline-flex;gap:6px;align-items:center;justify-content:center;text-align:center}
.btn.lime{background:var(--lime);color:var(--ink)}
.btn.ghost{background:rgba(0,0,0,.05);color:var(--ink)}
.btn.grow{flex:1}
.btn[disabled]{opacity:.5;pointer-events:none}
.ok-note{font-size:12.5px;color:var(--good)}
.err-note{font-size:12.5px;color:var(--bad)}
.note{font-size:12px;color:var(--muted)}
/* sheet */
.scrim{position:fixed;inset:0;background:rgba(20,24,26,.3);opacity:0;pointer-events:none;transition:opacity .2s;z-index:8}
.scrim.on{opacity:1;pointer-events:auto}
.sheet{position:fixed;bottom:0;inset-inline:0;max-width:560px;margin:0 auto;background:#f6f7f6;border-radius:22px 22px 0 0;padding:10px 18px calc(22px + env(safe-area-inset-bottom));transform:translateY(105%);transition:transform .28s cubic-bezier(.2,.8,.2,1);display:flex;flex-direction:column;gap:14px;max-height:92vh;overflow:auto;z-index:9;overscroll-behavior:contain}
.sheet.on{transform:none}
.grab{width:40px;height:4px;border-radius:3px;background:rgba(0,0,0,.15);align-self:center;flex:none}
.sheet h3{margin:0;font-weight:400;font-size:18px;line-height:1.45;overflow-wrap:anywhere}
.sheet h5{margin:0 0 6px;font-weight:500;font-size:13px;color:var(--ink-2)}
.kv{display:grid;grid-template-columns:auto 1fr;gap:8px 14px;font-size:13px;margin:0}
.kv dt{color:var(--muted)}
.kv dd{margin:0;overflow-wrap:anywhere}
.qa{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.qa .btn{padding:11px 8px}
.desc{white-space:pre-wrap;font-size:13.5px;background:rgba(255,255,255,.6);border-radius:12px;padding:10px 12px;max-height:180px;overflow:auto;overflow-wrap:anywhere}
.files{display:flex;flex-direction:column;gap:6px}
.file{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:11px;background:rgba(255,255,255,.65);text-decoration:none;color:inherit;font-size:13px}
.file .ic{width:34px;height:34px;border-radius:8px;background:rgba(0,0,0,.05);display:grid;place-items:center;font-size:10px;font-family:Outfit;text-transform:uppercase;flex:none;overflow:hidden}
.file .ic img{width:100%;height:100%;object-fit:cover}
.file span:nth-child(2){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thread{display:flex;flex-direction:column;gap:8px}
.msg{padding:9px 12px;border-radius:12px;background:rgba(255,255,255,.65);font-size:13px}
.msg.note-msg{background:rgba(217,245,62,.16)}
.msg .h{display:flex;justify-content:space-between;gap:8px;color:var(--muted);font-size:11.5px;margin-bottom:3px}
.msg .x{white-space:pre-wrap;overflow-wrap:anywhere}
.field{display:flex;flex-direction:column;gap:5px;font-size:13px}
.field span{color:var(--muted);font-size:12px}
.input,.field input,.field select,.field textarea{width:100%;border:1px solid var(--hairline);background:#fff;border-radius:11px;padding:10px 12px;outline:0}
.field textarea{resize:vertical;min-height:70px}
.checks{display:flex;flex-wrap:wrap;gap:6px}
.checks label{display:flex;align-items:center;gap:6px;padding:6px 11px;border-radius:20px;background:#fff;border:1px solid var(--hairline);font-size:13px;cursor:pointer}
.checks input{accent-color:var(--hero-b)}
.toggle{display:flex;gap:6px;align-items:center;font-size:12.5px;color:var(--muted)}
.copybox{display:flex;gap:6px}
.copybox input{flex:1;min-width:0;direction:ltr;font-size:12px}
.toast{position:fixed;top:calc(14px + env(safe-area-inset-top));inset-inline:0;margin:0 auto;width:max-content;max-width:90%;background:var(--ink);color:#fff;padding:9px 14px;border-radius:12px;font-size:13px;opacity:0;transform:translateY(-10px);transition:.25s;pointer-events:none;z-index:20}
.toast.on{opacity:1;transform:none}
/* auth */
.auth{max-width:380px;margin:0 auto;padding:12vh 20px 40px;display:flex;flex-direction:column;gap:14px}
.auth h1{margin:0;font-weight:300;font-size:30px}
.auth p{margin:0;color:var(--muted)}
.auth form{display:flex;flex-direction:column;gap:10px}
.banner{border-radius:12px;padding:10px 12px;background:rgba(192,86,59,.1);color:var(--bad);font-size:13px}
@media (min-width:700px){.app{padding-top:10px}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.desc,.msg .x,.confirm .r .v{unicode-bidi:plaintext}
#s-bot{padding-bottom:240px}
.tcards{display:flex;flex-direction:column;gap:6px;align-self:stretch}
.tcards .group{margin:2px 2px 0}
