/* ====== صفحة الايجنت ====== */
.wrap:has(.agp:not([hidden])){display:block;padding-top:0;padding-bottom:110px}
body.authed .wrap:has(.agp:not([hidden])){padding-left:0;padding-right:64px}
.agp{width:100%;min-width:0;max-width:1200px;margin:0 auto}
.agp[hidden]{display:none}
.agp-hero{position:relative;height:min(400px,52vh);overflow:hidden;background:#15123a}
.agp-bg{position:absolute;inset:0;transition:filter .4s}
.agp-bg video,.agp-bg img{width:100%;height:100%;object-fit:cover;object-position:center 18%;display:block}
.agp-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(7,8,15,0) 35%,rgba(7,8,15,.8) 72%,#07080f 100%);pointer-events:none}
.agp.off .agp-bg{filter:grayscale(1) brightness(.6)}
.agp-bk,.agp-ps{position:absolute;top:calc(16px + env(safe-area-inset-top));z-index:2;min-height:0;height:42px;margin:0;border-radius:14px;
  background:rgba(0,0,0,.45);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.18);box-shadow:none;color:#fff}
.agp-bk{right:16px;width:42px;padding:0;display:grid;place-items:center}
.agp-bk svg{width:20px;height:20px;stroke:#fff;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.agp-ps{left:16px;width:auto;padding:0 14px;display:flex;align-items:center;gap:7px;font-size:13.5px;font-weight:700}
.agp-ps svg{width:14px;height:14px;fill:#fff}
.agp.off .agp-ps{background:linear-gradient(135deg,#2ee88f,#00b4d8);border-color:transparent;color:#05261a}
.agp.off .agp-ps svg{fill:#05261a}
.agp-ht{position:absolute;right:18px;left:18px;bottom:14px;z-index:2}
.agp-now{display:inline-flex;align-items:center;gap:7px;max-width:100%;font-size:12.5px;background:rgba(46,232,143,.14);border:1px solid rgba(46,232,143,.4);color:#8dffc8;
  padding:5px 11px;border-radius:20px;margin-bottom:8px}
.agp-now[hidden]{display:none}
.agp-now span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agp-now i{flex:none;width:7px;height:7px;border-radius:50%;background:#2ee88f;box-shadow:0 0 8px #2ee88f;animation:agp-bl 1.6s infinite}
@keyframes agp-bl{50%{opacity:.35}}
.agp-ht h1{font-size:34px;font-weight:800;line-height:1.15}
.agp-ht p{font-size:13.5px;opacity:.75;margin-top:2px;min-height:18px}
.agp-side{padding:0 16px}
.agp-st{display:grid;grid-template-columns:repeat(3,1fr);margin-top:6px;border-radius:20px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
.agp-st div{padding:12px 6px;text-align:center;min-width:0}
.agp-st div+div{border-right:1px solid rgba(255,255,255,.07)}
.agp-st b{display:block;font-size:22px;font-weight:800;font-variant-numeric:tabular-nums}
.agp-st .w b{color:#ffd27a}
.agp-st span{font-size:11px;opacity:.55}
.agp-h{display:flex;justify-content:space-between;align-items:baseline;font-size:15px;font-weight:700;margin:22px 2px 10px}
.agp-h small{font-size:12px;opacity:.5;font-weight:400}
.agp-ed{width:auto;min-height:0;margin:0;padding:2px 4px;background:none;box-shadow:none;color:#b9a8ff;font-size:12.5px;font-weight:500}
.agp-ch{border-radius:20px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);padding:12px 12px 8px}
#ag-ch{display:block;width:100%;height:110px;overflow:visible}
.agp-xl{display:flex;justify-content:space-between;font-size:10px;opacity:.5;margin-top:4px}
.agp-xl .t{color:#7dffc0;opacity:1;font-weight:700}
.agp-sks{display:flex;flex-wrap:wrap;gap:8px}
.agp-sk{display:inline-flex;align-items:center;gap:6px;width:auto;min-height:0;margin:0;padding:7px 12px;border-radius:12px;font-size:12.5px;font-weight:500;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);box-shadow:none;color:#eef0ff}
.agp-sk.add{border-style:dashed;opacity:.7;background:none}
.agp-sk i{display:none;font-style:normal;color:#ff8fa3;font-weight:700}
.agp-sks.edit .agp-sk i{display:inline}
.agp-sk-in{width:150px;margin:0;padding:7px 10px;font-size:13px;border-radius:12px}
.agp-tabs{display:flex;background:rgba(255,255,255,.05);border-radius:14px;padding:4px;margin-top:22px}
.agp-tabs button{flex:1;width:auto;min-height:0;margin:0;padding:9px 0;border-radius:11px;background:none;box-shadow:none;color:#eef0ff;font-size:13px;font-weight:500;opacity:.6}
.agp-tabs button.on{background:#fff;color:#12142a;opacity:1;font-weight:700}
.agp-tabs em{font-style:normal;background:#ff4d6a;color:#fff;border-radius:9px;padding:0 6px;font-size:11px;margin-right:4px}
.agp-tabs em[hidden]{display:none}
.agp-list{margin-top:6px}
.agp-it{display:flex;gap:12px;align-items:center;width:100%;min-height:0;margin:0;padding:12px 2px;text-align:right;background:none;border:0;border-bottom:1px solid rgba(255,255,255,.06);
  border-radius:0;box-shadow:none;color:#eef0ff;font-weight:400}
.agp-it:last-child{border-bottom:0}
.agp-ic{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;flex:none;background:rgba(255,210,122,.11)}
.agp-ic i{width:9px;height:9px;border-radius:50%;background:#ffd27a;box-shadow:0 0 8px #ffd27a}
.agp-it.done .agp-ic{background:rgba(46,232,143,.12)}.agp-it.done .agp-ic i{background:#2ee88f;box-shadow:0 0 8px #2ee88f}
.agp-it.iss .agp-ic{background:rgba(255,77,106,.14)}.agp-it.iss .agp-ic i{background:#ff4d6a;box-shadow:0 0 8px #ff4d6a}
.agp-tx{flex:1;min-width:0}
.agp-tx p{font-size:13.5px;font-weight:500;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.agp-tx small{font-size:11.5px;opacity:.5}
.agp-tx .fx{display:block;margin-top:4px;font-size:12.5px;color:#ff8fa3;opacity:1}
.agp-go{flex:none;opacity:.35;font-size:18px}
.agp-empty{text-align:center;opacity:.5;font-size:13.5px;padding:22px 10px}
.agp-ctas{position:fixed;left:16px;right:80px;bottom:calc(18px + env(safe-area-inset-bottom));z-index:20;display:flex;gap:10px}
.agp[hidden] .agp-ctas{display:none}
.agp-ctas:before{content:"";position:absolute;left:-16px;right:-16px;bottom:-30px;height:110px;background:linear-gradient(transparent,#07080f 60%);z-index:-1;pointer-events:none}
.agp-talk,.agp-give{min-height:0;height:54px;margin:0;border-radius:18px;font-size:15.5px;display:flex;align-items:center;justify-content:center;gap:8px}
.agp-talk{flex:none;width:118px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);box-shadow:none}
.agp-talk svg{width:19px;height:19px;fill:none;stroke:#eef0ff;stroke-width:2;stroke-linejoin:round}
.agp-give{flex:1;width:auto}
body.on-agent .fab{display:none}

/* على الشاشة العريضة: الصورة مربع على اليمين، والباقي على اليسار */
@media (min-width:900px){
  body.authed .wrap:has(.agp:not([hidden])){padding:28px 248px 120px 28px}
  .agp{display:grid;grid-template-columns:360px minmax(0,1fr);gap:22px;align-items:start}
  .agp-hero{height:520px;border-radius:26px;position:sticky;top:28px}
  .agp-side{padding:0}
  .agp-st{margin-top:0}
  .agp-ctas{left:28px;right:calc(248px + 382px)}
}

/* ====== ورقة تطلع من تحت (مهمة يديدة، تفاصيل مهمة) ====== */
.ags-bg{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.55);opacity:0;pointer-events:none;transition:opacity .2s}
.ags-bg.on{opacity:1;pointer-events:auto}
.ags{position:fixed;left:0;right:0;bottom:0;z-index:61;max-height:88vh;overflow-y:auto;background:#12142a;border-top:1px solid rgba(255,255,255,.12);
  border-radius:24px 24px 0 0;padding:10px 18px calc(22px + env(safe-area-inset-bottom));transform:translateY(105%);transition:transform .25s cubic-bezier(.3,0,.2,1)}
.ags.on{transform:none}
@media (min-width:700px){.ags{left:50%;right:auto;width:560px;margin-left:-280px}}
.ags .grab{width:40px;height:5px;border-radius:5px;background:rgba(255,255,255,.2);margin:0 auto 14px}
.ags h3{font-size:18px;margin-bottom:12px}
.ags label{margin-top:4px}
.ags textarea{width:100%;font:inherit;font-size:16px;color:#fff;padding:14px 16px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);
  margin-bottom:14px;outline:none;resize:vertical;min-height:110px}
.ags textarea:focus{border-color:#a68cff}
.ags input[type=datetime-local]{direction:ltr;text-align:right}
.ags-files{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.ags-f{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;padding:7px 10px;border-radius:11px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12)}
.ags-f button{width:auto;min-height:0;margin:0;padding:0 2px;background:none;box-shadow:none;color:#ff8fa3}
.ags-add{width:auto;min-height:0;margin:0 0 14px;padding:9px 14px;font-size:13.5px;font-weight:500;background:rgba(255,255,255,.06);border:1px dashed rgba(255,255,255,.25);box-shadow:none}
.ags .msg{margin-top:4px}
.ags-res{white-space:pre-wrap;font-size:14.5px;line-height:1.8;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:12px 14px;margin-bottom:12px}
.ags-imgs{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:12px}
.ags-imgs img{width:100%;border-radius:12px;display:block}
.ags-steps{list-style:none;margin-bottom:12px}
.ags-steps li{position:relative;padding:6px 18px 6px 0;font-size:13.5px;opacity:.85}
.ags-steps li:before{content:"";position:absolute;right:2px;top:13px;width:7px;height:7px;border-radius:50%;background:#8f6bff}
.ags-meta{display:flex;justify-content:space-between;font-size:12.5px;opacity:.6;margin-bottom:6px}
.ags-sub{font-size:13px;font-weight:700;opacity:.7;margin:8px 0 6px}
