/* منصة السهل الذكي · صفحة الإدارة (الإصدار الثاني). Phone first: a bottom bar of five tabs; from 768px a rail on the right. Colours come from app.css (navy, stone, sand). */
body.avb{margin:0;background:var(--sand);color:var(--ink);font-family:var(--font);font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
.avb *{box-sizing:border-box}
.avb h1,.avb h2,.avb h3{margin:0}
.avb p{margin:0}
.av-app{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
.av-main{flex:1;width:100%;max-width:760px;margin-inline:auto;padding:0 16px calc(92px + var(--safe))}

/* ---------- bottom bar (phone) and rail (tablet) ---------- */
.av-nav{position:fixed;inset-inline:0;bottom:0;z-index:20;display:grid;grid-template-columns:repeat(5,1fr);background:#fff;border-top:1px solid var(--line);padding-bottom:var(--safe);box-shadow:0 -4px 18px rgba(0,38,58,.07)}
.av-nav a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:62px;padding:6px 2px;color:#55636c;text-decoration:none;font-size:.75rem;font-weight:500;line-height:1.3}
.av-nav a[aria-current=page]{color:var(--navy);font-weight:700}
.av-nav a[aria-current=page]::before{content:"";position:absolute;top:0;inset-inline:28%;height:3px;border-radius:0 0 4px 4px;background:var(--navy)}
.av-ni{position:relative;display:inline-flex}
.av-nav .ic{width:24px;height:24px}
.av-bubble{position:absolute;top:-7px;inset-inline-end:-12px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:#b3382c;color:#fff;font-size:.68rem;line-height:19px;text-align:center;font-weight:700}

/* ---------- page bar, headings ---------- */
.av-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:max(16px,env(safe-area-inset-top)) 0 8px}
.av-bar h1{flex:1 1 auto;font-size:1.35rem;font-weight:700;color:var(--navy);line-height:1.4}
.av-back{display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:0 12px 0 4px;border-radius:12px;color:var(--navy);text-decoration:none;font-size:.9rem;font-weight:700;background:#fff;border:1px solid var(--line)}
.av-back .ic{width:20px;height:20px}
.av-h2{display:flex;align-items:center;gap:8px;margin:20px 0 6px!important;font-size:1.02rem;font-weight:700;color:var(--navy)}
.av-pill{display:inline-block;font-size:.76rem;font-weight:700;padding:2px 11px;border-radius:999px;background:var(--sand);color:var(--navy);white-space:nowrap}
.av-h2 .av-pill{background:#fff;border:1px solid var(--line)}
.av-note{font-size:.88rem;color:var(--muted);margin-top:6px!important}
.av-flash{border-radius:14px;padding:10px 14px;margin:12px 0 0!important;font-size:.92rem;font-weight:500}
.av-flash.ok{background:#e6f4ec;color:#1d5e3a}
.av-flash.err{background:#fdecea;color:#8a2a1e}
.av-demobar{display:flex;align-items:center;gap:8px;margin:0 -16px!important;padding:max(8px,env(safe-area-inset-top)) 16px 8px;background:#f3ece4;color:#5a4a3b;font-size:.85rem}
.av-demo{display:inline-block;font-size:.7rem;font-weight:700;padding:2px 9px;border-radius:999px;background:#f3ece4;color:#5a4a3b;border:1px solid var(--stone);white-space:nowrap}
.av-urg{display:inline-block;font-size:.7rem;font-weight:700;padding:2px 9px;border-radius:999px;background:#fdecea;color:#8a2a1e;white-space:nowrap}

/* ---------- hero (the counter and the four tiles) ---------- */
.av-hero{margin:0 -16px 12px;background:var(--navy);color:#fff;padding:max(14px,env(safe-area-inset-top)) 16px 16px;border-radius:0 0 26px 26px}
.av-demobar+.av-hero{margin-top:0}
.av-hello{font-size:1rem;font-weight:700;margin-bottom:2px!important}
.av-date{font-size:.8rem;font-weight:400;color:#b9ccd6}
.av-hero-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:2px 0 10px}
.av-count{display:flex;align-items:center;gap:12px;font-weight:700;min-width:0}
.av-big{font-size:3.3rem;line-height:1.05;font-weight:700}
.av-capwrap{display:flex;flex-direction:column;line-height:1.35;min-width:0}
.av-lbl{font-size:.82rem;color:#b9ccd6;font-weight:500}
.av-cap{font-size:.98rem}
.av-tiles{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.av-tile{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:62px;height:100%;padding:8px 4px;border-radius:14px;background:rgba(255,255,255,.1);color:#fff;text-decoration:none;text-align:center;line-height:1.25}
.av-tile b{font-size:1.4rem;line-height:1.2}
.av-tile span{font-size:.72rem;color:#d3e0e7}

/* ---------- the segmented filter: حقيقي / تجريبي ---------- */
.av-seg{display:inline-flex;margin:0;padding:3px;border-radius:999px;background:rgba(0,38,58,.08)}
.av-seg button{min-height:44px;min-width:70px;padding:0 14px;border:0;border-radius:999px;background:transparent;color:var(--navy);font:inherit;font-size:.86rem;font-weight:700;cursor:pointer}
.av-seg button[aria-pressed=true]{background:var(--navy);color:#fff}
.av-seg.on-dark{background:rgba(255,255,255,.14)}
.av-seg.on-dark button{color:#fff}
.av-seg.on-dark button[aria-pressed=true]{background:#fff;color:var(--navy)}
.av-seg.light{margin:0}

/* ---------- a waiting item ---------- */
.av-list{display:block}
.av-item{--k:var(--stone);position:relative;background:#fff;border-radius:18px;padding:12px 14px;margin:10px 0;box-shadow:0 1px 3px rgba(0,38,58,.07);border-inline-start:5px solid var(--k)}
.av-item.k-note,.av-item.k-req{--k:#2a6f97}
.av-item.k-warranty,.av-item.k-draft{--k:#c98a1b}
.av-item.k-suhail{--k:#2f8f5b}
.av-item.k-reg,.av-item.k-eng,.av-item.k-office{--k:#7b5ea7}
.av-item.urgent{--k:#b3382c}
.av-ih{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.av-kind{font-size:.74rem;font-weight:700;padding:2px 10px;border-radius:999px;background:var(--sand);color:var(--navy)}
.av-time{margin-inline-start:auto;font-size:.76rem;color:var(--muted);white-space:nowrap}
.av-it{font-size:1.02rem;font-weight:700;line-height:1.45;margin-top:6px!important}
.av-sub{font-size:.85rem;color:var(--muted);line-height:1.5}
.av-quote{margin-top:4px!important;font-size:.88rem;color:#2c3e48;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.av-acts{display:flex;gap:8px;margin-top:10px}
.av-acts>*{flex:1 1 0;min-width:0}
.av-acts>.primary{flex:1.2 1 0}
.av-f{margin:0}
.av-b{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;padding:8px 10px;border-radius:12px;border:1.5px solid var(--navy);background:#fff;color:var(--navy);font:inherit;font-size:.88rem;font-weight:700;line-height:1.25;text-align:center;text-decoration:none;cursor:pointer;margin:0}
.av-b.primary{background:var(--navy);color:#fff}
.av-b.danger{border-color:#b3382c;color:#b3382c}
.av-b[aria-pressed=true]{background:var(--sand)}
.av-b:focus-visible,.av-seg button:focus-visible,.av-nav a:focus-visible,.av-tile:focus-visible,.av-cl:focus-visible,.av-chips a:focus-visible,.av-back:focus-visible{outline:3px solid rgba(0,38,58,.3);outline-offset:2px}
.av-rf{display:none;margin-top:10px;padding-top:10px;border-top:1px dashed var(--line)}
.av-rf:target,.av-rf.open{display:block}
.av-fld{display:block;margin:0}
.av-fld span{display:block;font-size:.84rem;color:var(--muted);margin-bottom:4px}
.av-row{display:flex;gap:8px;margin-top:8px}
.av-row>*{flex:1 1 0}
.av-all{margin-top:6px;min-height:48px;font-size:.95rem}
.av-empty{text-align:center;padding:22px 12px;color:var(--muted)}
.av-ei{display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:50%;background:#e6f4ec;color:#2f8f5b;margin-bottom:6px}

/* ---------- cards: chart, activity, details ---------- */
.av-card{background:#fff;border-radius:18px;padding:14px;margin:10px 0;box-shadow:0 1px 3px rgba(0,38,58,.07)}
.av-card h2{font-size:1rem;font-weight:700;color:var(--navy)}
.av-ch{display:flex;justify-content:space-between;align-items:center;gap:8px}
.av-svg{display:block;width:100%;height:auto;max-height:136px;margin-top:6px}
.av-axis{stroke:var(--line);stroke-width:1}
.av-bar{fill:var(--stone)}
.av-bar-now{fill:var(--navy)}
.av-bar-0{fill:var(--sand)}
.av-bv{font:700 12px var(--font);fill:var(--navy)}
.av-bl{font:500 11px var(--font);fill:#55636c}
.av-bl.now{fill:var(--navy);font-weight:700}
.av-tl{list-style:none;margin:6px 0 0;padding:0}
.av-tl li{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--line)}
.av-tl li:first-child{border-top:0}
.av-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--stone)}
.av-tt{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.4}
.av-tt b{font-size:.88rem}
.av-tt small{font-size:.76rem;color:var(--muted)}
.av-tl time{font-size:.74rem;color:var(--muted);white-space:nowrap}
.av-stats{list-style:none;margin:10px 0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.av-stats li{background:var(--sand);border-radius:14px;padding:10px 6px;text-align:center;line-height:1.3}
.av-stats b{display:block;font-size:1.4rem;color:var(--navy)}
.av-stats span{font-size:.74rem;color:#4b5962}
.av-dl{margin:8px 0}
.av-dl div{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px 0;border-top:1px solid var(--line)}
.av-dl dt{color:var(--muted);font-size:.85rem;flex:none}
.av-dl dd{margin:0;font-weight:700;font-size:.92rem;text-align:start;min-width:0;overflow-wrap:anywhere}
.av-tel{display:inline-flex;align-items:center;min-height:44px;color:var(--navy);font-weight:700;direction:ltr;text-decoration:none}
.av-card .av-b{margin-top:10px}
.av-card form{margin:0}

/* ---------- inbox filter, clients, team ---------- */
.av-chips{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 6px}
.av-chips a{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-radius:999px;background:#fff;border:1px solid var(--line);color:var(--ink);text-decoration:none;font-size:.85rem;font-weight:500}
.av-chips a[aria-current]{background:var(--navy);border-color:var(--navy);color:#fff;font-weight:700}
.av-cl{display:flex;flex-direction:column;gap:3px;min-height:72px;background:#fff;border-radius:18px;padding:12px 14px;margin:10px 0;text-decoration:none;color:var(--ink);box-shadow:0 1px 3px rgba(0,38,58,.07)}
.av-cl-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.av-cl-h b{font-size:1.02rem;color:var(--navy)}
.av-new{margin-inline-start:auto;font-size:.74rem;font-weight:700;padding:2px 10px;border-radius:999px;background:#fbf0dc;color:#875b0c}
.av-cl-s{font-size:.85rem;color:var(--muted)}
.av-cl-n{font-size:.82rem;color:#2c3e48;line-height:1.5}
.av-cl-n em{font-style:normal;color:var(--muted)}
.av-track{display:flex;gap:4px;margin:6px 0 2px}
.av-track i{flex:1;height:6px;border-radius:3px;background:var(--line)}
.av-track i.s-done{background:var(--done)}
.av-track i.s-doing{background:var(--navy)}
.av-proj{margin-top:6px}
.av-kv{display:flex;justify-content:space-between;gap:12px;padding:8px 0;font-size:.9rem}
.av-kv span{color:var(--muted)}
.av-nextform{margin-top:8px!important}
.av-tech{display:flex;align-items:center;gap:12px;background:#fff;border-radius:16px;padding:12px;margin:8px 0;box-shadow:0 1px 3px rgba(0,38,58,.07)}
.av-ti{flex:none;display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:12px;background:var(--sand);color:var(--navy)}
.av-tb{display:flex;flex-direction:column;gap:2px;min-width:0}
.av-tb small{font-size:.8rem;color:var(--muted)}
.av-note-card{background:#fff;border-radius:18px;padding:12px 14px;margin:10px 0;box-shadow:0 1px 3px rgba(0,38,58,.07)}
.av-st{font-size:.74rem;font-weight:700;padding:2px 10px;border-radius:999px;background:var(--sand);color:#4b5962}
.av-st.st-replied,.av-st.st-fixed,.av-st.st-answered,.av-st.st-done{background:#e3f2e9;color:#1d6a40}
.av-st.st-new,.av-st.st-received,.av-st.st-scheduled{background:#fbf0dc;color:#875b0c}
.av-body{margin:8px 0!important;font-size:.95rem;line-height:1.7}
.av-our{background:var(--sand);border-radius:12px;padding:8px 12px;margin:8px 0!important;font-size:.9rem;line-height:1.6}
.av-our small{display:block;color:var(--muted);font-size:.74rem}
.av-seg2{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px!important;align-items:center}
.av-seg2 .av-lab{flex-basis:100%;font-size:.8rem;color:var(--muted)}
.av-seg2 .av-b{flex:1 1 calc(50% - 6px);width:auto}
@media (min-width:640px){.av-seg2 .av-b{flex-basis:calc(25% - 6px)}}

/* the technicians' approval page (drafts.php) keeps its own pieces from app.css inside the new frame */
.av-legacy{padding-bottom:16px}
.av-legacy h1{display:none}
.av-legacy .sec{margin:20px 0 8px;font-size:1.02rem;color:var(--navy)}
.av-legacy .doc{margin:8px 0}

/* ---------- sign-in and the set-password page ---------- */
body.av-out{background:var(--navy);color:#fff;min-height:100vh}
.av-outwrap{max-width:440px;margin:0 auto;padding:44px 16px 40px}
.av-brand{text-align:center;font-weight:700;font-size:1.3rem;margin:0 0 18px;letter-spacing:.01em}
.av-out .card{padding:22px 18px;border-radius:20px}
.av-out .card h1{color:var(--navy);font-size:1.3rem}

/* ---------- the home screen never scrolls: lower screens drop the chart, then the quotes ---------- */
.av-fit .av-act{display:none}
.av-fit .av-top2 .av-quote{-webkit-line-clamp:1}
.av-fit .av-top2 .av-item{padding:10px 14px;margin:8px 0}
.av-fit .av-top2 .av-acts{margin-top:8px}
.av-fit .av-top2 .av-b{font-size:.82rem;padding:6px 4px}
.av-fit .av-svg{max-height:104px}
.av-fit .av-chart{padding:10px 14px}
@media (max-width:767px) and (max-height:900px){.av-fit .av-top2 .av-sub{display:none}}
@media (max-width:767px) and (max-height:800px){.av-fit .av-chart{display:none}}
@media (max-width:767px) and (max-height:700px){
  .av-fit .av-quote{display:none}
  .av-fit .av-big{font-size:2.7rem}
  .av-fit .av-item{padding:10px 12px;margin:8px 0}
  .av-fit .av-tile{min-height:56px}
}

/* ---------- tablet: a rail on the right, the home in two columns ---------- */
@media (min-width:768px){
  .av-app{padding-inline-start:108px}
  .av-main{padding-bottom:40px;max-width:820px}
  .av-nav{top:0;bottom:0;inset-inline-start:0;inset-inline-end:auto;width:108px;grid-template-columns:1fr;grid-auto-rows:80px;align-content:start;gap:6px;padding:20px 10px;border-top:0;border-inline-end:1px solid var(--line);box-shadow:none}
  .av-nav a{min-height:80px;border-radius:16px;font-size:.8rem}
  .av-nav a[aria-current=page]{background:var(--sand)}
  .av-nav a[aria-current=page]::before{display:none}
  .av-hero{margin:18px 0 12px;border-radius:24px;padding:20px 22px 20px}
  .av-demobar{margin:0 -16px!important}
    .av-big{font-size:4rem}
  .av-tile{min-height:80px}
  .av-tile b{font-size:1.7rem}
  .av-tile span{font-size:.8rem}
  .av-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:0 16px;align-items:start}
  .av-fit .av-act{display:block}
  .av-fit .av-chart{display:block}
  .av-fit .av-top2 .av-quote{-webkit-line-clamp:2}
  .av-fit .av-top2 .av-item{padding:16px 18px;margin:10px 0}
  .av-fit .av-top2 .av-b{font-size:.9rem;padding:8px 10px}
  .av-fit .av-top2 .av-sub{display:block}
  .av-fit .av-svg{max-height:136px}
  .av-fit .av-it{font-size:1.12rem}
  .av-hero-row{margin-bottom:18px}
}
@media (min-width:768px) and (max-height:820px){
  .av-fit .av-act{display:none}
}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* v3: the inbox has two views (waiting / past); a handled item is quieter */
.av-views a{flex:1;justify-content:center;font-weight:700}
.av-item.past{background:#fbfaf8}
.av-item.past .av-it{color:#32424b}
.av-st.st-approved,.av-st.st-handled,.av-st.st-contacted,.av-st.st-closed,.av-st.st-fixed{background:#e3f2e9;color:#1d6a40}
.av-st.st-declined,.av-st.st-cancelled,.av-st.st-returned{background:#f3e4e2;color:#8a2f25}
.av-sub2{font-size:.92rem;margin:16px 0 4px;color:var(--navy)}
.av-pl{margin:4px 0 0;padding-inline-start:20px;font-size:.88rem;line-height:1.75;color:#2c3e48}

/* ---------- B1 (25-10): the approved admin home and request screens. Orange marks «جديد» only; no age colours. ---------- */
.av-hero2{padding-bottom:14px}
.av-hero2 .av-hero-row{margin:0 0 8px}
.av-c2{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.av-c2 li{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:66px;border-radius:16px;background:rgba(255,255,255,.1);color:#fff;line-height:1.25;text-align:center}
.av-c2 b{font-size:2rem;line-height:1.15}
.av-c2 span{font-size:.82rem}
.av-c2 li.av-c2n{background:#fbf0dc;color:#875b0c}
.av-rc{background:#fff;border-radius:18px;padding:12px 14px;margin:10px 0;box-shadow:0 1px 3px rgba(0,38,58,.07);border-inline-start:5px solid #e0a63a}
.av-rc .av-new{margin-inline-start:0}
.av-rc .av-it{font-size:1.08rem;margin-top:6px;color:var(--navy);line-height:1.4}
.av-rc .av-quote{font-size:.92rem;color:#22343e}
.av-dcol .av-quote{display:block;-webkit-line-clamp:unset;overflow:visible}
.av-sug{margin-top:10px;padding:9px 12px;border-radius:14px;background:var(--sand)}
.av-sug small{display:block;font-size:.74rem;font-weight:700;color:var(--muted);margin-bottom:2px}
.av-st2{font-size:.9rem;line-height:1.6;color:#22343e}
.av-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.av-sug textarea{width:100%;min-height:120px;font:inherit;font-size:.95rem;padding:10px;border-radius:12px;border:1.5px solid var(--line);background:#fff;color:var(--ink)}
.av-rest{margin-top:6px}
.av-r2{display:flex;align-items:center;gap:10px;min-height:56px;padding:8px 12px;margin:6px 0;border-radius:14px;background:#fff;border:1px solid var(--line);color:var(--ink);text-decoration:none}
.av-r2.on{border-color:var(--navy);box-shadow:0 0 0 2px rgba(0,38,58,.14)}
.av-r2b{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.35}
.av-r2b b{font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.av-r2b small{font-size:.76rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.av-r2s{display:flex;flex-direction:column;align-items:flex-end;gap:2px;flex:0 0 auto}
.av-r2 time{font-size:.72rem;color:var(--muted);white-space:nowrap}
.av-r2 .av-new{margin-inline-start:0;font-size:.7rem;padding:1px 9px}
.av-r2:focus-visible{outline:3px solid rgba(0,38,58,.3);outline-offset:2px}
.av-all{margin-top:8px}
.av-split{display:block}
.av-lcol .av-r2:first-child{margin-top:0}

/* the home never scrolls: lower phones drop the other requests, then the quote, then shorten the suggested reply */
.av-home2 .av-quote{-webkit-line-clamp:2}
.av-home2 .av-st2{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
@media (max-width:767px) and (max-height:899px){.av-home2 .av-rest .av-r2:nth-child(n+3){display:none}}
@media (max-width:767px) and (max-height:799px){.av-home2 .av-rest .av-r2:nth-child(n+2){display:none}.av-home2 .av-quote{-webkit-line-clamp:1}}
@media (max-width:767px) and (max-height:719px){.av-home2 .av-rest{display:none}.av-home2 .av-sub{display:none}.av-home2 .av-st2{-webkit-line-clamp:2}}
@media (max-width:767px) and (max-height:680px){.av-home2 .av-quote{display:none}.av-home2 .av-c2 li{min-height:54px}.av-home2 .av-c2 b{font-size:1.6rem}}

/* phone: the list page shows rows only, the request page shows the request only */
@media (max-width:767px){
  .av-sp-list .av-dcol{display:none}
  .av-sp-detail .av-lcol{display:none}
}
/* tablet: the list on the right, the request on the left */
@media (min-width:768px){
  body.av-sp .av-main{max-width:1040px}
  .av-sp .av-split{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(0,1.2fr);gap:16px;align-items:start}
  .av-sp .av-dcol .av-rc{margin-top:0}
  .av-sp .av-lcol{position:sticky;top:12px;max-height:calc(100vh - 24px);overflow:auto}
}

/* ---------- the office page (v5): what the office receives, saved messages ---------- */
.av-chk{display:flex;align-items:center;gap:10px;min-height:44px;margin:4px 0;font-size:.92rem}
.av-chk input{width:22px;height:22px;flex:0 0 auto}
.av-chk input:disabled+span{color:var(--muted)}
.av-fld select{width:100%;min-height:44px;font:inherit;padding:8px 10px;border-radius:12px;border:1.5px solid var(--line);background:#fff;color:var(--ink)}
.av-fld textarea{width:100%;font:inherit;padding:10px;border-radius:12px;border:1.5px solid var(--line);background:#fff;color:var(--ink)}
.av-rf.open{margin-top:6px;padding-top:0;border-top:0}
.av-ml{list-style:none;margin:6px 0 0;padding:0}
.av-ml li{padding:10px 0;border-top:1px solid var(--line)}
.av-ml time{font-size:.76rem;color:var(--muted);margin-inline-start:6px}
.av-ml p{margin:4px 0 8px!important;font-size:.9rem;line-height:1.6}

/* ---------- the sections of the clients tab (contractors, offices): ready WhatsApp text, status buttons ---------- */
.av-q{margin:8px 0 12px;padding:10px 12px;border-radius:12px;background:#EFECE9;color:var(--ink);font-size:.92rem;line-height:1.8}
.av-secs{margin:2px 0 10px}
.av-acts .av-row{display:inline-block;margin:0 0 6px 6px}
.av-secs{flex-wrap:nowrap;gap:6px}
.av-secs a{flex:1 1 0;justify-content:center;gap:6px;padding:0 8px;white-space:nowrap}
.av-sn{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#C1471F;color:#fff;font-size:.74rem;font-weight:700}
.av-secs a[aria-current=true] .av-sn{background:#fff;color:var(--navy)}
.av-stats.s4{grid-template-columns:repeat(4,1fr)}
.av-stats.s4 li{padding-inline:4px}
.av-stats.s4 span{font-size:.78rem}

/* batch S (25-10): add a technician */
.av-fld input{width:100%;min-height:44px;font:inherit;padding:8px 10px;border-radius:12px;border:1.5px solid var(--line);background:#fff;color:var(--ink)}
.av-add{padding:12px}
.av-add>summary{list-style:none;display:flex;align-items:center;justify-content:center;cursor:pointer}
.av-add>summary::-webkit-details-marker{display:none}
.av-addf{display:grid;gap:10px;margin-top:12px}
.av-link{width:100%;min-height:44px;font:inherit;font-size:.82rem;padding:8px 10px;border-radius:12px;border:1.5px solid var(--line);background:#fff;color:var(--ink);margin:6px 0 10px}
.av-tech2{flex-wrap:wrap}
.av-tech2 .av-tb{flex:1 1 140px}
.av-ta{display:flex;gap:6px;flex:1 1 100%}
.av-ta .av-f{flex:1 1 0;margin:0}
.av-ta .av-b{width:100%}
/* B1: nothing under 12px (build spec) */
html body .av-nl,html body .av-bubble,html body .av-kind,html body .av-new,html body .av-sn,html body time,html body .av-tl time,html body .av-r2 time,html body .av-ml time,html body .av-r2 .av-new,html body .av-demo,html body .av-urg,html body .av-tile span,html body .av-tt small,html body .av-stats span,html body .av-st,html body .av-our small,html body .av-sug small{font-size:12px}

.av-ul{margin:.25rem 0 1rem;padding-inline-start:1.3rem;font-size:14px;line-height:1.9}

/* ---------- home screen, batch 2: «ينتظرونك», the six squares, the contracts square, the latest movement (tablet) ---------- */
.aw-hero{margin-bottom:10px}
.aw-h{display:flex;align-items:center;gap:8px;margin:0 0 8px!important;font-size:1.05rem;font-weight:700;color:var(--navy)}
.aw-wait{margin:6px 0 12px}
.aw-wi{display:flex;align-items:center;gap:10px;margin:6px 0;padding:8px 12px;background:#fff;border:2px solid transparent;border-radius:16px;box-shadow:0 1px 3px rgba(0,38,58,.07)}
.aw-wi.late{border-color:#b3382c}
.aw-wt{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px;min-height:44px;justify-content:center;color:var(--navy);text-decoration:none}
.aw-wt b{font-size:1.02rem}
.aw-wt span{font-size:.88rem;color:#3a4a53;line-height:1.45}
.aw-wt small{font-size:.8rem;color:#6a747b}
.aw-wi.late .aw-wt small{color:#8a2a1e;font-weight:700}
.aw-wb{flex:0 0 auto;width:auto;min-width:104px;padding:8px 14px;margin:0}
.aw-more{margin:6px 0 0;border-style:dashed}
.aw-empty{margin:0;padding:16px 14px;background:#e6f4ec;color:#1d5e3a;border-radius:16px;font-weight:700;font-size:.95rem}
.aw-tiles{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.aw-tile{display:flex;flex-direction:column;gap:1px;min-height:84px;padding:8px 12px;background:#fff;border-radius:16px;color:var(--navy);text-decoration:none;box-shadow:0 1px 3px rgba(0,38,58,.07)}
.aw-tile.off{opacity:.7}
.aw-n{font-size:1.7rem;line-height:1.1}
.aw-l{font-size:.95rem;font-weight:700}
.aw-bd{align-self:flex-start;font-size:.78rem;font-weight:700;padding:1px 10px;border-radius:999px;background:var(--sand);color:var(--navy)}
.aw-bd.new{background:#fbf0dc;color:#875b0c}
.aw-bd.late{background:#fdecea;color:#8a2a1e}
.aw-bd.wait{background:#fbf0dc;color:#875b0c}
.aw-bd.ready{background:#e6f4ec;color:#1d5e3a}
.aw-last{font-size:.78rem;color:#6a747b;margin-top:auto}
.aw-money{margin:10px 0;padding:12px 14px;background:#fff;border-radius:16px;box-shadow:0 1px 3px rgba(0,38,58,.07)}
.aw-money p{font-size:1rem;font-weight:700;color:var(--navy)}
.aw-money small{display:block;margin-top:4px;font-size:.8rem;color:#6a747b}
.aw-fresh{margin:0 0 6px!important;text-align:center}
.aw-recent{display:none}
.aw-rc{display:flex;align-items:center;gap:10px;min-height:48px;padding:6px 12px;margin:6px 0;background:#fff;border-radius:14px;color:var(--navy);text-decoration:none;font-size:.9rem}
.aw-rc span{flex:1 1 auto;min-width:0}
.aw-rc small{font-size:.78rem;color:#6a747b;white-space:nowrap}
@media (max-width:767px){.aw-wi.x{display:none}.aw-more.mt{display:none}}
@media (min-width:768px){.aw-more.mp{display:none}.aw-tiles{grid-template-columns:repeat(3,1fr)}.aw-recent{display:block}.aw-wait{display:grid;grid-template-columns:1fr 1fr;column-gap:10px}.aw-wait>.aw-h,.aw-wait>.aw-more,.aw-wait>.aw-empty{grid-column:1/-1}}
@media (max-width:767px) and (max-height:860px){.aw-money small{display:none}.aw-money{padding:8px 14px}.aw-hero{padding-bottom:8px}}

/* admin-b2 round 2: the home NEVER scrolls (390x667, 390x844, 820x1180): five squares in two rows (3 + 2), the contracts in one line */
.aw-tiles{grid-template-columns:repeat(6,1fr)}
.aw-tiles .aw-tile{grid-column:span 2}
.aw-tiles .aw-tile:nth-child(n+4){grid-column:span 3}
.aw-money{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;min-height:44px;padding:6px 14px}
.aw-money b{font-size:1.02rem;color:var(--navy)}
.aw-money span{font-size:.95rem;color:var(--navy)}
.aw-money small{flex:1 1 100%;margin:0}
@media (max-width:767px){
  .aw-tile{min-height:62px;padding:5px 10px;gap:0}
  .aw-n{font-size:1.4rem;line-height:1.15}
  .aw-l{font-size:.85rem;line-height:1.3}
  .aw-bd{font-size:.75rem;padding:0 8px}
  .aw-last{display:none}
  .aw-money small{display:none}
  .aw-wait{margin:2px 0 6px}
  .aw-wi{margin:4px 0;padding:4px 10px}
  .aw-more{margin:4px 0 0;min-height:44px}
  .aw-tiles{margin:6px 0;gap:6px}
  .aw-money{margin:6px 0}
  .aw-hero{margin-bottom:6px}
}
@media (min-width:768px){
  .aw-tiles{grid-template-columns:repeat(6,1fr)}
  .aw-tile{min-height:76px}
  .aw-money small{flex:1 1 auto;margin:0}
}

/* ---------- batch 3: المتابعة, the people lists, the person's file ---------- */
.pp-list{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.pp-row,.pp-card{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#fff;border:2px solid transparent;border-radius:16px;box-shadow:0 1px 3px rgba(0,38,58,.07)}
.pp-card{flex-direction:column;align-items:stretch}
.pp-row.late,.pp-card.late{border-color:#b3382c}
.pp-t{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px;min-height:44px;justify-content:center;color:var(--navy);text-decoration:none}
.pp-t b{font-size:1.02rem}
.pp-t span{font-size:.88rem;color:#3a4a53;line-height:1.45}
.pp-t small{font-size:.8rem;color:#6a747b}
.pp-row.late .pp-t small,.pp-card.late .pp-t small{color:#8a2a1e;font-weight:700}
.pp-b{flex:0 0 auto;width:auto;min-width:104px;margin:0;padding:8px 14px}
.pp-card .av-acts{display:flex;gap:8px;flex-wrap:wrap}
.pp-card .av-acts .av-b{flex:1 1 130px}
.pp-card .av-acts form{flex:1 1 130px}
.pp-bulk{position:sticky;bottom:calc(74px + var(--safe));margin-top:12px}
.pp-bulkc .av-st2{white-space:normal}
.pp-stages{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin:8px 0}
.pp-stg{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:58px;padding:4px 2px;background:#fff;border:2px solid transparent;border-radius:14px;color:var(--navy);text-decoration:none;line-height:1.25}
.pp-stg b{font-size:1.3rem}
.pp-stg span{font-size:.78rem}
.pp-stg.red{border-color:#b3382c;color:#8a2a1e}
.pp-stg.on{background:var(--navy);color:#fff}
.pp-stall{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0;padding:10px 12px;background:#fdecea;border-radius:14px;color:#8a2a1e}
.pp-stall p{flex:1 1 100%;font-size:.92rem}
.pp-stall .av-b{flex:1 1 130px;width:auto;margin:0}
.pp-ipad{display:none}
.pp-clear{margin:6px 0;border-style:dashed}
.pp-rest{margin:10px 0}
.pp-rest>summary{display:flex;align-items:center;min-height:44px;padding:0 12px;border:1.5px dashed var(--navy);border-radius:12px;color:var(--navy);font-weight:700;cursor:pointer;list-style:none}
.pp-rest>summary::-webkit-details-marker{display:none}
.pp-rest .pp-list{margin-top:8px}
.pp-head h2{font-size:1.15rem;color:var(--navy);margin:2px 0}
.pp-state{margin:8px 0;padding:10px 14px;border-radius:14px;background:#fbf0dc;color:#875b0c;font-weight:700;font-size:.95rem}
.pp-state.red{background:#fdecea;color:#8a2a1e}
.pp-svc{display:flex;flex-direction:column;gap:2px;min-height:44px;margin:8px 0;padding:8px 14px;background:#fff;border-radius:14px;color:var(--navy);text-decoration:none;box-shadow:0 1px 3px rgba(0,38,58,.07)}
.pp-svc span{display:flex;justify-content:space-between;gap:8px;min-height:30px;align-items:center;font-size:.9rem}
.pp-svc em{font-style:normal;color:#6a747b}
.pp-reply{margin:8px 0}
.pp-reply>summary{list-style:none;cursor:pointer}
.pp-reply>summary::-webkit-details-marker{display:none}
.pp-reply form,.pp-note form{margin-top:8px;padding:10px;background:#fff;border-radius:14px}
.pp-note,.pp-more{display:none;margin:8px 0}
.pp-note:target,.pp-more:target{display:block}
.pp-more>.av-b{margin:8px 0}
.pp-ch{border:0;margin:0 0 8px;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.pp-ch legend{font-size:.85rem;color:#6a747b;padding:0}
.pp-ch label{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border:1.5px solid var(--navy);border-radius:12px;color:var(--navy);font-weight:700;font-size:.9rem;cursor:pointer}
.pp-fl{margin-top:10px}
.pp-tl{list-style:none;margin:8px 0;padding:0}
.pp-tl li{display:flex;align-items:flex-start;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}
.pp-tl li.empty{justify-content:center;color:#6a747b}
.pp-dot{flex:0 0 12px;width:12px;height:12px;margin-top:6px;border-radius:50%;background:var(--stone,#b5aba3)}
.pp-tl li.from .pp-dot{background:#2f9e60}
.pp-tl li.miss .pp-dot{background:transparent;border:2px dashed #b3382c}
.pp-tl li.miss .pp-tt b{color:#8a2a1e}
.pp-tl li.later .pp-dot{background:transparent;border:2px dashed #b5aba3}
.pp-tl li.later .pp-tt b{font-weight:500;color:#6a747b}
.pp-tt{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.pp-tt b{font-size:.95rem;line-height:1.5}
.pp-tt small{font-size:.8rem;color:#6a747b}
.pp-tl time{font-size:.8rem;color:#6a747b;white-space:nowrap}
.pp-big{display:flex;flex-direction:column;gap:8px;margin:10px 0;padding:10px;background:#fff;border-radius:16px;box-shadow:0 1px 3px rgba(0,38,58,.07)}
.pp-big>.av-b.primary{min-height:54px;font-size:1rem;margin:0}
.pp-acts{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:8px 0}
.pp-acts .av-b{margin:0;padding:6px}
@media (min-width:768px){.pp-ipad{display:flex}.pp-list{display:grid;grid-template-columns:1fr 1fr}.pp-stages{grid-template-columns:repeat(6,1fr)}.pp-bulk{position:static}}
/* the home on a wide screen: the five squares in ONE row, so it never scrolls on a laptop-size window either */
@media (min-width:960px){.aw-tiles{grid-template-columns:repeat(5,1fr)}.aw-tiles .aw-tile,.aw-tiles .aw-tile:nth-child(n+4){grid-column:span 1}}
.pp-tabs a{white-space:nowrap;padding:0 12px}
/* «سجّل أنها أُرسلت»: secondary (outline, no fill), on its own row and apart from the big send button */
.pp-sentf{display:flex;flex-direction:column;gap:6px;margin-top:16px;padding-top:10px;border-top:1px dashed var(--line)}
.pp-sentf .av-b{background:#fff;color:var(--navy);border:1.5px solid var(--navy);box-shadow:none;min-height:44px;font-weight:600;margin:0}
.pp-card .av-acts .pp-sentf,.pp-bulkc .av-acts .pp-sentf{flex:1 1 100%}
.pp-big .pp-sentf{margin-top:18px}
.pp-card .av-acts .pp-sentf .av-b,.pp-bulkc .av-acts .pp-sentf .av-b,.pp-big .pp-sentf .av-b{flex:0 0 auto;width:100%}
.pp-sentf .av-ack{min-height:44px}

/* ---------- batch 4: the subcontractor cycle, the official notice screens ---------- */
.sc-list{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.sc-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px;background:#fff;border:2px solid transparent;border-radius:16px;box-shadow:0 1px 3px rgba(0,38,58,.07);color:var(--navy);text-decoration:none}
.sc-card.late{border-color:#b3382c}
.sc-t{display:flex;flex-direction:column;gap:2px;min-height:44px;color:var(--navy);text-decoration:none}
.sc-t b{font-size:1.02rem}
.sc-t span{font-size:.88rem;color:#3a4a53;line-height:1.45}
.sc-t .aw-bd{align-self:flex-start}
.sc-bar{height:10px;border-radius:999px;background:var(--sand);overflow:hidden}
.sc-bar i{display:block;height:100%;background:#2f9e60;border-radius:999px}
.sc-pct{font-size:.8rem;color:#6a747b}
.sc-acts{display:flex;gap:8px;flex-wrap:wrap}
.sc-acts .av-b,.sc-acts form{flex:1 1 130px}
.sc-pf{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end;margin:0}
.sc-pf .av-fld{min-width:0}
.sc-pf .av-fld input{width:100%}
.sc-pf .av-b{margin:0;min-width:96px}
.sc-2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sc-nt{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;min-height:56px}
.sc-nt .sc-t{flex:1 1 140px;min-height:0}
.sc-chips{display:flex;gap:6px;flex-wrap:wrap}
.sc-chip{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;background:var(--sand);color:var(--navy);font-size:.78rem;font-weight:700}
.sc-chip.ok{background:#e6f4ec;color:#1d5e3a}
.sc-chip.bad{background:#fdecea;color:#8a2a1e}
.sc-chk .sc-ln{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin:4px 0}
.sc-chk .sc-ln span{min-width:56px;color:#6a747b}
.sc-chk small{flex:1 1 100%;font-size:.8rem;color:#6a747b}
.sc-ok{color:#1d5e3a}.sc-warn{color:#875b0c}.sc-bad{color:#8a2a1e}
.sc-txt{white-space:normal;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:#faf9f7;line-height:1.9}
.sc-rep{margin:6px 0;color:#3a4a53}
.sc-ch{list-style:none;margin:0 0 8px;padding:0;display:flex;flex-direction:column;gap:10px}
.sc-ch li{display:flex;flex-direction:column;gap:6px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.sc-q{border:2px solid #875b0c;background:#fbf0dc}
.sc-qbar{height:8px;border-radius:999px;background:#fff;overflow:hidden;margin:6px 0 10px}
.sc-qbar i{display:block;height:100%;width:100%;background:#875b0c;transform-origin:right;animation:sc-q 5s linear forwards}
@keyframes sc-q{from{transform:scaleX(1)}to{transform:scaleX(0)}}
.sc-cands{flex-direction:column}
.sc-cand{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 12px;background:#fff;border:1.5px solid var(--line);border-radius:12px;width:100%}
.sc-cand.off{opacity:.55}
@media (min-width:768px){.sc-list{display:grid;grid-template-columns:1fr 1fr}}

@media (min-width:960px) and (max-height:900px){.aw-recent .aw-rc:nth-of-type(n+3){display:none}.aw-tiles .aw-last{display:none}}

.sc-stack{display:block}
.sc-stack>*{display:block;width:100%;box-sizing:border-box;margin:0 0 10px}
.sc-stack .pp-ch{display:flex;gap:10px}
.sc-stack .pp-ch label{flex:1}
/* ---------- batch 5: the contract's file: change orders, the handover notes, the site reports ---------- */
.ch-steps{list-style:none;display:flex;gap:4px;margin:6px 0;padding:0}
.ch-steps li{flex:1 1 0;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;font-size:.75rem;color:#6a747b;text-align:center}
.ch-steps li i{display:block;width:100%;height:8px;border-radius:999px;background:#d9d5d0}
.ch-steps li.done i{background:#2f9e60}
.ch-steps li.done{color:#1d5e3a}
.ch-steps li.cur i{background:#e8b74e}
.ch-steps li.cur{color:#875b0c;font-weight:700}
.ch-cx{margin:6px 0;color:#8a2a1e;font-weight:700}
.ch-alert{margin:8px 0;padding:10px 12px;border-radius:12px;background:#fdecea;color:#8a2a1e;font-weight:700;border:1.5px solid #b3382c}
.ch-okbar{margin:8px 0;padding:10px 12px;border-radius:12px;background:#e6f4ec;color:#1d5e3a;font-weight:700}
.ch-row2{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:8px}
.ch-row2 .av-b{margin:0;min-height:44px}
.av-b.danger{color:#8a2a1e;border-color:#b3382c}
.ch-bf{flex:1 1 130px;margin:0}
.ch-bf .av-b{width:100%}
.ch-parties{margin-top:6px}
.ch-pt{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:4px 0;font-size:.95rem}
.ch-pt>span:first-child{min-width:54px;color:#6a747b}
.ch-more{margin:10px 0}
.ch-more>summary{display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border-radius:12px;cursor:pointer;color:var(--navy);font-weight:700;list-style:none}
.ch-more>summary.av-b{background:var(--navy);color:#fff}
.ch-more>summary::-webkit-details-marker{display:none}
.ch-more[open]>summary{margin-bottom:10px}
.ch-ths{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0}
.ch-th{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:10px;overflow:hidden;background:var(--sand);border:1.5px solid var(--line);color:var(--navy);font-size:.75rem;font-weight:700}
.ch-th img{width:100%;height:100%;object-fit:cover;display:block}
.ch-row .sc-t{min-height:56px}
.aw-ctl{display:inline-flex;align-items:center;min-height:44px;color:var(--navy);text-decoration:none}
@media (max-width:767px) and (max-height:700px){.aw-money>span:not(.aw-bd){display:none}.aw-money{flex-wrap:nowrap;gap:6px}.aw-money .aw-bd{font-size:.75rem;padding:0 8px;white-space:nowrap}.aw-ctl b{font-size:.95rem}}
/* ---------- batch 6: the iPad: the person's file in three columns, the lists in three columns, «الباقي» open ---------- */
.pp-md{display:block}
.pp-pane-list{display:none}
.pp-cols{display:block}
@media (min-width:1024px){
  .av-main:has(.pp-md),.av-main:has(.pp-stages){max-width:1180px}
  .pp-list{grid-template-columns:repeat(3,minmax(0,1fr))}
  .pp-md{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,1.5fr);gap:16px;align-items:start}
  .pp-pane-list{display:block;position:sticky;top:12px;max-height:calc(100vh - 24px);overflow:auto}
  .pp-pane-list .pp-list{display:flex;flex-direction:column;margin:0}
  .pp-pane-list .pp-row{flex-wrap:wrap}
  .pp-pane-list .pp-row .av-b{display:none}
  .pp-pane-list .pp-row.on{border-color:var(--navy);background:var(--sand)}
  .pp-cols{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr);gap:16px;align-items:start}
  .pp-c2{position:sticky;top:12px}
  .pp-c2 .pp-big{margin-top:0}
  .pp-c2 .pp-acts{grid-template-columns:1fr 1fr}
  .pp-note,.pp-more{display:block}
}
/* a short iPad in landscape (1024x768, 1133x744): the home still does not scroll */
@media (min-width:768px) and (max-height:780px){.av-main{padding-bottom:12px}}
@media (min-width:768px) and (max-height:760px){.aw-recent .aw-rc:nth-of-type(n+2){display:none}}
