@font-face{font-family:"Plex";src:url(../vendor/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2");font-weight:400;unicode-range:U+0600-06FF,U+0750-077F,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Plex";src:url(../vendor/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2");font-weight:600;unicode-range:U+0600-06FF,U+0750-077F,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Plex";src:url(../vendor/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format("woff2");font-weight:700;unicode-range:U+0600-06FF,U+0750-077F,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Plex";src:url(../vendor/fonts/ibm-plex-sans-arabic-latin-400-normal.woff2) format("woff2");font-weight:400;unicode-range:U+0000-00FF}
@font-face{font-family:"Plex";src:url(../vendor/fonts/ibm-plex-sans-arabic-latin-600-normal.woff2) format("woff2");font-weight:600;unicode-range:U+0000-00FF}
@font-face{font-family:"Kufi";src:url(../vendor/fonts/reem-kufi-arabic-700-normal.woff2) format("woff2");font-weight:700;unicode-range:U+0600-06FF,U+0750-077F,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Kufi";src:url(../vendor/fonts/reem-kufi-latin-700-normal.woff2) format("woff2");font-weight:700;unicode-range:U+0000-00FF}

:root{--bg:#121211;--bg2:#181816;--panel:#1d1c19;--panel2:#252320;--line:#34322c;--text:#ece7da;--mute:#9a9484;--road:#f2c230;--road-d:#b8901c;--sos:#e4572e;--ok:#78b383;--r:10px}
*{box-sizing:border-box;margin:0}
html{-webkit-text-size-adjust:100%}
body{background:var(--bg);color:var(--text);font:400 16px/1.65 "Plex",system-ui,sans-serif;min-height:100vh}
body.noscroll{overflow:hidden}
a{color:inherit;text-decoration:none}
h1,h2,h3{font-family:"Kufi","Plex",sans-serif;font-weight:700;line-height:1.25}
h2{font-size:1.55rem}h3{font-size:1.15rem}
button,input,select,textarea{font:inherit;color:inherit}
small,.muted{color:var(--mute)}
.note{color:var(--mute);font-size:.9rem;border-inline-start:3px solid var(--road-d);padding-inline-start:10px;margin:12px 0}
.empty{color:var(--mute);padding:28px 0;text-align:center}
.err{color:#ff8f6b;min-height:1.4em;font-size:.95rem;margin:6px 0}
[hidden]{display:none!important}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1.5px solid var(--line);background:transparent;border-radius:var(--r);padding:10px 18px;cursor:pointer;font-weight:600;transition:border-color .15s,background .15s;min-height:44px}
.btn:hover{border-color:var(--mute)}
.btn.primary{background:var(--road);border-color:var(--road);color:#171611}
.btn.primary:hover{background:#ffd24a}
.btn.sm{padding:6px 12px;min-height:36px;font-size:.9rem}
.btn.block{width:100%}
.btn:disabled{opacity:.55;cursor:default}
.btn:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--road);outline-offset:2px}

/* fields */
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
.field .lbl{font-size:.88rem;color:var(--mute);font-weight:600}
input[type=text],input:not([type]),input[type=password],select,textarea{background:var(--bg2);border:1.5px solid var(--line);border-radius:var(--r);padding:10px 12px;width:100%;min-height:46px}
textarea{resize:vertical}
input.auto{border-color:var(--road);background:#221f12}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));column-gap:14px}
.grid.one{grid-template-columns:1fr}
.row{display:flex;gap:12px;align-items:center;margin-top:10px;flex-wrap:wrap}
.check{display:flex;gap:10px;align-items:center;margin:8px 0 14px;cursor:pointer}
.check input{width:20px;height:20px;accent-color:var(--road)}
.search{margin:14px 0}

/* auth */
.auth{min-height:100vh;display:grid;grid-template-columns:1.1fr 1fr}
.auth-hero{padding:56px 6vw;display:flex;flex-direction:column;justify-content:center;gap:20px;background:var(--bg2);border-inline-end:1px solid var(--line)}
.auth-hero h1{font-size:clamp(3.4rem,9vw,6.5rem);letter-spacing:-.01em;line-height:1}
.lead{font-size:1.25rem;max-width:20em;color:#cfc9b8}
.logo{border-radius:20px;display:block}
.logo.big{width:92px;height:92px}.logo.sm{width:40px;height:40px;border-radius:10px}.logo.xs{width:34px;height:34px;border-radius:9px}
.road{display:flex;gap:14px;margin-top:20px}
.road span{height:6px;width:46px;background:var(--road);border-radius:2px;opacity:.9}
.auth-card{padding:56px 6vw;display:flex;flex-direction:column;justify-content:center;max-width:560px;width:100%}
.auth-card h2{margin-bottom:20px}
.alt{margin-top:18px;color:var(--mute)}.alt a,.alt-link{color:var(--road);font-weight:600}
.auth.reg{display:block}
.auth-card.wide{max-width:820px;margin:0 auto;padding:28px 20px 60px}
.reg-head{display:flex;align-items:center;gap:14px;margin-bottom:18px}.reg-head h2{margin:0;flex:1}
.steps{list-style:none;display:flex;gap:0;margin:6px 0 24px;border-bottom:1px solid var(--line)}
.steps li{flex:1;padding:10px 4px;color:var(--mute);font-size:.9rem;display:flex;gap:8px;align-items:center;border-bottom:3px solid transparent;margin-bottom:-1px}
.steps li b{font-family:"Kufi";font-size:1.1rem}
.steps li.on{color:var(--text);border-color:var(--road)}.steps li.past{color:var(--ok)}
.sub{margin:22px 0 10px}
.actions{display:flex;gap:12px;justify-content:space-between;margin-top:22px}
.actions .btn.primary{margin-inline-start:auto;min-width:150px}

/* upload slots */
.slots{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.slots.four{grid-template-columns:1fr 1fr}
.slot{position:relative;border:2px dashed var(--line);border-radius:var(--r);min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;background:var(--bg2);padding:34px 10px 38px;text-align:center}
.slot:hover{border-color:var(--road-d)}
.slot-label{position:absolute;top:8px;inset-inline-start:12px;font-size:.8rem;font-weight:700;color:var(--mute);z-index:2}
.slot-empty{display:flex;flex-direction:column;align-items:center;gap:2px;color:var(--mute);font-size:.9rem}
.slot-empty .plus{font:700 2rem/1 "Kufi";color:var(--road)}
.slot.has .slot-empty{display:none}
.slot-img{max-width:100%;max-height:190px;border-radius:6px;object-fit:contain}
.slot-bar{position:absolute;bottom:0;inset-inline:0;height:4px;background:transparent}
.slot-bar i{display:block;height:100%;width:0;background:var(--road);transition:width .2s}
.slot-msg{position:absolute;bottom:8px;inset-inline:10px;font-size:.78rem;color:var(--mute);line-height:1.3}
.slot.busy{border-color:var(--road)}.slot.done{border-style:solid;border-color:var(--ok)}.slot.fail{border-style:solid;border-color:var(--sos)}
.slot.has .slot-msg{background:#181816cc;padding:2px 6px;border-radius:4px}

/* shell */
.shell{padding-bottom:84px;max-width:980px;margin:0 auto}
.top{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--bg);z-index:20}
.brand{font:700 1.3rem "Kufi"}.spacer{flex:1}
.content{padding:18px 16px}
.nav{position:fixed;bottom:0;inset-inline:0;display:flex;background:var(--panel);border-top:1px solid var(--line);z-index:30;padding-bottom:env(safe-area-inset-bottom);overflow-x:auto}
.nav a{flex:1;min-width:64px;text-align:center;padding:12px 6px;font-size:.82rem;color:var(--mute);position:relative;white-space:nowrap;border-top:3px solid transparent}
.nav a.on{color:var(--road);border-top-color:var(--road)}
.badge{position:absolute;top:4px;margin-inline-start:2px;background:var(--sos);color:#fff;border-radius:99px;font-size:.7rem;min-width:18px;padding:0 5px;line-height:18px}
@media(min-width:860px){.shell{padding-bottom:0;display:flex;flex-direction:column}.top{order:0}.nav{order:1}.content{order:2;width:100%}.nav{position:sticky;top:59px;bottom:auto;border:0;border-bottom:1px solid var(--line);background:var(--bg);z-index:19}.nav a{flex:0 0 auto;padding:12px 22px;font-size:.95rem;border-top:0;border-bottom:3px solid transparent}.nav a.on{border-bottom-color:var(--road)}}
.page-head{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap;margin-bottom:14px}
.back{display:inline-block;color:var(--mute);margin:10px 0}

/* feed */
.counter{display:flex;gap:10px;align-items:baseline;margin-bottom:18px;color:var(--mute)}
.counter b{font:700 2.4rem/1 "Kufi";color:var(--text);margin-inline-start:14px}.counter b:first-child{margin:0;color:var(--road)}
.feed{display:flex;flex-direction:column;gap:16px}
.post{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px;border-inline-start:5px solid var(--sos)}
.post.resolved{border-inline-start-color:var(--ok);opacity:.78}
.post header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.who{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center}
.tag{font-size:.78rem;font-weight:700;padding:2px 10px;border-radius:4px;white-space:nowrap}
.tag.sos{background:var(--sos);color:#1a0d08}.tag.ok{background:var(--ok);color:#0d1a10}
.ptype{margin:10px 0 4px;font-size:1.35rem}
.pdesc{color:#cfc9b8}
.pimg{width:100%;max-height:340px;object-fit:cover;border-radius:10px;margin:12px 0;cursor:zoom-in;background:#000}
.pmeta{display:flex;gap:10px;flex-wrap:wrap;align-items:center;color:var(--mute);font-size:.92rem;margin:8px 0}
.post footer{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.vmark{background:var(--road);color:#171611;font-size:.72rem;font-weight:700;padding:1px 8px;border-radius:99px;margin-inline-start:6px;vertical-align:middle}
.plate{display:inline-flex;align-items:center;gap:8px;background:#e9e3cf;color:#17150f;font:700 .95rem "Plex";padding:2px 10px;border-radius:6px;border:2px solid #17150f;outline:2px solid #e9e3cf;letter-spacing:.03em;direction:rtl}
.plate i{width:5px;height:5px;border-radius:50%;background:#17150f;opacity:.55}

/* map */
.map{height:300px;border-radius:12px;border:1px solid var(--line);overflow:hidden;z-index:1;margin:10px 0}
.map.picker{height:340px}
.map-meta{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.locmsg{color:var(--mute);font-size:.9rem}
.leaflet-container{font-family:"Plex"}
.pin b{display:block;width:22px;height:22px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);border:3px solid #17150f;margin:2px}
.pin.sos b{background:var(--sos)}.pin.auto b{background:transparent;border-color:var(--road)}

/* data blocks */
.block{margin:0 0 8px}
.kvs{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:0 24px;margin:6px 0 10px}
.kv{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px dashed var(--line)}
.kv dt{color:var(--mute);font-size:.9rem}.kv dd{font-weight:600;text-align:end;word-break:break-word}
.veh-list{display:flex;flex-direction:column;gap:8px}
.veh-card{display:flex;align-items:center;gap:14px;padding:12px 14px;background:var(--panel);border:1px solid var(--line);border-radius:12px;flex-wrap:wrap}
.veh-card .btn{margin-inline-start:auto}
.docrow{display:flex;gap:12px;flex-wrap:wrap;margin:8px 0}
.docrow img{height:170px;border-radius:8px;border:1px solid var(--line);cursor:zoom-in;background:#000;max-width:100%}
figure{margin:0}figcaption{font-size:.8rem;color:var(--mute);text-align:center}
details{margin:10px 0;color:var(--mute)}pre{white-space:pre-wrap;background:var(--bg2);padding:10px;border-radius:8px;font:400 .82rem/1.5 "Plex";direction:rtl;max-height:240px;overflow:auto;margin-top:6px}
.actions-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}

/* admin */
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:6px;overflow-x:auto}
.tabs a{padding:10px 18px;color:var(--mute);border-bottom:3px solid transparent;white-space:nowrap}.tabs a.on{color:var(--text);border-color:var(--road)}
.stats{display:flex;gap:0;margin:12px 0 4px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.stats div{flex:1;padding:12px 16px;border-inline-end:1px solid var(--line);display:flex;flex-direction:column}
.stats div:last-child{border:0}.stats b{font:700 1.9rem/1.1 "Kufi"}.stats span{color:var(--mute);font-size:.85rem}.stats .warn b{color:var(--road)}
.table{display:flex;flex-direction:column}
.mrow{display:grid;grid-template-columns:2fr 1.1fr 1.6fr .8fr;gap:10px;align-items:center;padding:14px 4px;border-bottom:1px solid var(--line);text-align:start;background:none;border-inline:0;border-top:0;width:100%;cursor:pointer}
.mrow:hover{background:var(--panel)}
.mname{display:flex;flex-direction:column}.mphone{direction:ltr;text-align:end;color:var(--mute)}.mveh{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.mdate{color:var(--mute);font-size:.85rem;text-align:end}
@media(max-width:620px){.mrow{grid-template-columns:1fr 1fr}.mphone{text-align:start}}
.switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;font-weight:600}
.switch input{appearance:none;width:52px;height:28px;border-radius:99px;background:var(--panel2);border:1.5px solid var(--line);position:relative;cursor:pointer;transition:background .15s}
.switch input::after{content:"";position:absolute;top:2px;inset-inline-start:2px;width:20px;height:20px;border-radius:50%;background:var(--mute);transition:all .15s}
.switch input:checked{background:var(--road);border-color:var(--road)}
.switch input:checked::after{inset-inline-start:26px;background:#171611}

/* chat */
.chat,.pane{display:flex;flex-direction:column}
.msgs{display:flex;flex-direction:column;gap:8px;min-height:280px;max-height:58vh;overflow:auto;padding:10px 0}
.msg{max-width:78%;padding:9px 13px;border-radius:14px;background:var(--panel2)}
.msg.me{align-self:flex-start;background:var(--road);color:#171611;border-end-start-radius:4px}
.msg.them{align-self:flex-end;border-end-end-radius:4px}
.msg small{display:block;font-size:.7rem;opacity:.65}
.composer{display:flex;gap:8px;margin-top:8px}
.split{display:grid;grid-template-columns:260px 1fr;gap:16px;margin-top:14px}
.threads{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;overflow:auto;max-height:70vh}
.threads a{padding:12px;border-bottom:1px solid var(--line);display:flex;flex-direction:column}.threads a.on{background:var(--panel2)}.threads a.unread b::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--sos);margin-inline-end:6px}
.pane-head{padding:6px 0;font-weight:700;color:var(--road)}
@media(max-width:700px){.split{grid-template-columns:1fr}.split.open .threads{display:none}}

/* notifications, links */
.notifs{list-style:none;display:flex;flex-direction:column}
.notifs li{padding:14px 12px;border-bottom:1px solid var(--line);cursor:pointer}.notifs li.new{border-inline-start:4px solid var(--road);background:var(--panel)}
.notifs p{color:#cfc9b8}
.linkrows{display:flex;flex-direction:column;gap:8px}
.linkrow{display:flex;align-items:center;gap:14px;padding:14px 16px;background:var(--panel);border:1px solid var(--line);border-radius:12px;width:100%;text-align:start;cursor:pointer}
.linkrow:hover{border-color:var(--road-d)}
.linkrow span{flex:1;display:flex;flex-direction:column}.linkrow small{font-weight:400}
.linkrow i{font-style:normal;color:var(--road);font-weight:700;font-size:.9rem}
.linkrow img{width:48px;height:48px;border-radius:50%;object-fit:cover}
.linkrow.big{padding:20px;border-color:var(--road-d);font:700 1.1rem "Kufi";margin-bottom:8px}
.dev-photos{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.dev-photos img{width:100%;border-radius:10px;cursor:zoom-in}

/* modal + toast */
.overlay{position:fixed;inset:0;background:#000b;z-index:100;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--bg);border:1px solid var(--line);border-radius:18px 18px 0 0;width:100%;max-width:520px;max-height:92vh;display:flex;flex-direction:column}
.sheet.wide{max-width:820px}
.sheet header{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid var(--line)}
.sheet .x{background:none;border:0;font-size:1.8rem;cursor:pointer;line-height:1;color:var(--mute)}
.sheet-body{padding:16px 18px 22px;overflow:auto}
.lb-img{width:100%;border-radius:8px}
@media(min-width:700px){.overlay{align-items:center}.sheet{border-radius:18px}}
#toasts{position:fixed;top:12px;inset-inline:12px;z-index:200;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.toast{background:var(--panel2);border:1px solid var(--line);border-inline-start:4px solid var(--road);padding:10px 16px;border-radius:10px;max-width:480px;box-shadow:0 8px 30px #0008;transition:opacity .4s}
.toast.sos{border-inline-start-color:var(--sos)}.toast.err{border-inline-start-color:var(--sos)}.toast.out{opacity:0}

@media(max-width:820px){.auth{grid-template-columns:1fr}.auth-hero{padding:34px 22px 26px;border:0;border-bottom:1px solid var(--line)}.auth-hero h1{font-size:3.6rem}.auth-card{padding:28px 22px 50px;max-width:none}.logo.big{width:64px;height:64px}}
@media(max-width:520px){.slots{grid-template-columns:1fr}}
