:root{
  --blue:#005A99; --blue-d:#00447a; --blue-l:#e6f0f8;
  --green:#69B845; --green-l:#edf7e8;
  --orange:#FE5E00; --orange-l:#fff0e6;
  --red:#d33; --red-l:#fdecec;
  --ink:#1b2430; --ink2:#5b6675; --line:#e3e8ee; --bg:#f4f6f9; --card:#fff;
  --r:14px; --nav:64px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans Arabic",Tahoma,sans-serif;font-size:15px}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--blue)}
.splash{height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;background:#fff}
.splash img{width:70%;max-width:320px}
.spinner{width:30px;height:30px;border:3px solid var(--blue-l);border-top-color:var(--blue);border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* layout */
.topbar{position:sticky;top:0;z-index:20;background:var(--blue);color:#fff;display:flex;align-items:center;gap:10px;padding:12px 14px;min-height:56px}
.topbar h1{font-size:17px;margin:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar .back{background:none;border:0;color:#fff;font-size:22px;padding:0 6px;cursor:pointer}
.topbar select{background:rgba(255,255,255,.15);color:#fff;border:1px solid rgba(255,255,255,.35);border-radius:8px;padding:5px 8px;max-width:45%}
.topbar select option{color:var(--ink)}
.page{padding:14px 14px calc(var(--nav) + 24px);max-width:900px;margin:0 auto}
.bottomnav{position:fixed;bottom:0;left:0;right:0;height:var(--nav);background:#fff;border-top:1px solid var(--line);display:flex;z-index:30;padding-bottom:env(safe-area-inset-bottom)}
.bottomnav a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;color:var(--ink2);font-size:12px;gap:3px;position:relative}
.bottomnav a.on{color:var(--blue);font-weight:600}
.bottomnav svg{width:24px;height:24px}
.badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;border-radius:10px;background:var(--orange);color:#fff;font-size:11px;font-weight:700;padding:0 6px}
.bottomnav .badge{position:absolute;top:6px;inset-inline-start:calc(50% + 6px)}

/* home tiles */
.hello{display:flex;align-items:center;gap:12px;margin:4px 0 14px}
.hello img{width:54px}
.hello b{display:block;font-size:17px}
.hello small{color:var(--ink2)}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.tile{background:var(--card);border-radius:var(--r);padding:16px 14px;text-decoration:none;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.06);display:flex;flex-direction:column;gap:10px;position:relative;border-top:4px solid var(--blue)}
.tile.g{border-top-color:var(--green)} .tile.o{border-top-color:var(--orange)}
.tile .ic{width:38px;height:38px;border-radius:10px;background:var(--blue-l);color:var(--blue);display:flex;align-items:center;justify-content:center}
.tile.g .ic{background:var(--green-l);color:#3f8a20} .tile.o .ic{background:var(--orange-l);color:var(--orange)}
.tile .ic svg{width:22px;height:22px}
.tile b{font-size:15px}
.tile .badge{position:absolute;top:12px;inset-inline-end:12px}

/* cards & lists */
.card{background:var(--card);border-radius:var(--r);padding:14px;box-shadow:0 1px 3px rgba(0,0,0,.06);margin-bottom:12px}
.card h3{margin:0 0 10px;font-size:16px}
.list{display:flex;flex-direction:column;gap:10px}
.item{background:var(--card);border-radius:12px;padding:12px 14px;box-shadow:0 1px 2px rgba(0,0,0,.05);display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--ink);cursor:pointer}
.item .grow{flex:1;min-width:0}
.item .t{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .s{color:var(--ink2);font-size:13px;margin-top:3px}
.empty{text-align:center;color:var(--ink2);padding:40px 10px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row>*{flex:1;min-width:130px}
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:14px}
.kv dt{color:var(--ink2)} .kv dd{margin:0;font-weight:500;word-break:break-word}
.chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 10px;margin-bottom:4px}
.chip{border:1px solid var(--line);background:#fff;border-radius:20px;padding:6px 14px;white-space:nowrap;cursor:pointer;font-size:13px}
.chip.on{background:var(--blue);border-color:var(--blue);color:#fff}

.st{display:inline-block;font-size:12px;font-weight:600;padding:3px 10px;border-radius:12px;white-space:nowrap}
.st.pending,.st.review,.st.pending_dept,.st.pending_ops,.st.pending_store,.st.open,.st.issued_fine{background:var(--orange-l);color:#b84400}
.st.approved,.st.issued,.st.paid,.st.done,.st.in{background:var(--green-l);color:#2f7a14}
.st.rejected,.st.cancelled,.st.unpaid{background:var(--red-l);color:var(--red)}
.st.waived,.st.closed,.st.dismissed,.st.out{background:#eef1f4;color:var(--ink2)}
.st.overdue{background:var(--red);color:#fff}
.st.assigned,.st.in_progress,.st.acknowledged{background:var(--blue-l);color:var(--blue-d)}
.st.resolved,.st.received,.st.fined,.st.warned,.st.handled{background:var(--green-l);color:#2f7a14}

/* forms */
label.f{display:block;margin-bottom:12px}
label.f>span{display:block;font-size:13px;color:var(--ink2);margin-bottom:5px}
input,select,textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:11px 12px;background:#fff;outline:none}
input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-l)}
textarea{min-height:80px;resize:vertical}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:10px;padding:11px 18px;background:var(--blue);color:#fff;font-weight:600;cursor:pointer;text-decoration:none}
.btn:disabled{opacity:.5}
.btn.g{background:var(--green)} .btn.o{background:var(--orange)} .btn.r{background:var(--red)}
.btn.ghost{background:#fff;color:var(--blue);border:1px solid var(--blue)}
.btn.sm{padding:7px 12px;font-size:13px}
.btn.block{width:100%}
.btns{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.btns .btn{flex:1}
.fab{position:fixed;bottom:calc(var(--nav) + 16px);inset-inline-end:18px;width:56px;height:56px;border-radius:50%;background:var(--orange);color:#fff;border:0;font-size:30px;box-shadow:0 4px 12px rgba(0,0,0,.2);cursor:pointer;z-index:25;text-decoration:none;display:flex;align-items:center;justify-content:center}
.search{margin-bottom:10px}

/* login */
.login{min-height:100vh;display:flex;flex-direction:column;justify-content:center;padding:24px;max-width:420px;margin:0 auto}
.login img{width:78%;max-width:300px;margin:0 auto 26px;display:block}
.login .card{padding:20px}
.lang-sw{position:absolute;top:14px;inset-inline-end:14px}

/* worker photos */
.photo{width:64px;height:64px;border-radius:10px;object-fit:cover;background:var(--blue-l);flex-shrink:0}
.photo.lg{width:100%;height:auto;max-height:340px;object-fit:contain}
.worker{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}
.worker:last-child{border:0}

/* modal */
.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:50;display:flex;align-items:flex-end;justify-content:center}
.modal{background:#fff;width:100%;max-width:560px;border-radius:18px 18px 0 0;padding:18px 16px 24px;max-height:90vh;overflow:auto;animation:up .2s}
.modal h3{margin:0 0 14px}
@keyframes up{from{transform:translateY(40px);opacity:0}}
#toast{position:fixed;bottom:calc(var(--nav) + 20px);left:50%;transform:translateX(-50%);background:#222;color:#fff;padding:10px 18px;border-radius:20px;font-size:14px;z-index:60;opacity:0;pointer-events:none;transition:.25s;max-width:90%}
#toast.on{opacity:1}

/* tables / reports */
.tbl-wrap{overflow-x:auto}
table.tbl{width:100%;border-collapse:collapse;font-size:13px;background:#fff}
.tbl th,.tbl td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:start;white-space:nowrap}
.tbl th{background:var(--blue-l);color:var(--blue-d)}
.stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;margin-bottom:12px}
.stat{background:#fff;border-radius:12px;padding:12px;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.stat b{display:block;font-size:22px;color:var(--blue)}
.stat small{color:var(--ink2)}
.bar{height:8px;border-radius:4px;background:var(--line);overflow:hidden;margin-top:6px}
.bar i{display:block;height:100%;background:var(--green)}
.check{display:flex;align-items:center;gap:12px;padding:12px;border-bottom:1px solid var(--line)}
.check:last-child{border:0}
.check .box{width:28px;height:28px;border-radius:8px;border:2px solid var(--line);display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;background:#fff}
.check.done .box{background:var(--green);border-color:var(--green);color:#fff}
.hist{font-size:13px;color:var(--ink2);border-inline-start:2px solid var(--line);padding-inline-start:12px}
.hist div{margin-bottom:8px}
.hist b{color:var(--ink)}
.note{background:var(--orange-l);color:#8a3300;border-radius:10px;padding:10px 12px;font-size:13px;margin-bottom:12px}
.muted{color:var(--ink2);font-size:13px}
.line-item{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.line-item select{flex:2}.line-item input{flex:1;min-width:70px}
.x{background:none;border:0;color:var(--red);font-size:22px;cursor:pointer;padding:0 6px}
.cost{color:#2f7a14;font-weight:600}
.seg{display:flex;gap:0;margin:0 auto 14px;max-width:360px;width:100%;background:var(--card,#fff);border-radius:14px;padding:4px;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.seg button{flex:1;border:0;background:transparent;padding:12px 8px;border-radius:10px;font:inherit;font-weight:700;font-size:15px;color:inherit;cursor:pointer}
.seg button.on{background:var(--blue);color:#fff}
.portal-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}

/* approval chain */
.flow{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:4px 0 12px}
.flow i{color:var(--ink2);font-style:normal;font-size:16px}
[dir=rtl] .flow i{transform:scaleX(-1)}
.fstep{background:#eef1f4;border-radius:10px;padding:6px 10px;display:flex;flex-direction:column;min-width:0;border:1px solid transparent}
.fstep b{font-size:12.5px;font-weight:600}
.fstep small{font-size:11px;color:var(--ink2)}
.fstep small:empty{display:none}
.fstep.done{background:var(--green-l);color:#2f7a14}
.fstep.now{background:var(--orange-l);color:#b84400;border-color:var(--orange);box-shadow:0 0 0 2px rgba(254,94,0,.12)}
.fstep.rej{background:var(--red-l);color:var(--red)}
.st.in_approval{background:var(--orange-l);color:#b84400}
.st.declined{background:var(--red-l);color:var(--red)}
/* home sections */
.sec-h{margin:18px 2px 8px;font-size:13px;color:var(--ink2);font-weight:700;letter-spacing:.2px}
.sec-h:first-of-type{margin-top:6px}
.tile.big{padding:22px 16px}
.tile.big b{font-size:17px}
.tile.big .ic{width:48px;height:48px}
.note.todo{display:block;text-decoration:none;background:var(--orange-l);border-color:var(--orange);color:#8a3500}
.sigpad{border:1.5px dashed var(--line);border-radius:12px;background:#fff;touch-action:none}
.sigpad canvas{width:100%;height:auto;display:block;touch-action:none}
.sigimg{max-width:220px;max-height:90px;display:block;background:#fff;border:1px solid var(--line);border-radius:8px;padding:4px}
.card.exc{background:var(--orange-l);border:1px solid var(--orange)}
.st.waiting_material{background:var(--blue-l);color:var(--blue-d)}
/* polish */
.topbar{background:linear-gradient(135deg,var(--blue) 0%,var(--blue-d) 100%);box-shadow:0 2px 8px rgba(0,40,80,.18)}
.hello{background:var(--card);border-radius:var(--r);padding:12px 14px;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.tile,.item{transition:transform .08s ease,box-shadow .15s ease}
.tile:active,.item:active{transform:scale(.98)}
.tile:hover,.item:hover{box-shadow:0 3px 10px rgba(0,0,0,.08)}
.tile small.muted{font-size:12px;line-height:1.4}
.chip{transition:background .15s}
.note.upd{display:block;text-decoration:none;background:var(--green-l);color:#2f6a12;border:1px solid var(--green)}
.card.score .big{font-size:34px;line-height:1;margin-inline-end:4px}
.card.score.approved{border-inline-start:5px solid var(--green)} .card.score.assigned{border-inline-start:5px solid var(--blue)}
.card.score.pending{border-inline-start:5px solid var(--orange)} .card.score.rejected{border-inline-start:5px solid var(--red)}
.st.applied{background:var(--green-l);color:#2f7a14}

/* ===================================================================== design v2 */
@font-face{font-family:"Cairo";src:url(../fonts/cairo.woff) format("woff");font-weight:200 1000;font-display:swap}
:root{--r:16px;--bg:#f2f5f9;--line:#e2e8f0;--ink:#16202c;--ink2:#64748b;--sh:0 1px 2px rgba(15,35,60,.04),0 2px 8px rgba(15,35,60,.05);--sh2:0 6px 20px rgba(15,35,60,.10)}
html,body{font-family:"Cairo",system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans Arabic",Tahoma,sans-serif;font-size:15px;line-height:1.5}
input,select,textarea,button{font-family:inherit}
/* mixed Arabic / English text keeps its own direction (no jumping dots and numbers) */
.item .t,.item .s,.note,.kv dd,.hist div,.card h3,.fstep b,.fstep small,.tile b,.sg-n{unicode-bidi:plaintext}
[dir=rtl] .item .t,[dir=rtl] .item .s,[dir=rtl] .note,[dir=rtl] .kv dd,[dir=rtl] .hist div{text-align:right}
[dir=ltr] .item .t,[dir=ltr] .item .s,[dir=ltr] .note,[dir=ltr] .kv dd,[dir=ltr] .hist div{text-align:left}

/* top bar */
.topbar{min-height:58px;padding:10px 12px;gap:6px;padding-top:max(10px,env(safe-area-inset-top))}
.topbar h1{font-size:18px;font-weight:800;letter-spacing:.1px}
.topbar .back{width:38px;height:38px;border-radius:12px;display:flex;align-items:center;justify-content:center;padding:0;flex-shrink:0}
.topbar .back:active{background:rgba(255,255,255,.15)}
.topbar select{width:auto;max-width:34%;font-size:13px;padding:6px 26px 6px 10px;border-radius:20px;background-color:rgba(255,255,255,.14);border-color:rgba(255,255,255,.28)}
[dir=rtl] .topbar select{padding:6px 10px 6px 26px}

/* cards, lists */
.card,.item,.stat,.tile,.hello{box-shadow:var(--sh);border:1px solid rgba(226,232,240,.7)}
.card{border-radius:var(--r);padding:16px}
.item{border-radius:14px;padding:12px 14px;min-height:62px}
.item .t{font-weight:700;font-size:14.5px}
.item .s{font-size:12.5px;line-height:1.5}
.list{gap:8px}
.stat{border-radius:14px;padding:12px 14px}
.stat b{font-size:22px;font-weight:800}
.stat small{font-size:12.5px}
.st{font-size:11.5px;font-weight:700;padding:3px 10px;border-radius:20px}
.chip{border-radius:20px;padding:6px 14px;font-weight:600;font-size:12.5px;background:#fff}
.chip.on{box-shadow:0 2px 8px rgba(0,90,153,.25)}
.chips{scrollbar-width:none}.chips::-webkit-scrollbar{display:none}
.note{border-radius:12px;padding:11px 14px;border:1px solid transparent;line-height:1.6}
.note.todo{border-color:#ffc7a3;font-weight:600}
.btn{border-radius:12px;font-weight:700;padding:12px 18px;box-shadow:0 1px 2px rgba(0,0,0,.06);transition:transform .08s,filter .15s}
.btn:active{transform:scale(.97);filter:brightness(.95)}
.btn.ghost{box-shadow:none}
input,select,textarea{border-radius:12px;border-color:#d8e0ea;background:#fff}
label.f>span{font-weight:600;font-size:12.5px}
.kv{gap:8px 16px}
.fab{width:58px;height:58px;box-shadow:0 6px 18px rgba(254,94,0,.40);font-size:28px}

/* empty state */
.empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:48px 10px;font-weight:600}
.empty:before{content:"";width:64px;height:64px;border-radius:50%;background:var(--blue-l) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23005A99' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center/30px no-repeat}

/* home: welcome banner + compact tiles */
.hello.banner{background:linear-gradient(135deg,#0a6bb0 0%,var(--blue) 45%,var(--blue-d) 100%);color:#fff;border:0;padding:16px;border-radius:18px;box-shadow:0 8px 22px rgba(0,68,122,.25);position:relative;overflow:hidden}
.hello.banner:after{content:"";position:absolute;inset-inline-end:-40px;top:-50px;width:160px;height:160px;border-radius:50%;background:rgba(255,255,255,.08)}
.hello.banner small{color:rgba(255,255,255,.82);font-size:12.5px}
.hello.banner .hi{font-size:12.5px;opacity:.85;display:block}
.hello.banner b{font-size:19px;font-weight:800}
.hello.banner img{width:46px;height:46px;background:#fff;border-radius:14px;padding:6px;object-fit:contain}
.tiles{gap:10px}
.tiles.home{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
.tiles.home .tile{flex-direction:row;align-items:center;gap:10px;padding:14px 12px;border-top:0;min-height:68px}
.tiles.home .tile b{font-size:14px;font-weight:700;line-height:1.35}
.tiles.home .tile .ic{width:40px;height:40px;border-radius:12px;flex-shrink:0}
.tiles.home .tile .badge{position:static;margin-inline-start:auto}
.tile{border-radius:16px}
.tile.big{border-top-width:0;box-shadow:var(--sh);align-items:flex-start}
.tile.big .ic{border-radius:14px}
.tile.big b{font-weight:800}
.sec-h{display:flex;align-items:center;gap:8px;margin:20px 2px 10px;font-size:13px;color:var(--ink);font-weight:800}
.sec-h:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--orange)}

/* bottom nav */
.bottomnav{height:calc(var(--nav) + env(safe-area-inset-bottom));box-shadow:0 -2px 12px rgba(15,35,60,.06);border-top:0}
.bottomnav a{font-weight:600;font-size:11.5px}
.bottomnav a.on svg{background:var(--blue-l);border-radius:12px;padding:3px 14px;width:52px;height:30px}
.bottomnav a svg{transition:background .15s}

/* login */
.login{min-height:100vh}
body:has(.login){background:radial-gradient(1200px 500px at 50% -10%,#dcebf7 0%,var(--bg) 60%)}
.login .card{border-radius:20px;box-shadow:var(--sh2)}
.seg{border-radius:16px}

/* modal */
.modal{border-radius:22px 22px 0 0;padding:10px 18px 26px}
.modal:before{content:"";display:block;width:42px;height:5px;border-radius:3px;background:#d5dde7;margin:0 auto 12px}
.modal h3{font-size:18px;font-weight:800}
.modal-bg{backdrop-filter:blur(2px)}

/* tables */
.tbl th{font-weight:700}
.tbl tr:nth-child(even) td{background:#fafcfe}
@media (min-width:700px){.tiles.home{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}
.qsearch{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:11px 14px;margin:0 0 12px;color:var(--ink2);text-decoration:none;box-shadow:var(--sh);font-size:13.5px}
.qsearch svg{width:20px;height:20px;color:var(--blue);flex-shrink:0}

/* ===================================================================== design v3 */
:root{--bg:#eef2f7;--blue-g:linear-gradient(135deg,#0b74bd 0%,#005A99 50%,#003a68 100%)}
body{background:var(--bg)}
.topbar{background:var(--blue-g);box-shadow:none}
.page{padding-top:12px}

/* today at a glance */
.kpis{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:0 0 14px}
@media (min-width:600px){.kpis{grid-template-columns:repeat(4,1fr)}}
.kpi{position:relative;display:flex;flex-direction:column;gap:2px;background:#fff;border-radius:16px;padding:12px 14px 12px;text-decoration:none;color:var(--ink);box-shadow:var(--sh);border:1px solid rgba(226,232,240,.7);overflow:hidden}
.kpi .ic{position:absolute;top:12px;inset-inline-end:12px;width:34px;height:34px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:var(--blue-l);color:var(--blue)}
.kpi .ic svg{width:18px;height:18px}
.kpi b{font-size:26px;font-weight:800;line-height:1.15;color:var(--blue-d)}
.kpi small{font-size:12px;color:var(--ink2);font-weight:600}
.kpi:after{content:"";position:absolute;bottom:0;inset-inline-start:0;inset-inline-end:0;height:3px;background:var(--blue)}
.kpi.o .ic{background:var(--orange-l);color:var(--orange)} .kpi.o b{color:#c24600} .kpi.o:after{background:var(--orange)}
.kpi.g .ic{background:var(--green-l);color:#3f8a20} .kpi.g b{color:#2f7a14} .kpi.g:after{background:var(--green)}
.kpi.r .ic{background:var(--red-l);color:var(--red)} .kpi.r b{color:var(--red)} .kpi.r:after{background:var(--red)}
.kpi:active{transform:scale(.98)}

/* home tiles: soft gradient icon chips */
.tiles.home .tile .ic{background:linear-gradient(135deg,#e9f3fb,#d6e8f6)}
.tiles.home .tile.g .ic{background:linear-gradient(135deg,#eff8ea,#dcf0d0)}
.tiles.home .tile.o .ic{background:linear-gradient(135deg,#fff3ea,#ffe0cc)}

/* lists: a colored edge shows the status at a glance */
.item{border-inline-start:4px solid transparent}
.item:has(.st.pending),.item:has(.st.review),.item:has(.st.in_approval),.item:has(.st.open),.item:has(.st.pre_approved),.item:has(.st.pending_dept),.item:has(.st.pending_ops),.item:has(.st.pending_store){border-inline-start-color:var(--orange)}
.item:has(.st.approved),.item:has(.st.paid),.item:has(.st.done),.item:has(.st.received),.item:has(.st.issued),.item:has(.st.resolved){border-inline-start-color:var(--green)}
.item:has(.st.rejected),.item:has(.st.unpaid),.item:has(.st.overdue),.item:has(.st.cancelled),.item:has(.st.declined){border-inline-start-color:var(--red)}
.item:has(.st.assigned),.item:has(.st.in_progress),.item:has(.st.acknowledged),.item:has(.st.waiting_material){border-inline-start-color:var(--blue)}

/* stats: number with an accent */
.stat{position:relative;padding-inline-start:16px}
.stat:before{content:"";position:absolute;inset-inline-start:0;top:14px;bottom:14px;width:3px;border-radius:2px;background:var(--blue-l)}

/* bottom nav: floating bar */
.bottomnav{left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom));height:var(--nav);border-radius:20px;box-shadow:0 8px 24px rgba(15,35,60,.14);padding-bottom:0}
.page{padding-bottom:calc(var(--nav) + 40px)}
.fab{bottom:calc(var(--nav) + 26px)}
#toast{bottom:calc(var(--nav) + 30px)}

/* login: blue hero behind the logo card */
body:has(.login){background:linear-gradient(180deg,#005A99 0,#003a68 300px,var(--bg) 300px)}
.login img{background:#fff;border-radius:22px;padding:18px 22px;box-shadow:0 10px 30px rgba(0,0,0,.18);width:72%}
.login .seg{box-shadow:var(--sh2)}
.lang-sw .chip,.lang-sw button{background:#fff}

/* section titles and modal sheet */
.sec-h{font-size:13.5px}
.modal .flow{background:var(--bg);border-radius:12px;padding:8px}
.card.jobs2{background:var(--blue-l);border:1px dashed #9fc3e0;box-shadow:none}
.jobs2-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
.jobs2-grid .check{padding:6px 0;border:0}

/* ===================================================================== v4: simpler navigation */
/* back: a clear pill with an arrow and the word "back" */
.topbar .back{width:auto;height:36px;padding:0 12px 0 8px;gap:2px;border-radius:18px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.22);font-size:14px;font-weight:700;color:#fff}
[dir=rtl] .topbar .back{padding:0 8px 0 12px}
.topbar .back svg{width:20px;height:20px;stroke-width:2.6}
.topbar .back:active{background:rgba(255,255,255,.28)}
.topbar h1{font-size:17px}

/* areas (Brands / FM / Administration) as tabs at the top of home */
.ptabs{display:flex;gap:4px;background:#fff;border-radius:16px;padding:4px;margin:0 0 12px;box-shadow:var(--sh);border:1px solid rgba(226,232,240,.7)}
.ptabs a{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 6px;border-radius:12px;text-decoration:none;color:var(--ink2);font-weight:700;font-size:13.5px;white-space:nowrap}
.ptabs a svg{width:18px;height:18px}
.ptabs a.on{background:var(--blue-g);color:#fff;box-shadow:0 3px 10px rgba(0,90,153,.3)}

/* bottom bar: big + in the middle */
.bottomnav a.plus{flex:0 0 70px}
.bottomnav a.plus span{width:56px;height:56px;margin-top:-30px;border-radius:50%;background:linear-gradient(135deg,#ff7a26,#fe5e00);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 18px rgba(254,94,0,.45);border:4px solid var(--bg)}
.bottomnav a.plus svg{width:28px;height:28px;stroke-width:2.6;background:none!important;padding:0!important}
.fab{display:none}

/* the + sheet */
.qgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.qa{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 6px;border-radius:16px;background:var(--bg);text-decoration:none;color:var(--ink);text-align:center}
.qa .ic{width:48px;height:48px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:var(--blue-l);color:var(--blue)}
.qa.o .ic{background:var(--orange-l);color:var(--orange)} .qa.g .ic{background:var(--green-l);color:#3f8a20}
.qa .ic svg{width:24px;height:24px}
.qa b{font-size:12.5px;line-height:1.35}
.qa:active{transform:scale(.96)}

/* ===================================================================== v5: simple home (4 big buttons + more) */
.who{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 4px 12px}
.who b{display:block;font-size:20px;font-weight:800}
.who small{color:var(--ink2);font-size:12.5px}
.who img{width:44px;height:44px;object-fit:contain}
.waitbar{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border-radius:16px;padding:14px 16px;margin-bottom:12px;text-decoration:none;color:var(--ink2);font-weight:700;box-shadow:var(--sh);border:1px solid rgba(226,232,240,.7)}
.waitbar.on{background:linear-gradient(135deg,#fff4ec,#ffe6d6);color:#a33f00;border-color:#ffc9a6}
.waitbar b{font-size:18px}
.waitbar i{font-style:normal;font-size:22px;opacity:.6}
[dir=ltr] .waitbar i{transform:scaleX(-1)}
.big4{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.b4{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:128px;border-radius:22px;text-decoration:none;color:#fff;font-weight:800;text-align:center;padding:16px 10px;box-shadow:0 8px 20px rgba(15,35,60,.15)}
.b4 .ic{width:54px;height:54px;border-radius:18px;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center}
.b4 .ic svg{width:30px;height:30px;stroke-width:2.2}
.b4 b{font-size:16.5px;line-height:1.3}
.b4 .badge{position:absolute;top:10px;inset-inline-end:10px;background:#fff;color:var(--orange);min-width:26px;height:26px;border-radius:13px;font-size:13px}
.b4.c0{background:linear-gradient(135deg,#ff8a3d,#fe5e00)}
.b4.c1{background:linear-gradient(135deg,#1a86cf,#005A99)}
.b4.c2{background:linear-gradient(135deg,#7cc85a,#4f9e2f)}
.b4.c3{background:linear-gradient(135deg,#5b6b8c,#36435e)}
.b4:active{transform:scale(.97)}
.morebtn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;border:0;background:#fff;border-radius:16px;padding:14px;font-weight:800;font-size:15px;color:var(--blue);box-shadow:var(--sh);cursor:pointer;margin-bottom:10px}
.morebtn small{color:var(--ink2);font-weight:600}
.moresec[hidden]{display:none}
/* hide the old home bits */
.home-kpis,.qsearch{display:none}

/* attendance */
.card.att{border:1px solid #cfe5c3;background:linear-gradient(180deg,#f6fbf3,#fff)}
.att-times{margin:10px 0 4px}
.att-times>div{background:#fff;border-radius:14px;padding:10px 12px;border:1px solid var(--line);display:flex;flex-direction:column}
.att-times small{color:var(--ink2);font-weight:700}
.att-times b{font-size:24px;font-weight:800;color:var(--blue-d)}
.flag,.flagged{color:var(--red);font-weight:700;font-size:12px}
.att-ph{display:flex;gap:6px}
.att-ph img{width:48px;height:48px;cursor:zoom-in}
.online{color:#2f7a14;font-weight:700}
.check.bad .box{background:var(--red);border-color:var(--red);color:#fff;font-weight:800}
.hr-kinds{margin-bottom:10px}
.cond{display:inline-block;font-size:11px;font-weight:700;padding:1px 8px;border-radius:10px;background:#eef1f4;color:var(--ink2)}
.cond.used{background:var(--blue-l);color:var(--blue-d)} .cond.bad{background:var(--red-l);color:var(--red)}
.note.arch{background:#eef1f4;color:var(--ink2);border:1px dashed #c9d2dc}

/* monthly report + staff attendance */
.mrep h3 { margin: 0 0 8px; font-size: 16px; }
.mrep .tbl th { text-align: start; width: 42%; color: var(--muted); font-weight: 600; vertical-align: top; }
.mrep td.bad { color: var(--red); font-weight: 600; }
.mrep td.good { color: var(--green, #2f7a14); font-weight: 600; }
.sa-row { align-items: flex-start; }
.sa-row .sa-st .chip { padding: 4px 9px; font-size: 12px; }
.sa-row input { min-width: 0; flex: 1; padding: 6px 8px; }
.sa-date { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.sa-date input { flex: 1; min-width: 0; }
.sa-date .btn { flex: 0 0 46px; padding: 8px 0; }
.check .grow{flex:1;min-width:0}
/* staff roster */
.sa-pill{display:inline-block;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap;border:1.5px solid transparent;cursor:pointer;font-family:inherit}
.sa-cell{display:inline-block;min-width:30px;padding:3px 4px;border-radius:6px;font-size:11.5px;font-weight:700;text-align:center}
.c-w{background:#e6f4ea;color:#1e7b34}.c-d{background:#d9f2f0;color:#0d6e66}.c-o{background:#fff4cc;color:#8a6200}.c-l{background:#e3edfb;color:#1f4e86}
.c-a{background:#fde3e1;color:#c62828}.c-x{background:#efe6fb;color:#6a3fb5}.c-g{background:#eceff3;color:#5f6b7a}.c-none{background:#f4f6f9;color:#9aa5b4}
.sa-pick{display:flex;flex-wrap:wrap;gap:8px}.sa-pick .sa-pill{font-size:13.5px;padding:9px 13px}.sa-pick .sa-pill.on{border-color:currentColor;box-shadow:0 0 0 2px currentColor inset}
.sa-tot{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:12.5px;color:var(--muted);margin:2px 0 8px;padding:8px 10px;background:#f7f9fc;border-radius:10px}
.sa-tot b{color:var(--text,#1d2433)}.sa-tot .red b,.sa-tot b.red,.sa-grid .red{color:var(--red)}.sa-tot .good b{color:#2f7a14}
.sa-grp{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:800;margin:14px 0 6px;padding:8px 12px;border-radius:10px;background:#eef2f7;color:#1d2433;border-inline-start:5px solid #9aa6b8}
.sa-grp b{margin-inline-start:auto;background:#fff;border-radius:999px;padding:1px 10px;font-size:12.5px}
.sa-grp.g-m{background:#fff6dc;border-color:#f0b400;color:#6b4e00}.sa-grp.g-e{background:#ffe9dc;border-color:#e8742c;color:#7a3510}
.sa-grp.g-n{background:#e3e8fb;border-color:#3f51b5;color:#1f2a6b}.sa-grp.g-x{background:#f1f1f1;border-color:#9e9e9e;color:#555}
.sa-grid td,.sa-grid th{padding:5px 4px;text-align:center}.sa-grid td.nm{text-align:start;font-weight:600;white-space:nowrap;position:sticky;inset-inline-start:0;background:#fff;z-index:1}
.sa-grid td.nm small{display:block;font-weight:400;color:var(--muted);font-size:11px}.sa-grid th.today{background:var(--orange,#ff7a1a);color:#fff}
.sa-grid tr.sa-dept td{background:var(--blue-d,#1f4e86)!important;color:#fff;font-weight:700;text-align:start}.sa-grid tr.sa-sum td{font-weight:700;background:#f2f5fa!important}
.sa-grid td[data-c]{cursor:pointer}
.sa-grid{font-size:12px}.sa-grid td,.sa-grid th{padding:4px 2px}.sa-grid th small{font-weight:400}
.sa-grid td.nm{max-width:96px;white-space:normal;line-height:1.25;padding-inline-start:4px}.sa-grid .sa-cell{min-width:26px;padding:3px 2px}
/* free-plan usage (system admin) */
.us-banner{display:block;margin:8px 12px 0;padding:12px 14px;border-radius:12px;background:#c62828;color:#fff;font-weight:700;text-decoration:none;line-height:1.5}
.us-row{padding:10px 0;border-bottom:1px solid var(--line,#e5e5e5)}
.us-h{display:flex;align-items:center;gap:8px}.us-h .grow{flex:1}
.us-bar{position:relative;height:10px;border-radius:6px;background:#eceff1;margin:6px 0;overflow:hidden}
.us-bar i{position:absolute;inset:0 auto 0 0;background:#2e7d32;border-radius:6px}
.us-row.warn .us-bar i{background:#f9a825}.us-row.bad .us-bar i{background:#c62828}
.us-bar s{position:absolute;top:0;bottom:0;width:2px;background:rgba(0,0,0,.35)}
.us-bar{direction:ltr}
/* restroom hourly sheet */
.rr-tbl{width:100%;border-collapse:collapse;font-size:13px;min-width:560px}
.rr-tbl th,.rr-tbl td{border-bottom:1px solid var(--line,#e5e5e5);padding:8px 4px;text-align:center;white-space:nowrap}
.rr-tbl th{font-size:11px;color:var(--muted,#667);white-space:normal}
.rr-tbl td.l{text-align:start;white-space:normal}
.rr-tbl tr.tap{cursor:pointer}.rr-tbl tr.tap:active{background:rgba(0,0,0,.05)}

/* ---------- approval chain editor (#/flows) */
.flowlink{display:block;text-decoration:none;color:var(--ink);border-inline-start:4px solid var(--blue)}
.fx h3{margin-bottom:12px}
.fx-map{position:relative;padding-inline-start:4px;margin-bottom:14px}
.fx-map:before{content:"";position:absolute;inset-inline-start:21px;top:14px;bottom:14px;width:2px;background:linear-gradient(var(--blue-l),var(--line))}
.fx-step{position:relative;display:flex;gap:10px;align-items:flex-start;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px;margin:8px 0;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.fx-step.start,.fx-step.end{background:var(--blue-l);border-color:transparent}
.fx-step.decide{border-color:#f3c69e;background:linear-gradient(90deg,#fff7f0,#fff)}
.fx-step.approve{border-color:#cfe6c2}
.fx-dot{flex:0 0 30px;height:30px;border-radius:50%;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;z-index:1}
.fx-step.decide .fx-dot{background:var(--orange)}
.fx-step.approve .fx-dot{background:var(--green)}
.fx-body{flex:1;min-width:0}
.fx-who{font-size:14px}
.fx-what{font-size:12.5px;color:var(--ink2);margin-top:2px}
.fx-opts{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.fx-opts span{font-size:12px;background:var(--green-l);color:#2f7a14;border-radius:12px;padding:3px 9px}
.fx-opts span.rej{background:var(--red-l);color:var(--red)}
.fx-act{display:flex;flex-direction:column;gap:4px}
.fx-act .ib{width:30px;height:26px;border:1px solid var(--line);background:#fff;border-radius:8px;cursor:pointer;font-size:12px;line-height:1;color:var(--ink2)}
.fx-act .ib:disabled{opacity:.3;cursor:default}
.fx-act .ib.r{color:var(--red)}
.fx-bells{display:flex;flex-wrap:wrap;gap:6px;margin:-2px 0 6px;padding-inline-start:44px}
.fx-bell{display:inline-flex;align-items:center;gap:6px;background:#fff8e1;border:1px dashed #e0b84a;color:#7a5a00;border-radius:16px;padding:3px 4px 3px 10px;font-size:12.5px;cursor:pointer}
.fx-bell .x{border:0;background:transparent;color:#a07a10;font-size:15px;cursor:pointer;padding:0 4px}
.fx-none{padding-inline-start:44px}
.fx-legend{text-align:center;margin:-4px 0 70px}
.fx-save{position:sticky;bottom:78px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border-radius:14px;padding:10px 12px;box-shadow:0 4px 16px rgba(0,0,0,.12);margin-top:-60px}
.fx-save.dirty{border:2px solid var(--orange)}
.fx-save span{font-size:13px;color:#b84400;font-weight:600}
.fx-save .btn{margin-inline-start:auto}
.fx-wsteps{display:flex;align-items:center;justify-content:center;gap:6px;margin:-4px 0 10px}
.fx-wsteps span{width:26px;height:26px;border-radius:50%;background:#eef1f4;color:var(--ink2);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px}
.fx-wsteps span.on{background:var(--blue);color:#fff}
.fx-wsteps span.done{background:var(--green);color:#fff}
.fx-wsteps i{width:26px;height:2px;background:var(--line)}
.fx-q{margin:4px 0 10px;font-size:15px}
.fx-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;max-height:46vh;overflow:auto;margin-top:8px}
.fx-pp{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:start;border:1px solid var(--line);background:#fff;border-radius:12px;padding:10px;cursor:pointer;font:inherit}
.fx-pp small{color:var(--ink2);font-size:11.5px}
.fx-pp.on,.fx-pp:hover{border-color:var(--blue);background:var(--blue-l)}
.fx-modes{display:grid;gap:10px}
.fx-mode{display:grid;grid-template-columns:44px 1fr;grid-template-rows:auto auto;column-gap:10px;text-align:start;border:2px solid var(--line);background:#fff;border-radius:14px;padding:12px;cursor:pointer;font:inherit}
.fx-mode .ic{grid-row:span 3;font-size:26px;display:flex;align-items:center;justify-content:center;background:#f4f6f9;border-radius:12px}
.fx-mode b{font-size:15px}
.fx-mode small{color:var(--ink2);font-size:12.5px}
.fx-mode small.warn{color:var(--red)}
.fx-mode.on,.fx-mode:not(:disabled):hover{border-color:var(--blue);background:var(--blue-l)}
.fx-mode:disabled{opacity:.55;cursor:default}
.fx-opt input[data-ol]{flex:1}
.fx-rej{display:inline-flex;align-items:center;gap:4px;font-size:12px;white-space:nowrap;border:1px solid var(--line);border-radius:14px;padding:4px 8px;cursor:pointer}
.fx-rej input{width:auto;margin:0}
.fx-rej.on{background:var(--red-l);color:var(--red);border-color:var(--red)}
.fstep small.choice{color:#b84400;font-weight:600}
.item .dismiss{border:1px solid var(--line);background:#fff;border-radius:10px;padding:4px 10px;font-size:12px;cursor:pointer;white-space:nowrap}
.fx-hold{display:block;font-size:11.5px;color:var(--ink2);margin-top:3px}
.fx-hold.none{color:var(--red)}
.fx-pp .fx-hold{margin-top:2px}

/* ---------- quick switch (system owner only) */
.sw-bar{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#7a1f1f;color:#fff;padding:8px 14px;font-size:13.5px}
.sw-bar button{margin-inline-start:auto;border:0;border-radius:16px;padding:5px 12px;background:#fff;color:#7a1f1f;font-weight:700;cursor:pointer}
.sw-fab{position:fixed;inset-inline-start:12px;bottom:96px;z-index:40;width:40px;height:40px;border-radius:50%;border:0;background:rgba(20,40,70,.55);color:#fff;font-size:18px;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.sw-fab:hover{background:rgba(20,40,70,.85)}
@media print{.sw-bar,.sw-fab{display:none}}

/* ERP / CRM switch on the home screen (operations + GM) */
.sysseg{margin:0 0 12px}
.sysseg button small{font-weight:600;opacity:.75;margin-inline-start:4px}

/* paste the ID card picture */
.pastebox{border:1.5px dashed var(--line,#cbd5e1);border-radius:12px;padding:12px;text-align:center;color:var(--ink2,#64748b);margin:-4px 0 10px;font-size:14px;outline:none;min-height:20px}
.pastebox:focus{border-color:var(--blue);background:var(--blue-l)}
.item.old{opacity:.6}
#netbar{position:fixed;top:0;left:0;right:0;z-index:999;background:#334155;color:#fff;font-size:13px;text-align:center;padding:5px 10px;padding-top:max(5px,env(safe-area-inset-top))}
/* operations dashboard (home) */
.od{margin:0 0 16px}
.od-head{display:flex;align-items:center;justify-content:space-between;margin:2px 2px 10px}
.od-head b{font-size:17px;color:var(--blue-d)}
.od-ref{border:0;background:var(--blue-l);color:var(--blue);width:34px;height:34px;border-radius:10px;font-size:18px;cursor:pointer}
.od-top{display:grid;grid-template-columns:repeat(auto-fit,minmax(70px,1fr));gap:8px;background:linear-gradient(135deg,var(--blue-d),var(--blue));color:#fff;border-radius:18px;padding:14px 10px;margin-bottom:10px;box-shadow:var(--sh)}
.od-top div{display:flex;flex-direction:column;align-items:center;text-align:center}
.od-top b{font-size:24px;font-weight:800;line-height:1.1}
.od-top small{font-size:11.5px;opacity:.85;font-weight:600}
.od-card{background:var(--card);border-radius:16px;padding:12px 14px;margin-bottom:10px;box-shadow:var(--sh);border:1px solid rgba(226,232,240,.7)}
.od-wait{color:var(--ink2);text-align:center}
.od-depts{display:grid;grid-template-columns:1fr;gap:8px}
@media (min-width:600px){.od-depts{grid-template-columns:1fr 1fr}}
.od-dept{display:flex;align-items:center;gap:10px;padding:6px 4px;border-bottom:1px solid var(--line)}
.od-dept:last-child{border-bottom:0}
.od-dic{width:36px;height:36px;border-radius:11px;background:var(--bg);display:flex;align-items:center;justify-content:center;font-size:18px;flex:none}
.od-dept small{display:block;color:var(--ink2);font-size:12px}
.od-n{text-align:end}.od-n b{font-size:20px;color:var(--blue-d);display:block;line-height:1.1}.od-n small{font-size:11px;color:var(--green);font-weight:700}
.od-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:10px}
.od-stat{display:flex;flex-direction:column;align-items:center;text-align:center;background:var(--card);border-radius:14px;padding:10px 4px;text-decoration:none;color:var(--ink);box-shadow:var(--sh);border-top:3px solid var(--blue)}
.od-stat b{font-size:20px;font-weight:800}.od-stat small{font-size:11px;color:var(--ink2);line-height:1.25}
.od-stat.o{border-top-color:var(--orange)}.od-stat.o b{color:var(--orange)}
.od-stat.r{border-top-color:var(--red)}.od-stat.r b{color:var(--red)}
.od-stat.g{border-top-color:var(--green)}.od-stat.g b{color:var(--green)}
.od-stat.zero{border-top-color:var(--line)}.od-stat.zero b{color:var(--ink2)}
.od-mall{cursor:pointer}
.od-shift{margin-top:6px;font-size:13px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.od-p{background:var(--blue-l);color:var(--blue-d);border-radius:20px;padding:2px 10px;font-weight:700;font-size:12.5px}
.od-p.r3{background:var(--blue);color:#fff}.od-p.r1{background:var(--bg);color:var(--ink)}
.od-mini{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:8px;font-size:12.5px;color:var(--ink2)}
.od-mini b{color:var(--ink)}
/* project structure */
.st-depts{display:grid;grid-template-columns:1fr;gap:10px}
@media (min-width:600px){.st-depts{grid-template-columns:1fr 1fr}}
.st-dept{border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:#fff}
.st-dept.off{opacity:.55;background:var(--bg)}
.st-dept small{display:block;color:var(--ink2);font-size:12px;margin-top:2px}
.st-duty{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line);font-size:14px}
.st-duty:last-of-type{border-bottom:0}
.st-duty span{text-align:end}
.st-people{display:flex;flex-wrap:wrap;gap:6px}
.sw{position:relative;width:46px;height:26px;border-radius:20px;border:0;background:#cbd3dc;cursor:pointer;flex:none;transition:background .2s}
.sw i{position:absolute;top:3px;inset-inline-start:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:inset-inline-start .2s}
.sw.on{background:var(--green)}.sw.on i{inset-inline-start:23px}
.st-dh{display:flex;align-items:center;gap:10px}
.st-dh .grow{flex:1;min-width:0}
.chips.wrap{flex-wrap:wrap;overflow:visible}
/* personal file */
.pv-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.pv-bar{height:6px;border-radius:6px;background:var(--line);overflow:hidden;margin:2px 0 3px}.pv-bar i{display:block;height:100%;background:var(--green);border-radius:6px}
.pv-sec{margin:14px 0 4px;font-size:13px;color:var(--blue);border-bottom:1px solid var(--line);padding-bottom:4px}
.pv-docs{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pv-doc{border:1px solid var(--line);border-radius:12px;padding:8px 10px;display:flex;flex-direction:column;gap:3px;background:var(--bg)}
.pv-doc b{font-size:13px}.pv-doc small{font-size:11.5px;color:var(--ink2)}
.pv-doc.ok{background:var(--green-l);border-color:#cfe8c2}.pv-doc.warn{background:var(--orange-l);border-color:#ffd0b0}.pv-doc.bad{background:var(--red-l);border-color:#f3b9b9}
.pv-doc .btn{align-self:flex-start;margin-top:2px}
.pv-ed{border:1px dashed var(--line);border-radius:12px;padding:8px 10px;margin-bottom:8px}
.pv-chip{font-size:11.5px;font-weight:700;border-radius:20px;padding:2px 8px;background:var(--bg);color:var(--ink2);white-space:nowrap}
.pv-chip.g{background:var(--green-l);color:#3d7a22}.pv-chip.o{background:var(--orange-l);color:var(--orange)}.pv-chip.r{background:var(--red-l);color:var(--red)}
.seg.sm{margin:6px 0 0;max-width:none;box-shadow:none;background:var(--bg)}
.seg.sm button{padding:7px 6px;font-size:13px}
.sigbox .sigimg{max-height:90px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:4px}
.seg[hidden]{display:none}
.tk-rate{margin-top:10px;display:flex;flex-direction:column;gap:8px}
.tk-rate .stars{display:flex;gap:6px;direction:ltr;justify-content:center}
.tk-rate .stars button{border:0;background:none;font-size:30px;color:#f5b301;cursor:pointer;line-height:1}
/* operations center */
.oc-top{display:grid;grid-template-columns:repeat(auto-fit,minmax(68px,1fr));gap:8px;background:linear-gradient(135deg,#0b2540,var(--blue));color:#fff;border-radius:18px;padding:14px 10px;margin-bottom:10px;box-shadow:var(--sh)}
.oc-top div{display:flex;flex-direction:column;align-items:center;text-align:center}
.oc-top b{font-size:22px;font-weight:800;line-height:1.1}.oc-top small{font-size:11px;opacity:.85;font-weight:600}
.oc-top .hl{flex-direction:row;justify-content:center;gap:4px;font-weight:800;font-size:15px}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--green);flex:none}
.dot.r{background:var(--red)}.dot.o{background:var(--orange)}.dot.g{background:var(--green)}
.oc-map{height:340px;border-radius:18px;overflow:hidden;box-shadow:var(--sh);background:#e8eef4;z-index:0}
@media (min-width:900px){.oc-map{height:460px}}
.oc-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin:8px 4px 12px;font-size:12px;color:var(--ink2)}
.oc-legend span{display:flex;align-items:center;gap:5px}.oc-legend .od-ref{margin-inline-start:auto}
.oc-pin-w{background:none;border:0}
.oc-pin{position:relative;transform:translate(-50%,-100%);display:inline-flex;align-items:center;gap:6px;white-space:nowrap;background:#fff;border-radius:20px;padding:5px 10px 5px 8px;font:700 12.5px/1 inherit;color:var(--ink);box-shadow:0 3px 10px rgba(0,0,0,.25);border:2px solid var(--green)}
.oc-pin::before{content:'';width:10px;height:10px;border-radius:50%;background:var(--green)}
.oc-pin::after{content:'';position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);border:6px solid transparent;border-top-color:var(--green)}
.oc-pin.o{border-color:var(--orange)}.oc-pin.o::before{background:var(--orange)}.oc-pin.o::after{border-top-color:var(--orange)}
.oc-pin.r{border-color:var(--red)}.oc-pin.r::before{background:var(--red);animation:ocpulse 1.4s infinite}.oc-pin.r::after{border-top-color:var(--red)}
.oc-pin i{font-style:normal;background:var(--ink);color:#fff;border-radius:10px;padding:2px 6px;font-size:11px}
@keyframes ocpulse{0%{box-shadow:0 0 0 0 rgba(221,51,51,.6)}100%{box-shadow:0 0 0 9px rgba(221,51,51,0)}}
.oc-list{display:grid;grid-template-columns:1fr;gap:10px}
@media (min-width:900px){.oc-list{grid-template-columns:1fr 1fr}}
.oc-mall{background:var(--card);border-radius:16px;padding:12px 14px;box-shadow:var(--sh);border-inline-start:5px solid var(--green);transition:box-shadow .2s}
.oc-mall.h-o{border-inline-start-color:var(--orange)}.oc-mall.h-r{border-inline-start-color:var(--red)}
.oc-mall.focus{box-shadow:0 0 0 3px var(--blue-l),var(--sh)}
.oc-mh{display:flex;align-items:center;gap:8px}.oc-mh b{font-size:16px}
.oc-people{display:flex;flex-wrap:wrap;gap:4px 12px;margin:8px 0;font-size:12.5px;color:var(--ink2)}.oc-people b{color:var(--ink)}
.oc-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.oc-st{display:flex;flex-direction:column;align-items:center;text-align:center;border-radius:12px;padding:7px 4px;text-decoration:none;color:var(--ink);background:var(--bg)}
.oc-st b{font-size:18px;font-weight:800}.oc-st small{font-size:10.5px;color:var(--ink2);line-height:1.2}
.oc-st.r{background:var(--red-l)}.oc-st.r b{color:var(--red)}.oc-st.o{background:var(--orange-l)}.oc-st.o b{color:var(--orange)}.oc-st.g{background:var(--green-l)}.oc-st.g b{color:#3d7a22}
.oc-st.zero b{color:#9aa5b1}
.oc-feed{margin-top:8px;font-size:12.5px}.oc-feed summary{cursor:pointer;color:var(--blue);font-weight:700}.oc-feed div{padding:4px 0;border-bottom:1px solid var(--line)}
.red{color:var(--red)}
.dot.n{background:#aab4bf}.oc-mall.h-n{border-inline-start-color:#cbd3dc;padding:10px 14px}
.oc-pin.n{border-color:#aab4bf}.oc-pin.n::before{background:#aab4bf}.oc-pin.n::after{border-top-color:#aab4bf}
/* landing page (operations) */
.ld-spaces{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}
@media (min-width:700px){.ld-spaces{grid-template-columns:repeat(4,1fr)}}
.ld-space{display:flex;flex-direction:column;gap:4px;background:var(--card);border-radius:16px;padding:14px;text-decoration:none;color:var(--ink);box-shadow:var(--sh);border-top:4px solid var(--blue)}
.ld-space.crm{border-top-color:var(--orange)}
.ld-space .ic{width:38px;height:38px;border-radius:12px;background:var(--blue-l);color:var(--blue);display:flex;align-items:center;justify-content:center}
.ld-space.crm .ic{background:var(--orange-l);color:var(--orange)}
.ld-space .ic svg{width:20px;height:20px}
.ld-space b{font-size:15px}.ld-space small{font-size:11.5px;color:var(--ink2);line-height:1.35}
.ld-back{display:inline-flex;align-items:center;gap:6px;margin:0 0 10px;padding:7px 12px;border-radius:20px;background:var(--blue-l);color:var(--blue-d);font-weight:700;font-size:13px;text-decoration:none}
/* violations list editor */
.fl-sec{border:1px solid var(--line);border-radius:12px;padding:8px 10px;margin:6px 0}
.fl-sec summary{cursor:pointer}
.fl-row{display:grid;grid-template-columns:1fr 80px 110px auto;gap:6px;margin:6px 0}
@media (max-width:520px){.fl-row{grid-template-columns:1fr 70px auto}.fl-row [data-fle]{grid-column:1 / span 2}}

/* ================================================================
   Enterprise look (Nov 2026): flat, quiet, dense — one navy, one accent, thin borders, small radius, no gradients.
   Comes last so it wins over the older layers above.
   ================================================================ */
:root{--navy:#0f2a44;--navy2:#173a5c;--accent:#005A99;--line:#dde3ea;--bg:#f3f5f8;--ink:#17212b;--ink2:#5d6b7a;--r:8px;
  --sh:0 1px 2px rgba(16,24,40,.05);--sh2:0 2px 6px rgba(16,24,40,.08)}
body{background:var(--bg);font-size:14.5px;letter-spacing:0}
.topbar{background:var(--navy);box-shadow:none;border-bottom:1px solid #0a1f33;min-height:52px}
.topbar h1{font-size:16px;font-weight:600}
.topbar select{border-radius:6px;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.25)}
.card,.item,.tile,.stat,.hello,.od-card,.oc-mall,.waitbar,.ld-space,.od-stat,.st-dept{border-radius:var(--r)!important;box-shadow:var(--sh)!important;border:1px solid var(--line)!important}
.card{padding:14px}
.btn{border-radius:6px!important;box-shadow:none!important;font-weight:600;padding:10px 16px}
.btn.ghost{border:1px solid var(--line);background:#fff;color:var(--ink)}
.chip{border-radius:6px}
input,select,textarea{border-radius:6px!important}
.sec-h{font-size:12px!important;font-weight:700!important;color:var(--ink2)!important;text-transform:uppercase;letter-spacing:.4px;margin:18px 2px 8px!important}
.sec-h:before{width:3px!important;height:12px!important;border-radius:1px!important;background:var(--accent)!important}
/* work tiles: white cards with a coloured edge instead of coloured blocks */
.big4{gap:10px}
.big4 .b4{background:#fff!important;color:var(--ink)!important;border:1px solid var(--line)!important;border-inline-start:4px solid var(--accent)!important;border-radius:var(--r)!important;box-shadow:var(--sh)!important;min-height:88px}
.big4 .b4.c0{border-inline-start-color:#c25100!important}.big4 .b4.c2{border-inline-start-color:#2f7d1f!important}.big4 .b4.c3{border-inline-start-color:#55606e!important}
.big4 .b4 .ic{background:var(--bg)!important;color:var(--navy)!important;border-radius:6px!important}
.big4 .b4 b{color:var(--ink)!important;font-weight:700}
.big4 .b4 .badge{background:var(--navy)!important;color:#fff!important}
.badge{background:#c25100}
.waitbar.on{background:#fff7f0!important;color:#8a3a00!important;border-color:#f3cfb3!important}
.hello.banner{background:var(--navy)!important;box-shadow:none!important;border-radius:var(--r)!important}
.who img{opacity:.9}
/* operations center / landing */
.oc-top,.od-top{background:var(--navy)!important;border-radius:var(--r)!important;box-shadow:none!important}
.ld-space{border-top:0!important;border-inline-start:4px solid var(--accent)!important}
.ld-space.crm{border-inline-start-color:#c25100!important}
.ld-space .ic,.od-dic{border-radius:6px!important}
.oc-mall{border-inline-start-width:4px!important}
.oc-mall.h-g{border-inline-start-color:#2f7d1f!important}.oc-mall.h-o{border-inline-start-color:#c25100!important}.oc-mall.h-r{border-inline-start-color:#b42318!important}.oc-mall.h-n{border-inline-start-color:#aab4bf!important}
.oc-st,.od-stat{border-radius:6px!important}
.oc-map{border-radius:var(--r)!important;box-shadow:none!important;border:1px solid var(--line)}
.oc-pin{border-radius:6px;font-weight:600}
.bottomnav{border-top:1px solid var(--line);box-shadow:none}
.bottomnav a.on{color:var(--navy)}
.note{border-radius:6px}
.login .card{border-radius:var(--r)!important}
body:has(.login){background:var(--bg)}
.bottomnav a.plus span{background:var(--navy)!important;box-shadow:0 2px 6px rgba(16,24,40,.25)!important;border-radius:12px!important;width:50px!important;height:50px!important;margin-top:-22px!important}
.fab{background:var(--navy)!important;box-shadow:0 2px 6px rgba(16,24,40,.25)!important;border-radius:12px!important}
.topbar .back,.topbar button{border-radius:6px!important}
/* warehouse dashboard */
.sd-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:4px}
.sd-head b{font-size:18px;display:block}.sd-head small{color:var(--ink2)}
.sd-actions{display:flex;gap:6px}
.sd-alerts{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media (min-width:700px){.sd-alerts{grid-template-columns:repeat(4,1fr)}}
.sd-alert{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;background:#fff;border:1px solid var(--line);border-inline-start:4px solid var(--line);border-radius:var(--r);padding:10px 12px;text-decoration:none;color:var(--ink)}
.sd-alert .ic{grid-row:1 / span 2;width:34px;height:34px;border-radius:6px;background:var(--bg);color:var(--ink2);display:flex;align-items:center;justify-content:center}
.sd-alert .ic svg{width:18px;height:18px}
.sd-alert b{font-size:22px;line-height:1.1}.sd-alert small{color:var(--ink2);font-size:12px;line-height:1.3}
.sd-alert.o{border-inline-start-color:#c25100}.sd-alert.o b{color:#c25100}.sd-alert.o .ic{background:#fff3ea;color:#c25100}
.sd-alert.r{border-inline-start-color:#b42318}.sd-alert.r b{color:#b42318}.sd-alert.r .ic{background:#fdecea;color:#b42318}
.sd-alert.zero b{color:#98a2b3}
.sd-kpis{display:grid;grid-template-columns:repeat(2,1fr);gap:0;background:#fff;border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
@media (min-width:700px){.sd-kpis{grid-template-columns:repeat(4,1fr)}}
.sd-kpi{padding:12px 14px;border-inline-end:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;flex-direction:column}
.sd-kpi b{font-size:24px;color:var(--navy)}.sd-kpi small{font-size:12px;color:var(--ink2);font-weight:600}.sd-kpi i{font-style:normal;font-size:11px;color:#98a2b3}
.sd-pipe{display:flex;align-items:stretch;gap:4px;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:8px}
.sd-stage{flex:1;text-align:center;padding:8px 4px;border-radius:6px;text-decoration:none;color:var(--ink2);background:var(--bg)}
.sd-stage b{display:block;font-size:20px;color:#98a2b3}.sd-stage small{font-size:11.5px}
.sd-stage.on{background:#eef4fa}.sd-stage.on b{color:var(--navy)}
.sd-arrow{width:10px;align-self:center;height:10px;border-top:2px solid #c3ccd6;border-inline-start:2px solid #c3ccd6;transform:rotate(-45deg)}
[dir=ltr] .sd-arrow{transform:rotate(135deg)}
.sd-line{display:flex;gap:14px;flex-wrap:wrap;align-items:center;font-size:13px;color:var(--ink2);margin:8px 2px 0}.sd-line a{margin-inline-start:auto}
.sd-grid{display:grid;grid-template-columns:1fr;gap:10px;margin-top:14px}
@media (min-width:800px){.sd-grid{grid-template-columns:1fr 1fr}}
.sd-card{margin:0}
.sd-ch{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:8px}.sd-ch b{font-size:14px}.sd-ch small{color:var(--ink2);font-size:12px}
.sd-t{width:100%;border-collapse:collapse;font-size:13px}
.sd-t th{text-align:start;font-size:11.5px;color:var(--ink2);font-weight:600;border-bottom:1px solid var(--line);padding:6px 4px;background:#fafbfc}
.sd-t td{padding:7px 4px;border-bottom:1px solid #eef1f4}
.sd-t tr[data-it]{cursor:pointer}.sd-t tr[data-it]:hover td{background:#f7f9fb}
.sd-t .red{color:#b42318;font-weight:700}.sd-t .org{color:#c25100;font-weight:700}.sd-t .grn{color:#2f7d1f;font-weight:700}
.sd-bar{display:grid;grid-template-columns:90px 1fr 34px;align-items:center;gap:8px;font-size:13px;margin:6px 0}
.sd-bar i{height:8px;background:var(--navy);border-radius:2px}.sd-bar b{text-align:end}
.sw-bar.ro{background:#7a2e00!important}
/* arrange a job's screen */
.ar-open{margin:0 0 10px}
.ar-box{border-inline-start:4px solid var(--accent)!important}
.ar-h{display:flex;flex-direction:column}.ar-h small{color:var(--ink2)}
.ar-list{display:flex;flex-direction:column;gap:4px;margin:8px 0}
.ar-row{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:#fff}
.ar-row.off{opacity:.5;background:var(--bg)}
.ar-row .ic{width:28px;height:28px;display:flex;align-items:center;justify-content:center;color:var(--ink2)}.ar-row .ic svg{width:18px;height:18px}
.ar-row .btn.sm{padding:5px 8px;min-width:32px}.ar-row .btn.on{background:var(--navy);color:#fff}
/* rows with an action on the side (vendors, visitor ratings) */
.sd-row{display:flex;align-items:flex-start;gap:10px;margin-bottom:8px}.sd-row .grow{flex:1;min-width:0}
.sd-row .chip{font-size:11.5px;padding:2px 8px;margin:4px 0 0}
.stars{color:#e0a100;letter-spacing:1px;direction:ltr;unicode-bidi:isolate}.stars i{font-style:normal;color:#d0d5dd}
/* edit mode */
body.editmode .page *{cursor:text}
body.editmode .page h1,body.editmode .page h2,body.editmode .page h3,body.editmode .page h4,body.editmode .page b,body.editmode .page label span,body.editmode .page .btn,body.editmode .page th,body.editmode .tile,body.editmode .b4,body.editmode .topbar{outline:1px dashed rgba(0,90,153,.45);outline-offset:2px}
.em-bar{position:fixed;inset-inline:12px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:60;background:#0f2a44;color:#fff;border-radius:8px;padding:10px 12px;display:flex;align-items:center;gap:10px;box-shadow:0 6px 20px rgba(15,35,60,.25);font-size:13px}
.em-bar span{flex:1}.em-bar .btn{background:#fff;color:#0f2a44;border:0}
.ar-open{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.cu-card .cu-h{display:flex;gap:10px;align-items:center;margin-bottom:10px}.cu-h b{display:block}.cu-h small{color:var(--ink2);font-size:12px}
.cu-ic{width:34px;height:34px;border-radius:8px;background:#eef3f8;display:grid;place-items:center;font-size:17px}
.cu-add{border-top:1px solid var(--line);margin-top:10px;padding-top:6px}
.cu-log.off{opacity:.55}
.sc-score{display:flex;align-items:center;gap:14px}.sc-score>div:nth-child(2){flex:1}
.sc-g{width:62px;height:62px;border-radius:8px;display:grid;place-items:center;font-size:26px;font-weight:800;line-height:1;border:2px solid currentColor}.sc-g small{font-size:11px;font-weight:600}
.sc-g.grn{color:#2f7d1f}.sc-g.org{color:#c25100}.sc-g.red{color:#b42318}
.sc-ck{display:flex;gap:10px;padding:8px 0;border-bottom:1px solid #eef1f4}.sc-ck:last-child{border:0}
.sc-ck>span{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:12px;flex:none;margin-top:2px}
.sc-ck.ok>span{background:#e8f5e4;color:#2f7d1f}.sc-ck.warn>span{background:#fdecea;color:#b42318}
.sc-ck b{display:block;font-size:13.5px}.sc-ck small{color:#b42318;font-size:12px}
.sc-ul{margin:0;padding-inline-start:18px;font-size:13px;line-height:1.8}
.f[hidden]{display:none!important}
body:has(.modal-bg) .em-bar{display:none}
/* project parts that are off: still shown, greyed */
.tile.off{opacity:.55;filter:grayscale(1);border-style:dashed}.tile.off .offtag{display:block;font-size:10.5px;color:#8a94a3;font-weight:600;margin-top:2px}
.sec-h.off{color:#8a94a3}
.note.mod-off{background:#f1f3f6;border:1px dashed #b8c1cc;color:#3b4654}
.mod-list{border:1px solid var(--line);border-radius:8px;overflow:hidden}
.mod-row{display:flex;align-items:center;gap:10px;padding:9px 12px;border-bottom:1px solid #eef1f4;background:#fff}.mod-row:last-child{border:0}
.mod-row b{display:block;font-size:13.5px}.mod-row small{color:var(--ink2);font-size:11.5px}.mod-row.off{background:#f7f8fa}.mod-row.off b{color:#8a94a3}
.chk-ul{margin:0 0 8px;padding-inline-start:18px;font-size:13px;line-height:1.8;color:#b42318}
.tile.off{position:relative;padding-bottom:22px}.tile.off .offtag{position:absolute;bottom:6px;inset-inline-end:10px;margin:0}
.fl-view{display:flex;gap:10px;align-items:baseline;padding:7px 2px;border-bottom:1px solid #eef1f4;font-size:13px}.fl-view b{white-space:nowrap;color:var(--navy)}.fl-view.new{background:#fff8ec}
/* operations center: the sites board (control-room view) */
.oc-modes{display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;margin-bottom:8px;background:#fff}
.oc-modes button{border:0;background:none;padding:7px 14px;font:inherit;font-size:12.5px;font-weight:600;color:var(--ink2);cursor:pointer}.oc-modes button.on{background:var(--navy);color:#fff}
.ob-board{background:#0f2a44;border-radius:8px;padding:14px 12px;color:#dbe6f1;background-image:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);background-size:22px 22px}
.ob-zone{border:1px solid rgba(255,255,255,.12);border-radius:8px;padding:10px;background:rgba(255,255,255,.03)}
.ob-zh{font-size:12px;font-weight:700;letter-spacing:.3px;color:#8fb3d6;margin-bottom:8px;text-transform:uppercase}.ob-zh small{color:#5f7f9f;font-weight:600}
.ob-nodes{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.ob-node{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:start;background:#14365a;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:9px 10px;color:#fff;font:inherit;cursor:pointer}
.ob-node b{font-size:14px}.ob-node.focus{outline:2px solid #6fb1ff}
.ob-dot{position:relative;width:12px;height:12px}.ob-dot i{position:absolute;inset:0;border-radius:50%;background:#7f8ea3}
.h-g .ob-dot i{background:#3ccf7a}.h-o .ob-dot i{background:#ffb020}.h-r .ob-dot i{background:#ff4d4f}
.h-r .ob-dot::after{content:'';position:absolute;inset:-5px;border-radius:50%;border:2px solid #ff4d4f;animation:obp 1.6s ease-out infinite}
@keyframes obp{from{transform:scale(.6);opacity:1}to{transform:scale(1.6);opacity:0}}
.ob-meta{display:flex;gap:8px;font-size:11.5px;color:#9fb6cc}.ob-open{background:#ff4d4f;color:#fff;border-radius:10px;padding:0 7px;font-weight:700}
.h-o .ob-open{background:#ffb020;color:#1c2633}
.ob-link{display:flex;justify-content:center;position:relative;height:30px}.ob-link::before{content:'';position:absolute;top:0;bottom:0;border-inline-start:2px dashed rgba(143,179,214,.45)}
.ob-link span{position:relative;align-self:center;background:#0f2a44;color:#8fb3d6;font-size:11px;padding:0 8px;font-weight:600}
@media (prefers-reduced-motion:reduce){.h-r .ob-dot::after{animation:none}}
.mc-day{display:flex;gap:6px;align-items:center;margin-bottom:8px}.mc-day input{flex:1;min-width:0}
.ia-card{display:flex;gap:12px;align-items:flex-start;border-inline-start:3px solid var(--accent,#005A99)}.ia-card b{display:block}.ia-card small{color:var(--ink2);font-size:12px}
.ia-ic{width:36px;height:36px;border-radius:8px;background:#eef3f8;display:grid;place-items:center;font-size:18px;flex:none}.ia-card .btns{margin-top:8px;justify-content:flex-start}
.ia-steps{margin:0;padding-inline-start:20px;line-height:1.9;font-size:14px}
/* KPI board */
.kpi-head{display:flex;gap:14px;align-items:center}.kpi-head p{margin:2px 0 0}
.kpi-score{width:64px;height:64px;border-radius:8px;display:grid;place-items:center;font-size:20px;font-weight:800;border:2px solid #b8c1cc;color:#5d6b7a}
.kpi-score.g{color:#2f7d1f;border-color:#2f7d1f}.kpi-score.o{color:#c25100;border-color:#c25100}.kpi-score.r{color:#b42318;border-color:#b42318}
.kpi-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px;margin-bottom:6px}
.kpi-c{background:#fff;border:1px solid var(--line);border-top:3px solid #b8c1cc;border-radius:8px;padding:10px}
.kpi-c.s-g{border-top-color:#2f7d1f}.kpi-c.s-o{border-top-color:#e08a00}.kpi-c.s-r{border-top-color:#b42318}
.kpi-n{font-size:12.5px;font-weight:700;color:var(--ink2)}.kpi-v{font-size:24px;font-weight:800;margin:4px 0;color:var(--navy)}
.s-r .kpi-v{color:#b42318}.s-o .kpi-v{color:#c25100}.s-g .kpi-v{color:#2f7d1f}
.kpi-m{display:flex;justify-content:space-between;gap:6px;font-size:11.5px;color:var(--ink2);margin-bottom:4px;flex-wrap:wrap}
.kpi-t{width:54px;padding:2px 4px;font:inherit;font-size:11.5px;border:1px solid var(--line);border-radius:4px}

.test-ribbon{position:sticky;top:0;z-index:9999;background:#7a2e0e;color:#fff;text-align:center;font-size:12.5px;font-weight:700;padding:5px 8px}
.wn{border:1.5px solid #c9732f;background:#fff8f1}.wn>small{display:block;color:var(--ink2);margin:2px 0 6px}.wn-i{display:flex;gap:10px;padding:7px 0;border-top:1px dashed #ecd3bb}.wn-i>span{font-size:20px;line-height:1.2}.wn-i p{margin:2px 0 0;font-size:13px;color:var(--ink2)}
.ho-sec{border-top:1px solid var(--line);padding:10px 0 4px;margin-top:6px}
.ho-h{display:flex;align-items:center;gap:8px;font-weight:700;font-size:14px;margin-bottom:6px;color:var(--ink)}
.ho-h span{flex:none;width:22px;height:22px;border-radius:50%;background:#1d3557;color:#fff;font-size:12px;display:grid;place-items:center}
.ho-sec textarea{min-height:64px}
/* compact ✓ ✗ — on a checklist row: the label keeps the room */
.check .seg.sm { flex: 0 0 auto; width: auto; margin: 0; gap: 2px; padding: 2px; }
.check .seg.sm button { flex: 0 0 auto; min-width: 34px; padding: 6px 8px; }
.pen-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-top: 6px; font-size: 13px; }
.pen-steps small { display: block; color: var(--muted, #6b7280); font-size: 11px; }
.topbar .pc-gear { background: transparent; border: 0; color: inherit; opacity: .75; font-size: 18px; padding: 4px 8px; cursor: pointer; }
.topbar .pc-gear:hover { opacity: 1; }

/* ---- calmer surfaces: thin borders instead of floating shadows, steadier type ---- */
.card, .tile, .item, .list > .item { box-shadow: none; border: 1px solid var(--line); }
.list .item + .item { border-top-color: var(--line); }
.sec-h { font-size: 13px; font-weight: 700; color: var(--ink2); letter-spacing: .01em; margin: 18px 2px 8px; }
.card h3 { font-size: 15px; }
.modal h3 { font-size: 17px; letter-spacing: 0; }
.item .t { font-weight: 600; }
.item .s { color: var(--ink2); }
.btn { letter-spacing: 0; }
.note { border-radius: 10px; }
.tr-p { display: flex; align-items: center; gap: 8px; padding: 9px 0; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.tr-p:last-child { border-bottom: 0; }
.tr-p.on { color: var(--blue); font-weight: 700; }
.tr-p .tr-bar { flex: 0 0 70px; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.tr-p .tr-bar i { display: block; height: 100%; background: var(--blue); }
.tr-p small { min-width: 56px; text-align: end; font-size: 11px; }
.sa-shd { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.sa-shd summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
.sa-shp { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 13px; flex-wrap: wrap; }
.sa-shp .pill { font-size: 11px; }
.pill.g { background: var(--green-l); color: #3b7a22; } .pill.r { background: var(--red-l); color: var(--red); } .pill.o { background: var(--orange-l); color: #a44200; }
.hm-search { margin: 4px 0 12px; }
.hm-search input { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 15px; }
.hm-search .tiles { margin-top: 10px; }
.fc-gear{float:left;border:0;background:transparent;font-size:16px;opacity:.55;cursor:pointer;padding:0 4px}
.page > .fc-gear{float:none;display:block;margin-inline-start:auto}
.fc-row{display:flex;gap:6px;align-items:center;margin:6px 0;flex-wrap:wrap}.fc-row input{flex:1;min-width:120px}
.dnotes{margin:6px 0 10px}.dnote{background:var(--bg2,#f5f7fa);border-radius:8px;padding:6px 10px;margin:4px 0}
/* a switch made of a checkbox: <label class="sw"><input type="checkbox"><span></span></label> */
label.sw{display:inline-block;background:transparent;width:46px;height:26px}
label.sw input{position:absolute;opacity:0;width:0;height:0}
label.sw span{position:absolute;inset:0;border-radius:20px;background:#cbd3dc;transition:background .2s}
label.sw span::after{content:'';position:absolute;top:3px;inset-inline-start:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:inset-inline-start .2s}
label.sw input:checked + span{background:var(--green)}
label.sw input:checked + span::after{inset-inline-start:23px}
/* company structure: one line per function */
.og-f{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--line)}
.og-f:last-child{border-bottom:0}.og-f .grow{flex:1;min-width:150px}.og-f.off .t{opacity:.55}
/* the monthly / weekly report never runs wider than the screen */
.mrep{overflow-x:auto}.mrep table.tbl{width:100%;table-layout:auto}.mrep td{white-space:normal;word-break:break-word}.mrep th{white-space:normal}
/* home: the parts grouped in folders */
.tiles.home.folders .tile.folder{flex-direction:column;align-items:flex-start;gap:6px;min-height:104px;position:relative}.tile.folder small{font-size:12px}.tiles.home.folders .tile.folder .badge{position:absolute;top:12px;inset-inline-end:12px}
.fold-h{display:flex;align-items:center;gap:12px;margin:14px 2px 8px}.fold-h a{color:var(--blue);text-decoration:none;font-weight:600}.fold-h b{font-size:16px}
/* special hours editor */
.schd{display:flex;align-items:center;gap:6px;padding:6px 0;border-bottom:1px solid var(--line,#e6e9ef);flex-wrap:wrap}.schd>b{min-width:62px;font-size:14px}
.schd select{width:auto;padding:6px 8px;min-height:0;font-size:13px}.schh{display:inline-flex;gap:4px;align-items:center}.schh[hidden]{display:none}
/* weekly report */
.wkk{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}.wkk div{background:var(--soft,#f3f6fa);border-radius:10px;padding:10px;text-align:center}.wkk b{display:block;font-size:20px}.wkk span{font-size:12px;color:var(--muted)}
.wkphs{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:6px}.wkph{margin:0}.wkph img{width:100%;height:110px;object-fit:cover;border-radius:8px}.wkph figcaption{font-size:11px;color:var(--muted);text-align:center}
.wkcase{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}.wkcase div{background:var(--soft,#f3f6fa);border-radius:8px;padding:8px;font-size:13px;line-height:1.7}
table.wk td,table.wk th{text-align:center;white-space:nowrap}
/* printable page inside the app (no window that can't be closed on the iPhone) */
.pv-ov{position:fixed;inset:0;z-index:9999;background:#fff;display:flex;flex-direction:column}
.pv-bar{display:flex;align-items:center;gap:8px;padding:calc(env(safe-area-inset-top) + 8px) 10px 8px;background:#0f2742;color:#fff;flex:0 0 auto}.pv-bar b{flex:1;text-align:center;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-bar .btn.ghost{color:#fff;background:transparent;border:1px solid rgba(255,255,255,.5)}.pv-fr{flex:1;border:0;width:100%;background:#fff}

/* landing: the job's buttons, the spaces as one compact list */
.ld-job{margin-bottom:6px}
.ld-pills{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.ld-pill{display:flex;align-items:center;gap:10px;background:var(--card);border-radius:14px;padding:10px 12px;text-decoration:none;color:var(--ink);box-shadow:var(--sh);font-weight:700;border-inline-start:4px solid var(--blue)}
.ld-pill.crm{border-inline-start-color:var(--orange)}
.ld-pill .ic{width:32px;height:32px;border-radius:10px;background:var(--blue-l);color:var(--blue);display:flex;align-items:center;justify-content:center;flex:none}
.ld-pill.crm .ic{background:var(--orange-l);color:var(--orange)}
.ld-pill i{margin-inline-start:auto;font-style:normal;opacity:.5}
.sec-h .sec-link{float:inline-end;font-size:12px;font-weight:600;text-decoration:none}

/* ---- the staff home: waiting first, search, favourites, every screen folded by department ---- */
.hm-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:2px 0 12px}
.hm-head b{display:block;font-size:20px;font-weight:800}
.hm-head small{color:var(--ink2);font-size:13px}
.hm-head img{width:46px;height:auto}
.hm-q{display:flex;align-items:center;gap:10px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:0 14px;height:52px;box-shadow:var(--sh2,0 4px 14px rgba(0,0,0,.08));margin-bottom:14px}
.hm-q svg{width:20px;height:20px;fill:none;stroke:var(--ink2);stroke-width:2;stroke-linecap:round;flex-shrink:0}
.hm-q input{border:0;outline:0;background:transparent;flex:1;font-size:15px;min-width:0;height:100%}
.hm-h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:16px 2px 8px}
.hm-h b{font-size:16px;font-weight:800}
.hm-h a,.hm-h .linkbtn{font-size:13px;font-weight:700;color:var(--blue);text-decoration:none;background:none;border:0;padding:6px 0;cursor:pointer}
.hm-wait{display:flex;flex-direction:column;gap:8px}
.hm-w{display:flex;align-items:center;gap:10px;background:var(--card);border:1px solid var(--line);border-inline-start:4px solid var(--orange);border-radius:14px;padding:12px 14px;text-decoration:none;color:var(--ink);box-shadow:var(--sh)}
.hm-w.late{border-inline-start-color:var(--red);background:#fffafa}
.hm-w .grow{flex:1;min-width:0}
.hm-w b{display:block;font-size:15px;line-height:1.4;unicode-bidi:plaintext}
.hm-w small{display:block;color:var(--ink2);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;unicode-bidi:plaintext}
.hm-wm{display:flex;flex-direction:column;align-items:flex-end;gap:2px;flex-shrink:0}
.hm-wm em{font-style:normal;font-size:11px;font-weight:800;color:var(--red);background:var(--red-l);border-radius:8px;padding:1px 7px}
.hm-wm small{font-size:11px}
.hm-wm i{font-style:normal;font-weight:800;color:var(--blue);font-size:13px}
.hm-fav,.hm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.hm-t{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px 6px;min-height:84px;text-decoration:none;color:var(--ink);box-shadow:var(--sh)}
.hm-t .ic{width:36px;height:36px;border-radius:11px;background:var(--blue-l);color:var(--blue);display:flex;align-items:center;justify-content:center}
.hm-t .ic svg{width:20px;height:20px}
.hm-t b{font-size:12.5px;font-weight:700;line-height:1.3}
.hm-t .badge{position:absolute;top:6px;inset-inline-start:6px}
.hm-t.fav.o{background:var(--orange);color:#fff;border-color:var(--orange)}
.hm-t.fav.o .ic{background:rgba(255,255,255,.2);color:#fff}
.hm-star{position:absolute;top:2px;inset-inline-end:2px;width:34px;height:34px;border:0;background:none;font-size:20px;color:#b45309;cursor:pointer}
.hm-star.on{color:var(--orange)}
.hm-secs{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:var(--sh)}
.hm-sec+.hm-sec{border-top:1px solid var(--line)}
.hm-sh{display:flex;align-items:center;gap:12px;width:100%;min-height:54px;padding:0 14px;background:none;border:0;cursor:pointer;text-align:start;color:var(--ink)}
.hm-sh .ic{width:32px;height:32px;border-radius:9px;background:var(--blue-l);color:var(--blue);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.hm-sh .ic svg{width:18px;height:18px}
.hm-sh b{flex:1;font-size:15px}
.hm-sh small{color:var(--ink2);font-size:13px}
.hm-sh i{font-style:normal;color:var(--ink2);transition:transform .15s}
.hm-sec.on .hm-sh{background:#f8fafc}
.hm-sec.on .hm-sh i{transform:rotate(180deg)}
.hm-sec .hm-grid{padding:4px 12px 14px;background:#f8fafc}
.hm-res{margin-bottom:12px}
.hm-admin{margin:18px 0 6px;text-align:center}
.hm-admin a{font-size:13px;color:var(--ink2)}
@media (min-width:640px){.hm-fav,.hm-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* service desk: ticket number, priority, stepper */
.tk-no { font-family: ui-monospace, monospace; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.tk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tk-head .tk-no { font-size: 15px; color: var(--text, inherit); }
.pill.pr-urgent { background: #fde2e1; color: #b3261e; font-weight: 700; }
.pill.pr-high { background: #ffecd6; color: #a45200; font-weight: 700; }
.pill.pr-low { background: #eef1f4; color: #5a6672; }
.seg [data-p0].on.pr-urgent { background: #d93025; color: #fff; }
.seg [data-p0].on.pr-high { background: #e8710a; color: #fff; }
.tk-steps { display: flex; gap: 2px; margin: 0 0 12px; font-size: 12px; }
.tk-steps span { flex: 1; text-align: center; padding: 6px 2px; background: var(--line, #e6e8eb); color: var(--muted); border-radius: 4px; }
.tk-steps span.ok { background: #d8f0dc; color: #1e6b2c; }
.tk-steps span.now { background: var(--blue, #1a73e8); color: #fff; font-weight: 700; }
@media (prefers-color-scheme: dark) {
  .pill.pr-urgent { background: #5c1f1c; color: #ffb4ab; } .pill.pr-high { background: #5a3300; color: #ffcf99; } .pill.pr-low { background: #2b3138; color: #b8c2cc; }
  .tk-steps span.ok { background: #1f3d25; color: #a8e0b2; }
}

/* «📺 عرض على شاشة»: full screen, bigger, no menus */
body.tvmode .bottomnav, body.tvmode .sw-fab, body.tvmode .fab, body.tvmode .topbar .back, body.tvmode .topbar [data-pcust], body.tvmode .topbar .tv-btn,
body.tvmode .sw-bar, body.tvmode .note.upd, body.tvmode .hm-admin { display: none !important; }
body.tvmode { font-size: 125%; }
body.tvmode .page { max-width: none; padding-bottom: 24px; }
body.tvmode .topbar h1 { font-size: 1.6em; }
.tv-exit { position: fixed; bottom: 14px; inset-inline-start: 14px; z-index: 50; background: rgba(0,0,0,.55); color: #fff; border: 0; border-radius: 20px; padding: 8px 14px; font: inherit; font-size: 14px; opacity: .35; }
.tv-exit:hover, .tv-exit:focus { opacity: 1; }
body.tvmode .page [data-new], body.tvmode [data-tkq] { display: none !important; }
/* the sales & leasing system: its own colour; the floor map (stacking plan) */
body.re .topbar{background:#0f5c4d}
body.re .bottomnav a.on{color:#0f5c4d}
body.re .seg button.on{background:#0f5c4d}
.sysseg{margin-bottom:10px}
.re-sum .kpis{margin:0}
.stack{display:flex;flex-direction:column;gap:4px;margin-bottom:12px;overflow-x:auto}
.st-row{display:flex;align-items:stretch;gap:6px}
.st-fl{min-width:34px;display:flex;align-items:center;justify-content:center;background:#f1f3f4;border-radius:6px;font-size:13px}
.st-cells{display:flex;gap:4px;flex-wrap:nowrap}
.st-cell{min-width:78px;padding:6px;border-radius:6px;border:1px solid rgba(0,0,0,.08);display:flex;flex-direction:column;gap:1px;color:#222;text-decoration:none;font-size:12px}
.st-cell b{font-size:13px}
.st-cell small{color:#444;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:110px}
/* the sales pipeline board */
.board{display:flex;gap:8px;overflow-x:auto;padding-bottom:8px;align-items:flex-start}
.bd-col{min-width:200px;max-width:240px;flex:0 0 auto;background:#f3f4f6;border-radius:10px;padding:6px;min-height:120px}
.bd-col.over{outline:2px dashed #0f5c4d}
.bd-h{display:flex;justify-content:space-between;align-items:center;padding:4px 6px 8px}
.bd-card{background:#fff;border-radius:8px;padding:8px;margin-bottom:6px;box-shadow:0 1px 2px rgba(0,0,0,.08);cursor:grab}
.bd-t{font-weight:700;color:inherit;text-decoration:none;display:block}
.bd-s{font-size:12px;color:#666;margin-top:2px}
.bd-mv{display:flex;justify-content:space-between;margin-top:4px}
.bd-mv .btn{padding:2px 10px;min-height:0}
/* sales & leasing: the deal's journey, quick actions */
.re-steps{display:flex;gap:4px;margin:4px 0 2px}
.re-steps .stp{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center;color:var(--muted,#777);font-size:11px;position:relative}
.re-steps .stp .dot{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--line,#e6e8eb);font-weight:700;font-size:12px}
.re-steps .stp.done .dot{background:#d8f0dc;color:#1e6b2c}
.re-steps .stp.cur .dot{background:#0f5c4d;color:#fff}
.re-steps .stp.cur{color:#0f5c4d;font-weight:700}
.re-quick{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.re-quick .btn{flex:1;min-width:140px;text-align:center;text-decoration:none}
/* the AI assistant */
.ai-chat{display:flex;flex-direction:column;gap:8px;max-height:62vh;overflow-y:auto;padding:4px 0}
.ai-msg{display:flex;flex-direction:column;max-width:88%}
.ai-msg.user{align-self:flex-start}
.ai-msg.assistant{align-self:flex-end}
html[dir=ltr] .ai-msg.user{align-self:flex-end}
html[dir=ltr] .ai-msg.assistant{align-self:flex-start}
.ai-b{padding:9px 12px;border-radius:12px;background:#f1f3f4;line-height:1.6;white-space:normal}
.ai-msg.user .ai-b{background:#0f5c4d;color:#fff}

/* Laptop layout (given per person): fixed side menu at the start (right in Arabic), wide content, dialogs in the middle.
   Only on a wide screen — the same account on the phone keeps the phone layout */
.deskside { display: none; }
@media (min-width: 1024px) {
  body.desk { --side: 256px; }
  body.desk #app { padding-inline-start: var(--side); }
  body.desk .bottomnav { display: none; }
  body.desk .deskside { display: flex; flex-direction: column; gap: 1px; position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: var(--side); overflow-y: auto; background: var(--card); border-inline-end: 1px solid var(--line); padding: 12px 10px 16px; z-index: 35; scrollbar-width: thin; }
  body.desk .dk-logo { display: block; padding: 4px 8px 12px; } body.desk .dk-logo img { height: 34px; }
  body.desk .dk-a, body.desk .dk-sh { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 14px; position: relative; background: none; border: 0; width: 100%; text-align: start; cursor: pointer; font: inherit; }
  body.desk .dk-a svg, body.desk .dk-sh svg { width: 19px; height: 19px; flex: none; color: var(--ink2); }
  body.desk .dk-a span, body.desk .dk-sh span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.desk .dk-a:hover, body.desk .dk-sh:hover { background: var(--bg); }
  body.desk .dk-a.on { background: var(--blue-l); color: var(--blue); font-weight: 700; } body.desk .dk-a.on svg { color: var(--blue); }
  body.desk .dk-a .badge { position: static; flex: 0 0 auto; min-width: 22px; text-align: center; }
  body.desk .dk-sec .dk-a { padding-inline-start: 22px; font-size: 13.5px; }
  body.desk .dk-sh { font-weight: 600; } body.desk .dk-sh i { font-style: normal; color: var(--ink2); }
  body.desk .dk-h { font-size: 11.5px; color: var(--ink2); font-weight: 700; padding: 12px 10px 4px; }
  body.desk .dk-new { margin: 6px 4px 4px; padding: 9px; border: 0; border-radius: 10px; background: var(--orange); color: #fff; font-weight: 700; cursor: pointer; font: inherit; font-weight: 700; }
  body.desk .dk-me { margin-top: auto; border-top: 1px solid var(--line); border-radius: 0; padding-top: 12px; }
  body.desk .page { max-width: 1320px; padding: 20px 28px 32px; }
  body.desk .fab { bottom: 24px; }
  body.desk .sw-fab { bottom: 24px; inset-inline-start: calc(var(--side) + 12px); }
  body.desk .topbar .back span { display: inline; }
  body.desk .modal-bg { align-items: center; padding: 24px; }
  body.desk .modal { max-width: 760px; border-radius: 16px; max-height: 88vh; }
  body.desk .tiles.home, body.desk .hm-fav, body.desk .hm-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
/* Laptop layout — the screens themselves: lists become a grid of cards, filters wrap instead of scrolling sideways,
   page headers sit on a white bar, figures and tables use the width */
@media (min-width: 1024px) {
  body.desk .topbar { background: var(--card); color: var(--ink); box-shadow: none; border-bottom: 1px solid var(--line); min-height: 60px; padding: 10px 28px; }
  body.desk .topbar h1 { font-size: 20px; color: var(--ink); }
  body.desk .topbar .back, body.desk .topbar button, body.desk .topbar a { color: var(--blue); }
  body.desk .topbar select { background: var(--bg); color: var(--ink); border-color: var(--line); }
  body.desk .page > .list, body.desk .card > .list, body.desk .page > div > .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
  body.desk .item { min-height: 76px; transition: box-shadow .15s, transform .15s; }
  body.desk a.item:hover, body.desk .item[data-id]:hover { box-shadow: 0 4px 14px rgba(0, 40, 80, .12); transform: translateY(-1px); }
  body.desk .chips { flex-wrap: wrap; overflow: visible; }
  body.desk .stats { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
  body.desk .stat { padding: 16px; }
  body.desk .card { padding: 20px 22px; }
  body.desk .tbl-wrap { overflow: visible; } body.desk .tbl { width: 100%; }
  body.desk .tbl th, body.desk .tbl td { padding: 9px 12px; }
  body.desk .tbl tbody tr:hover td { background: var(--blue-l); }
  body.desk .btns { justify-content: flex-start; }
  body.desk .modal .f { margin-bottom: 12px; }
  body.desk .note { border-radius: 10px; }
}

/* Laptop layout: the record beside its list */
@media (min-width: 1200px) {
  body.desk .page.split { max-width: none; padding: 0; display: grid; grid-template-columns: minmax(400px, 38%) 1fr; align-items: start; }
  body.desk .sp-list { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 16px 16px 24px; border-inline-end: 1px solid var(--line); background: var(--bg); scrollbar-width: thin; }
  body.desk .sp-list .page { padding: 0; max-width: none; }
  body.desk .sp-list .list { display: flex !important; flex-direction: column; gap: 8px; }
  body.desk .sp-list .item.sp-on, body.desk .sp-list a.sp-on { outline: 2px solid var(--blue); background: var(--blue-l); }
  body.desk .sp-list .fab { display: none; }
  body.desk .sp-det .page { max-width: 1000px; padding: 20px 28px 32px; margin: 0; }
  body.desk .sp-empty { height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; }
  body.desk .sp-ph { text-align: center; color: var(--ink2); } body.desk .sp-ph svg { width: 54px; height: 54px; opacity: .35; display: block; margin: 0 auto 10px; }
}

/* Laptop layout: attendance month table */
.am-wrap { overflow-x: auto !important; }
.tbl.am { font-size: 12.5px; border-collapse: collapse; }
.tbl.am th, .tbl.am td { padding: 5px 3px !important; text-align: center; min-width: 26px; border-inline-end: 1px solid var(--line); }
.tbl.am th small { display: block; font-weight: 400; opacity: .7; }
.tbl.am .am-n { text-align: start; min-width: 170px; position: sticky; inset-inline-start: 0; background: var(--card); z-index: 1; }
.tbl.am .am-n small { display: block; color: var(--ink2); font-size: 11px; }
.tbl.am .am-ok { color: #1e7b34; font-weight: 700; } .tbl.am .am-flag { background: #fff4d6; }
.tbl.am .am-abs { color: #c62828; background: #fdecec; font-weight: 700; }
.tbl.am .am-off { color: var(--ink2); background: #eef1f4; } .tbl.am .am-lv { color: var(--blue); background: var(--blue-l); font-weight: 700; } .tbl.am .am-pend { color: #a45200; background: #fff0e0; }
.tbl.am .am-fri { background: #f6f7f9; } .tbl.am th.am-today { background: var(--orange); color: #fff; }
.am-legend { margin: 4px 0 8px; }

/* Laptop layout: handovers — list and the open handover side by side */
.ho-split { display: grid; grid-template-columns: minmax(380px, 42%) 1fr; gap: 20px; align-items: start; }
.ho-split .ho-l .list { display: flex !important; flex-direction: column; gap: 8px; }
.ho-split .ho-r { position: sticky; top: 76px; }
.ho-split .ho-r .sp-ph { text-align: center; padding: 80px 20px; color: var(--ink2); font-size: 30px; } .ho-split .ho-r .sp-ph b { display: block; font-size: 16px; margin-top: 8px; }
.ho-split a.sp-on { outline: 2px solid var(--blue); background: var(--blue-l); }

.cnt-grp { display: flex; flex-direction: column; } .cnt-hist { margin: 4px 0 6px; padding: 0 12px 6px; } .cnt-hist summary { cursor: pointer; color: var(--blue); }
.cnt-hist .list { margin-top: 6px; opacity: .85; }

/* shift counts on the laptop: a day = rows of departments × columns of shifts */
.cnt-board { display: grid; grid-template-columns: 110px repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; margin-bottom: 18px; }
.cnt-board .cb-h { font-weight: 700; color: var(--ink2); text-align: center; padding: 4px; }
.cnt-board .cb-d { font-weight: 700; padding-top: 14px; }
.cnt-board .cb-c .item { margin: 0; height: auto; }
.cnt-board .cb-c > .muted { display: block; text-align: center; padding-top: 14px; }
body.desk .page > .list.cnt-list { display: flex; flex-direction: column; }

.cnt-miss { border-inline-start: 4px solid var(--red) !important; background: #fff6f6; }
.cnt-miss, .cnt-man {} .cnt-man { border-inline-start: 4px solid #e8a33a !important; background: #fffaf0; }

/* «more» filters (design 4): a short list under the chips */
.fmore{position:absolute;inset-inline-end:0;top:100%;margin:-6px 0 0;padding:4px 0;min-width:210px;z-index:30;box-shadow:0 8px 24px rgba(0,0,0,.15)}
.fmore[hidden]{display:none}
.fmore-i{padding:11px 16px;cursor:pointer;border-bottom:1px solid var(--line)}
.fmore-i:last-child{border-bottom:0}
.fmore-i.on{color:var(--blue);font-weight:700}
.fmore-i .badge{background:var(--orange);color:#fff;border-radius:10px;padding:0 7px;font-size:12px}
.chips.tight{gap:5px}.chips.tight .chip{padding:6px 10px}
/* Laptop layout (design 1): fines list with the open one beside it */
@media (min-width: 1200px) {
  body.desk .page:has(.fsplit) { max-width: none; }
  body.desk .fsplit { display: grid; grid-template-columns: minmax(420px, 40%) 1fr; gap: 18px; align-items: start; }
  body.desk .fs-list .list { display: flex !important; flex-direction: column; gap: 8px; }
  body.desk .fs-list .item.sp-on { outline: 2px solid var(--blue); background: var(--blue-l); }
  body.desk .fs-det { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; }
  body.desk .dock-card { margin: 0; padding: 18px 22px; }
  body.desk .dock-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
  body.desk .dock-h h3 { margin: 0; }
}
.stat .dlt{display:block;font-weight:700;font-size:12px;margin-top:2px}
.dash-tabs{margin-bottom:6px}
.mod-list.tree .tr-sub{border-inline-start:3px solid var(--blue);margin:0 14px 8px 0;padding-inline-start:6px}
.mod-list.tree .tr-opts{border-inline-start:2px dashed var(--orange);margin:0 18px 6px 0;padding-inline-start:4px}
.mod-list.tree .tr-g.open{background:var(--blue-l)}
.mod-list.tree .tr-s{padding:8px 10px}
.mod-list.tree .tr-o{padding:6px 10px;min-height:0}
.mod-list.tree .tr-o span{font-size:14px}

/* one button per job: the other screens of the job are tabs at the top of the screen */
.mtabs{display:flex;gap:2px;overflow-x:auto;border-bottom:1px solid var(--line);margin:0 0 14px;scrollbar-width:none}
.mtabs::-webkit-scrollbar{display:none}
.mtabs a{flex:0 0 auto;padding:10px 14px 9px;font-size:13.5px;font-weight:600;color:var(--ink2);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.mtabs a.on{color:var(--blue);border-bottom-color:var(--blue)}
.mtabs a:hover{color:var(--ink)}
.mlinks .item{text-decoration:none;color:inherit}

/* LS6 mall map */
.mm-wrap{padding:10px}
.mm-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.mm-shop{border:2px solid var(--line);border-radius:8px;padding:6px 7px;min-height:58px;text-align:start;background:var(--card);color:var(--ink);font:inherit;cursor:pointer;display:flex;flex-direction:column;gap:2px;line-height:1.25}
.mm-shop small{font-size:10.5px;color:var(--ink2);font-weight:700}
.mm-shop b{font-size:12px;font-weight:700;overflow:hidden;text-overflow:ellipsis}
.mm-shop.on{outline:3px solid var(--blue);outline-offset:1px}
.mm-shop.dim{opacity:.3}
.mm-running{background:rgba(105,184,69,.14);border-color:#69B845}
.mm-vacant{background:rgba(120,130,140,.10);border-color:#9aa3ad}
.mm-fitting{background:rgba(217,164,0,.16);border-color:#d9a400}
.mm-ending{background:rgba(254,94,0,.14);border-color:#FE5E00}
.mm-walk{grid-column:1/-1;border:1px dashed var(--line);border-radius:8px;padding:8px;text-align:center;color:var(--ink2);font-size:11.5px}
.chip.mm-c-running:not(.on){background:rgba(105,184,69,.14)}
.chip.mm-c-vacant:not(.on){background:rgba(120,130,140,.10)}
.chip.mm-c-fitting:not(.on){background:rgba(217,164,0,.16)}
.chip.mm-c-ending:not(.on){background:rgba(254,94,0,.14)}
.mm-det{border-inline-start:4px solid var(--line)}
.mm-b-running{border-inline-start-color:#69B845}.mm-b-vacant{border-inline-start-color:#9aa3ad}.mm-b-fitting{border-inline-start-color:#d9a400}.mm-b-ending{border-inline-start-color:#FE5E00}
.mm-ed{border-bottom:1px solid var(--line);padding-bottom:8px;margin-bottom:8px}
body.desk .mm-grid{gap:8px}
@media (min-width:900px){.mm-shop{min-height:64px}.mm-shop b{font-size:13px}}
/* MX3 meter readings */
a.mt-row{display:block;text-decoration:none;color:inherit}
.mt-row.mt-hot{border-inline-start:4px solid var(--red)}
.mt-bars{display:flex;align-items:flex-end;gap:4px;height:34px;margin-top:8px}
.mt-bars i{flex:1;background:rgba(0,90,153,.22);border-radius:3px 3px 0 0;min-height:3px}
.mt-bars i.hot{background:var(--red)}

/* the mall map drawer */
body.md-open{overflow:hidden}
.md-ov{position:fixed;inset:0;z-index:45;background:var(--bg);display:flex;flex-direction:column}
.md-top{background:#0f2a47;color:#fff;display:flex;align-items:center;gap:12px;padding:10px 14px;padding-top:max(10px,env(safe-area-inset-top))}
.md-top h1{flex:1;margin:0;font-size:17px;font-weight:700}
.md-back{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.35);border-radius:9px;padding:6px 10px;display:flex;align-items:center;gap:4px;font:inherit;cursor:pointer}
.md-back svg,.md-tl svg,.md-act svg,.md-rot svg{width:18px;height:18px}
.md-save{width:auto;padding:7px 22px;margin:0}
.md-tabs{display:flex;gap:6px;padding:10px 14px 0;overflow-x:auto}
.md-tab{white-space:nowrap;padding:6px 16px;border-radius:999px;background:#fff;border:1px solid var(--line);font:inherit;font-weight:700;cursor:pointer;color:var(--ink)}
.md-tab.on{background:var(--blue);color:#fff;border-color:var(--blue)}
.md-tab.add{color:var(--blue);border-style:dashed}
.md-body{flex:1;min-height:0;display:flex;gap:12px;padding:10px 14px 14px}
.md-tools{width:104px;display:flex;flex-direction:column;gap:8px;flex:none}
.md-tl{background:#fff;border:1px solid var(--line);border-radius:12px;padding:9px 4px;display:flex;flex-direction:column;align-items:center;gap:3px;font:inherit;font-size:13px;font-weight:700;color:var(--ink);cursor:pointer}
.md-tl svg{width:22px;height:22px;color:var(--blue)}
.md-tl:disabled{opacity:.4}
.md-stage{flex:1;min-width:0;position:relative;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.md-scroll{position:absolute;inset:0;overflow:auto}
.md-cv{position:relative;background-color:#fff;background-image:linear-gradient(#eef2f6 1px,transparent 1px),linear-gradient(90deg,#eef2f6 1px,transparent 1px);touch-action:pan-x pan-y}
.md-plan{position:absolute;left:0;top:0;width:100%;height:auto;pointer-events:none;user-select:none}
.md-it{position:absolute;border:2px solid #9aa3ad;background:rgba(240,242,245,.92);border-radius:7px;padding:4px 7px;overflow:hidden;cursor:grab;touch-action:none;user-select:none;line-height:1.25;color:var(--ink)}
.md-it small{display:block;font-size:11px;color:var(--ink2);font-weight:700;direction:ltr;text-align:start}
.md-it b{font-size:12.5px;font-weight:700;display:block;overflow:hidden;text-overflow:ellipsis}
.md-shop.has{border-color:#69B845;background:rgba(237,247,232,.92)}
.md-kiosk{border-radius:50%;border-color:var(--blue);background:rgba(230,240,248,.95);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:2px}
.md-kiosk small{text-align:center;font-size:10px}.md-kiosk b{font-size:10px}
.md-walk{border:1.5px dashed #b9c3cf;background:rgba(250,251,252,.85);display:flex;align-items:center;justify-content:center;color:var(--ink2);font-size:13px}
.md-it.on{outline:2px solid var(--orange);outline-offset:2px;z-index:3}
.md-h{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;background:#fff;border:2px solid var(--orange);border-radius:3px;z-index:4;touch-action:none}
.md-h-n,.md-h-s{cursor:ns-resize}.md-h-e,.md-h-w{cursor:ew-resize}.md-h-ne,.md-h-sw{cursor:nesw-resize}.md-h-nw,.md-h-se{cursor:nwse-resize}
.md-rot{position:absolute;width:28px;height:28px;margin:-14px 0 0 -14px;border-radius:50%;border:0;background:var(--orange);color:#fff;display:flex;align-items:center;justify-content:center;z-index:4;cursor:pointer;padding:0}
.md-rot svg{width:15px;height:15px}
.md-guide{position:absolute;left:0;right:0;border-top:2px solid var(--orange);z-index:2;pointer-events:none}
.md-guide.v{top:0;bottom:0;right:auto;border-top:0;border-left:2px solid var(--orange)}
.md-zoom{position:absolute;left:10px;bottom:10px;display:flex;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;z-index:5;direction:ltr}
.md-zoom button{border:0;background:#fff;padding:5px 12px;font:inherit;font-weight:700;cursor:pointer;border-left:1px solid var(--line);color:var(--ink)}
.md-zoom button:first-child{border-left:0}
.md-side{width:260px;flex:none;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;overflow:auto}
.md-side h3{margin:0 0 10px;font-size:16px}
.md-two{display:flex;gap:8px}.md-two .f{flex:1;min-width:0}
.md-act{display:flex;gap:6px;margin-top:4px}
.md-act .btn{flex:1;margin:0;padding:8px 4px;display:flex;align-items:center;justify-content:center;gap:4px;font-size:13px}
.md-del{color:#d33!important;border-color:#f3c4c4!important}
@media (max-width:759px){
  .md-body{flex-direction:column;padding:8px 10px 0;gap:8px}
  .md-tools{width:auto;flex-direction:row}
  .md-tl{flex:1;min-width:0;font-size:12px;padding:7px 2px}
  .md-stage{flex:1;min-height:240px}
  .md-side{width:auto;margin:0 -10px;border-radius:18px 18px 0 0;border:0;box-shadow:0 -6px 20px rgba(0,0,0,.12);padding:12px 14px max(14px,env(safe-area-inset-bottom));max-height:46vh}
  .md-side[hidden]{display:none}
}
/* the drawn map on the map screen */
.mm-cvw{position:relative;width:100%;overflow:hidden;border-radius:10px;background:#fff}
.mm-cvw .md-plan{opacity:.3}
.mm-cvw .mm-shop,.mm-cvw .mm-walk2,.mm-cvw .mm-kio{position:absolute;min-height:0}
.mm-cvw .mm-shop{padding:3px 5px}
.mm-walk2{border:1px dashed #c4ccd6;border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--ink2);font-size:11px;background:rgba(250,251,252,.85)}
.mm-cvw .mm-kio{border-radius:50%;align-items:center;justify-content:center;text-align:center}
.mm-cvw .mm-shop small{font-size:9.5px}.mm-cvw .mm-shop b{font-size:10.5px}
@media (min-width:900px){.mm-cvw .mm-shop small{font-size:11px}.mm-cvw .mm-shop b{font-size:12.5px}}

/* the sales home (1/12): today's tasks first */
.rh-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:2px 0 10px}
.rh-top b{display:block;font-size:17px}.rh-top small{color:var(--ink2);font-size:12.5px}
.rh-top .seg{margin:0}
.rh-k{margin-bottom:6px}
.rh-n{background:var(--orange-l);color:#b84300;border-radius:999px;padding:0 9px;font-size:12px;font-weight:700}
.hm-h a{color:#0f5c4d;font-size:12.5px;font-weight:700;text-decoration:none}
.rh-list{padding:2px 12px}
.rh-it{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);color:var(--ink);text-decoration:none}
.rh-it:last-child{border-bottom:0}
.rh-it .grow{min-width:0}.rh-it b{display:block;font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rh-it small{display:block;color:var(--ink2);font-size:12px}
.rh-ic{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:none}
.rh-ic svg{width:19px;height:19px}
.rh-r{background:var(--red-l);color:var(--red)}.rh-g{background:var(--green-l);color:#3d7a22}.rh-b{background:var(--blue-l);color:var(--blue)}.rh-o{background:var(--orange-l);color:var(--orange)}
span.rh-b{background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:9px;padding:5px 11px;font-size:12.5px;font-weight:700;flex:none}
.rh-sc{background:var(--line);color:var(--ink2);border-radius:999px;padding:2px 9px;font-weight:700;font-size:12.5px;flex:none}
.rh-sc.hi{background:var(--green-l);color:#3d7a22}
.rh-none{display:flex;align-items:center;gap:8px;color:#3d7a22;font-weight:700}
.rh-none svg{width:18px;height:18px}

/* the client page (1/12) */
.ld-top{padding:12px}
.ld-row{display:flex;align-items:flex-start;gap:8px}
.ld-name{font-size:18px;display:block}
.ld-meta{display:block;color:var(--ink2);font-size:12.5px;margin-top:2px}
.ld-steps{display:flex;gap:3px;margin:10px 0 3px}
.ld-steps span{flex:1;height:6px;border-radius:3px;background:var(--line)}
.ld-steps span.d{background:#0f5c4d}.ld-steps span.c{background:var(--orange)}
.ld-stl{display:flex;justify-content:space-between;font-size:11px;color:var(--ink2)}
.ld-stl b{color:var(--orange)}
.ld-next{background:var(--orange-l);border:1px solid #ffd2b3;border-radius:14px;padding:12px;margin:10px 0}
.ld-next small{display:block;color:#b84300;font-weight:700;font-size:12px}
.ld-next b{display:block;font-size:15px;margin:2px 0 8px}
.ld-nb{display:flex;gap:8px}.ld-nb .btn{margin:0}.ld-nb .btn.o{flex:2}.ld-nb .btn.ghost{flex:1;background:#fff}
.ld-qa{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:10px 0}
.ld-qa a{background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px 2px;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:12.5px;font-weight:700;color:var(--ink);text-decoration:none}
.ld-qa svg{width:20px;height:20px}
.ld-qa .q-g{color:#3d7a22}.ld-qa .q-w{color:#1f8f4e}.ld-qa .q-b{color:var(--blue)}
.ld-tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);margin:4px 0 10px;overflow-x:auto}
.ld-tabs button{background:none;border:0;border-bottom:2px solid transparent;padding:7px 10px;font:inherit;font-weight:700;color:var(--ink2);white-space:nowrap;cursor:pointer}
.ld-tabs button.on{color:#0f5c4d;border-bottom-color:#0f5c4d}
.ld-tl{position:relative;padding-inline-start:20px}
.ld-tl:before{content:'';position:absolute;inset-inline-start:6px;top:6px;bottom:6px;width:2px;background:var(--line)}
.ld-ev{position:relative;margin-bottom:12px}
.ld-ev:before{content:'';position:absolute;inset-inline-start:-19px;top:5px;width:10px;height:10px;border-radius:50%;background:#fff;border:2px solid #0f5c4d}
.ld-ev.task:before{border-color:var(--orange)}
.ld-h{display:flex;justify-content:space-between;gap:8px}.ld-h b{font-size:13.5px}.ld-h small{color:var(--ink2);font-size:12px;white-space:nowrap}
.ld-ev>small{display:block;color:var(--ink2);font-size:12px;margin-top:1px}
.chip-s{background:var(--orange-l);color:#b84300;border-radius:999px;padding:1px 9px;font-size:11.5px;font-weight:700;white-space:nowrap}
.chip-s.red{background:var(--red-l);color:var(--red)}

/* the deal page (1/12) */
.dl-act{padding:10px 12px}
.dl-pay{padding:12px}
.dl-ph{display:flex;justify-content:space-between;align-items:center}.dl-ph small{color:var(--ink2)}
.dl-bar{height:8px;border-radius:4px;background:var(--line);overflow:hidden;margin:8px 0}
.dl-bar i{display:block;height:100%;background:var(--green)}
.dl-kv{display:flex;justify-content:space-between;gap:8px;font-size:13.5px;padding:3px 0}
.dl-kv span{color:var(--ink2)}
.dl-all{display:block;text-align:center;margin-top:8px;color:#0f5c4d;font-weight:700;text-decoration:none;font-size:13px}
.dl-sec{background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:8px}
.dl-sec>summary{list-style:none;display:flex;align-items:center;gap:8px;padding:11px 12px;cursor:pointer}
.dl-sec>summary::-webkit-details-marker{display:none}
.dl-sec>summary b{font-size:14.5px}.dl-sec>summary small{margin-inline-start:auto;color:var(--ink2);font-size:12px;text-align:end}
.dl-ck{width:22px;height:22px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;background:var(--line);color:var(--ink2);font-weight:700;font-size:13px}
.dl-ck svg{width:14px;height:14px}
.dl-sec.done .dl-ck{background:#0f5c4d;color:#fff}
.dl-sec.warn{border-color:#ffd2b3}.dl-sec.warn .dl-ck{background:var(--orange);color:#fff}.dl-sec.warn>summary small{color:#b84300}
.dl-sec.lock{opacity:.6}
.dl-body{padding:0 12px 12px}
.dl-body>.card{box-shadow:none;border:0;padding:0;margin:0}
/* the sales screens on a laptop (1/12): the text takes the row, the button sits at its end */
.rh-it .grow,.ld-row .grow{flex:1;min-width:0}
.rh-list,.ld-top,.dl-pay,.dl-act{min-height:0!important;height:auto!important}
.ld-nb .btn{flex:1}.ld-nb .btn.o{flex:2}
@media (min-width:900px){.rh-it{padding:12px 0}.ld-nb .btn{max-width:320px}.ld-qa{max-width:640px}}

.rh-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:4px 0 10px}
.rh-tl{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 6px;background:#fff;border:1px solid var(--line);border-radius:12px;text-decoration:none;color:var(--ink);text-align:center}
.rh-tl span{width:36px;height:36px;border-radius:10px;background:#eaf2f9;color:var(--blue);display:grid;place-items:center}
.rh-tl span svg{width:20px;height:20px}
.rh-tl b{font-size:12.5px;font-weight:600;line-height:1.3}
@media (min-width:900px){.rh-tools{grid-template-columns:repeat(6,1fr)}}
