:root{
  --em:#042F2E; --em2:#0B4A47; --em3:#11615C; --gold:#E5C158; --gold2:#C9A53C;
  --bg:#EEF2F0; --card:#fff; --line:#E2E8E5; --ink:#0F1F1E; --mut:#5F6F6C; --soft:#F3F7F5;
  --ok:#15803D; --okb:#DCFCE7; --warn:#B45309; --warnb:#FEF3C7; --bad:#B91C1C; --badb:#FEE2E2;
  --info:#1D4ED8; --infob:#DBEAFE; --grey:#475569; --greyb:#E2E8F0;
  --r:14px;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{font-family:Inter,"IBM Plex Sans Arabic",system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased}
html[dir=rtl] body{font-family:"IBM Plex Sans Arabic",Inter,system-ui,"Segoe UI",Tahoma,sans-serif}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
svg.ic{width:1.25em;height:1.25em;flex:none;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;display:block}
html[dir=rtl] svg.flip{transform:scaleX(-1)}
:focus-visible{outline:2px solid var(--gold2);outline-offset:2px}
.num{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}

/* top bar */
#app{min-height:100%;display:flex;flex-direction:column}
.top{background:var(--em);color:#fff;display:flex;align-items:center;gap:14px;padding:10px 20px;position:sticky;top:0;z-index:30}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:20px;letter-spacing:.04em}
.brand svg{width:30px;height:30px}
.brand small{display:block;font-size:11px;font-weight:500;letter-spacing:0;opacity:.75}
.top .sp{flex:1}
.tbtn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 12px;border-radius:10px;color:#fff;background:rgba(255,255,255,.1);font-weight:600;font-size:13px}
.tbtn:hover{background:rgba(255,255,255,.18)}
.tbtn.gold{background:var(--gold);color:var(--em)}
.tbtn.gold:hover{background:#efd07a}
.demo-tag{font-size:11px;font-weight:600;padding:3px 8px;border-radius:99px;background:rgba(229,193,88,.18);color:var(--gold);white-space:nowrap}

/* stage */
.stage{flex:1;display:grid;grid-template-columns:400px minmax(0,1fr);gap:22px;padding:18px 20px 22px;max-width:1500px;width:100%;margin:0 auto;align-items:start}
.col-h{display:flex;align-items:center;gap:10px;margin-bottom:10px;min-height:38px}
.col-h h2{margin:0;font-size:13px;font-weight:700;color:var(--mut);text-transform:uppercase;letter-spacing:.06em}
html[dir=rtl] .col-h h2{letter-spacing:0;font-size:14px}
.seg{display:inline-flex;background:#fff;border:1px solid var(--line);border-radius:11px;padding:3px;gap:2px}
.seg button{height:30px;padding:0 11px;border-radius:8px;font-weight:600;font-size:12.5px;color:var(--mut);display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.seg button.on{background:var(--em);color:#fff}
.panes{display:none}

/* phone */
.phone{width:372px;height:748px;margin:0 auto;background:#0b1211;border-radius:44px;padding:11px;box-shadow:0 24px 50px -18px rgba(4,47,46,.5),0 0 0 1px #1d2b29 inset;position:relative}
.screen{height:100%;background:var(--soft);border-radius:34px;overflow:hidden;display:flex;flex-direction:column;position:relative}
.sbar{height:30px;background:var(--em);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 22px;font-size:12px;font-weight:600;flex:none;direction:ltr}
.sbar i{width:74px;height:18px;border-radius:99px;background:#0b1211;display:block}
.ahead{background:var(--em);color:#fff;padding:8px 14px 14px;display:flex;align-items:center;gap:10px;flex:none}
.ahead h3{margin:0;font-size:16px;font-weight:600;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ahead .ib{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;color:#fff;position:relative;flex:none}
.ahead .ib:hover{background:rgba(255,255,255,.12)}
.ahead .ib svg{width:20px;height:20px}
.dot{position:absolute;top:3px;inset-inline-end:3px;min-width:16px;height:16px;border-radius:99px;background:#DC2626;color:#fff;font-size:10px;font-weight:700;display:grid;place-items:center;padding:0 4px}
.body{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:12px;scrollbar-width:thin}
.tabbar{flex:none;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:#fff;border-top:1px solid var(--line);padding:6px 4px 10px}
.tabbar button{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10.5px;font-weight:600;color:var(--mut);padding:4px 0;border-radius:10px}
.tabbar button svg{width:21px;height:21px}
.tabbar button.on{color:var(--em)}
.tabbar button.on svg{stroke:var(--gold2)}

/* generic */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:13px}
.card h4{margin:0 0 8px;font-size:13px;font-weight:700}
.row{display:flex;align-items:center;gap:10px}
.row .g{flex:1;min-width:0}
.mut{color:var(--mut)}
.sm{font-size:12px}
.b{font-weight:700}
.big{font-size:22px;font-weight:700}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:0 16px;border-radius:11px;font-weight:700;font-size:14px;background:var(--em);color:#fff;width:100%}
.btn:hover{background:var(--em2)}
.btn.gold{background:var(--gold);color:var(--em)}
.btn.gold:hover{background:#efd07a}
.btn.ghost{background:#fff;color:var(--em);border:1px solid var(--line)}
.btn.ghost:hover{background:var(--soft)}
.btn.bad{background:#fff;color:var(--bad);border:1px solid #F3C4C4}
.btn.s{min-height:32px;padding:0 11px;font-size:12.5px;width:auto;border-radius:9px}
.btn[disabled]{opacity:.5;cursor:default}
.btns{display:flex;gap:8px}
.chip{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 9px;border-radius:99px;font-size:11.5px;font-weight:700;white-space:nowrap;background:var(--greyb);color:var(--grey)}
.chip.ok{background:var(--okb);color:var(--ok)} .chip.warn{background:var(--warnb);color:var(--warn)}
.chip.bad{background:var(--badb);color:var(--bad)} .chip.info{background:var(--infob);color:var(--info)}
.chip.gold{background:#FBF3D6;color:#7A5E0A}
label.f{display:block;font-size:12px;font-weight:600;color:var(--mut);margin-bottom:5px}
.in{width:100%;min-height:42px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:9px 11px}
textarea.in{min-height:76px;resize:none}
.opt{display:flex;align-items:center;gap:10px;padding:11px;border:1.5px solid var(--line);border-radius:11px;background:#fff;width:100%;text-align:start}
.opt.on{border-color:var(--em3);background:#ECF6F3}
.opt .rd{width:18px;height:18px;border-radius:50%;border:2px solid #B6C4C0;flex:none;display:grid;place-items:center}
.opt.on .rd{border-color:var(--em3)} .opt.on .rd::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--em3)}
.opt small{display:block;color:var(--mut);font-weight:400}
.empty{text-align:center;color:var(--mut);padding:26px 10px;font-size:13px}

/* resident home */
.hello{background:var(--em);color:#fff;margin:-14px -14px 0;padding:4px 16px 18px;border-radius:0 0 22px 22px}
.hello .n{font-size:18px;font-weight:700}
.hello .a{display:inline-flex;align-items:center;gap:6px;margin-top:6px;font-size:12px;background:rgba(255,255,255,.12);padding:4px 10px;border-radius:99px}
.hello .a svg{width:14px;height:14px}
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tile{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:13px;text-align:start;display:flex;flex-direction:column;gap:8px;font-weight:700;font-size:13.5px}
.tile:hover{border-color:#B9CBC6}
.tile .i{width:38px;height:38px;border-radius:11px;background:#FBF3D6;color:#7A5E0A;display:grid;place-items:center}
.tile .i svg{width:20px;height:20px}
.tile small{font-weight:500;color:var(--mut);font-size:11.5px}
.due{background:linear-gradient(135deg,var(--em),var(--em3));color:#fff;border-radius:var(--r);padding:14px}
.due .big{color:var(--gold)}
.li{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:12px;display:flex;align-items:center;gap:10px;text-align:start;width:100%}
.li:hover{border-color:#B9CBC6}
.li .g{flex:1;min-width:0}
.li .g>span{display:block}
.li .t{font-weight:700;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.li .i{width:36px;height:36px;border-radius:10px;background:var(--soft);display:grid;place-items:center;color:var(--em3);flex:none}

/* timeline */
.tl{list-style:none;margin:0;padding:0}
.tl li{position:relative;padding-inline-start:24px;padding-bottom:12px;font-size:13px}
.tl li::before{content:"";position:absolute;inset-inline-start:5px;top:14px;bottom:-2px;width:2px;background:var(--line)}
.tl li:last-child{padding-bottom:0}.tl li:last-child::before{display:none}
.tl li::after{content:"";position:absolute;inset-inline-start:0;top:4px;width:12px;height:12px;border-radius:50%;background:var(--ok);box-shadow:0 0 0 3px var(--okb)}
.tl li.cur::after{background:var(--gold2);box-shadow:0 0 0 3px #FBF3D6}
.tl small{display:block;color:var(--mut);font-size:11.5px}

.kv{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px dashed var(--line);font-size:13px}
.kv:last-child{border:0}
.tot{display:flex;justify-content:space-between;align-items:center;padding-top:10px;font-weight:700;font-size:15px}
.qr{background:#fff;border-radius:16px;padding:14px;display:grid;place-items:center;border:1px solid var(--line)}
.qr svg{width:210px;height:210px;display:block}
.sw{width:42px;height:24px;border-radius:99px;background:#C6D2CE;position:relative;flex:none;transition:.15s}
.sw::after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:.15s}
.sw.on{background:var(--em3)}.sw.on::after{inset-inline-start:21px}

/* gate */
.gate{background:#0b1211;color:#fff}
.gate .body{background:#0f1a19}
.gate .card{background:#16211f;border-color:#243532;color:#fff}
.gate .mut{color:#9fb3ae}
.gate .li{background:#16211f;border-color:#243532;color:#fff}
.gate .li .i{background:#0f1a19;color:var(--gold)}
.finder{height:190px;border-radius:18px;border:2px dashed #3b524e;display:grid;place-items:center;color:#9fb3ae;position:relative;overflow:hidden}
.finder svg{width:54px;height:54px;stroke-width:1.3}
.finder::after{content:"";position:absolute;left:10%;right:10%;height:2px;background:var(--gold);box-shadow:0 0 12px var(--gold);animation:scan 2.2s ease-in-out infinite}
@keyframes scan{0%,100%{top:14%}50%{top:86%}}
.verdict{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;border-radius:20px;padding:26px;text-align:center}
.verdict.v{background:#166534}.verdict.x{background:#991B1B}
.verdict .o{width:110px;height:110px;border-radius:50%;background:rgba(255,255,255,.16);display:grid;place-items:center}
.verdict .o svg{width:62px;height:62px;stroke-width:2.6}
.verdict .w{font-size:40px;font-weight:800;letter-spacing:.04em}

/* web frame */
.web{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 20px 44px -26px rgba(4,47,46,.45);display:flex;flex-direction:column;min-height:748px}
.chrome{height:38px;background:#E7ECEA;display:flex;align-items:center;gap:8px;padding:0 14px;border-bottom:1px solid var(--line);direction:ltr}
.chrome i{width:11px;height:11px;border-radius:50%;background:#cbd5d1;display:block}
.chrome span{margin-left:10px;flex:1;max-width:340px;height:24px;border-radius:7px;background:#fff;font-size:12px;color:var(--mut);display:flex;align-items:center;padding:0 10px;gap:6px}
.chrome span svg{width:12px;height:12px}
.wb{flex:1;display:grid;grid-template-columns:200px minmax(0,1fr);min-height:0}
.side{background:var(--em);color:#fff;padding:14px 10px;display:flex;flex-direction:column;gap:3px}
.side .brand{font-size:17px;padding:4px 8px 14px}
.side .brand svg{width:26px;height:26px}
.side button{display:flex;align-items:center;gap:10px;height:38px;padding:0 10px;border-radius:9px;color:#cfe0dc;font-weight:600;font-size:13px;text-align:start}
.side button:hover{background:rgba(255,255,255,.08)}
.side button.on{background:rgba(229,193,88,.16);color:var(--gold)}
.side button svg{width:18px;height:18px}
.side .cnt{margin-inline-start:auto;min-width:20px;height:20px;border-radius:99px;background:var(--gold);color:var(--em);font-size:11px;font-weight:700;display:grid;place-items:center;padding:0 5px}
.main{padding:16px 18px;background:#F7F9F8;min-width:0;overflow:auto}
.mh{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.mh h1{margin:0;font-size:18px;flex:1}
.who{display:flex;align-items:center;gap:8px;font-size:12px}
.who b{display:block;font-size:13px}
.av{width:32px;height:32px;border-radius:50%;background:var(--em);color:var(--gold);display:grid;place-items:center;font-weight:700;font-size:12px}
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:12px 14px}
.kpi .l{font-size:12px;color:var(--mut);font-weight:600}
.kpi .v{font-size:20px;font-weight:700;margin-top:2px;white-space:nowrap}
.kpi .cur{font-size:12px;font-weight:600;color:var(--mut)}
.cur{white-space:nowrap}
.kpi .s{font-size:11.5px;font-weight:600}
.bar{height:6px;border-radius:99px;background:var(--greyb);overflow:hidden;margin-top:8px}
.bar i{display:block;height:100%;background:var(--ok);border-radius:99px}
.two{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px}
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:14px;min-width:0}
.panel h3{margin:0 0 10px;font-size:13.5px}
table{width:100%;border-collapse:collapse;font-size:13px}
th{text-align:start;font-size:11.5px;color:var(--mut);font-weight:700;padding:8px;border-bottom:1px solid var(--line);white-space:nowrap}
td{padding:9px 8px;border-bottom:1px solid #EEF2F0;vertical-align:middle}
tr:last-child td{border-bottom:0}
tr.hl td{background:#FFFBEA}
.tw{overflow-x:auto}
.kan{display:grid;grid-template-columns:repeat(5,minmax(170px,1fr));gap:10px;overflow-x:auto;padding-bottom:6px}
.kcol{background:#EEF2F0;border-radius:12px;padding:9px;min-height:200px}
.kcol h5{margin:0 0 8px;font-size:12px;display:flex;justify-content:space-between;color:var(--mut)}
.kc{background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px;margin-bottom:8px;font-size:12.5px;display:flex;flex-direction:column;gap:6px}
.kc.mine{border-color:var(--gold2);box-shadow:0 0 0 2px #FBF3D6}
.kc .id{font-weight:700;font-size:12px;color:var(--em3)}
.kc select{min-height:32px;border:1px solid var(--line);border-radius:8px;padding:4px 6px;background:#fff;width:100%;font-size:12.5px}
.act{list-style:none;margin:0;padding:0;font-size:12.5px}
.act li{padding:7px 0;border-bottom:1px dashed var(--line);display:flex;gap:8px}
.act li:last-child{border:0}
.act time{color:var(--mut);white-space:nowrap;font-size:11.5px;margin-inline-start:auto}

/* tour */
.tour{position:fixed;top:60px;inset-inline-end:20px;width:330px;max-width:calc(100vw - 24px);max-height:calc(100vh - 80px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 60px -20px rgba(0,0,0,.35);z-index:40;padding:14px}
.tour h4{margin:10px 0 6px;font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--mut)}
.tour h4:first-child{margin-top:0}
.ts{display:flex;align-items:center;gap:9px;padding:7px 8px;border-radius:9px;width:100%;text-align:start;font-size:13px}
.ts:hover{background:var(--soft)}
.ts .c{width:20px;height:20px;border-radius:50%;border:2px solid #B6C4C0;flex:none;display:grid;place-items:center;font-size:10.5px;font-weight:700;color:var(--mut)}
.ts.done .c{background:var(--ok);border-color:var(--ok);color:#fff}
.ts.done .c svg{width:12px;height:12px;stroke-width:3}
.ts.done{color:var(--mut)}
.ts small{margin-inline-start:auto;color:var(--mut);font-size:11px;white-space:nowrap}
.foot{text-align:center;color:var(--mut);font-size:12px;padding:0 16px 16px}

@media (max-width:1080px){
  .stage{grid-template-columns:1fr;padding:12px}
  .panes{display:flex;justify-content:center;margin:10px 12px 0}
  .stage[data-pane=phone] .colw{display:none}
  .stage[data-pane=web] .colp{display:none}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .two{grid-template-columns:1fr}
  .wb{grid-template-columns:1fr}
  .side{flex-direction:row;overflow-x:auto;padding:8px}
  .side .brand{display:none}
  .side button{flex:none}
  .top{padding:8px 12px;gap:8px}
  .brand small,.demo-tag{display:none}
  .tbtn span{display:none}
  .tbtn{padding:0 10px}
}
@media (max-width:600px){.who>span:last-child{display:none}.mh{flex-wrap:wrap}.kpi .v{font-size:17px}}
@media (max-width:420px){
  .phone{width:100%;height:calc(100vh - 150px);min-height:560px;border-radius:30px;padding:7px}
  .screen{border-radius:24px}
  .col-h{flex-wrap:wrap;justify-content:center}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
