*{box-sizing:border-box}:root{--bg:#07111f;--surface:#0d1728ee;--line:#263247;--text:#f8fafc;--muted:#a8b6c9;--blue:#0b63ce}html,body{margin:0;min-height:100%;font-family:Arial,"Noto Sans Arabic",sans-serif;color:var(--text);background:var(--bg)}body{background:linear-gradient(#07111dcc,#07111ff5),url("./assets/nature.jpg") center/cover fixed}.ticker{height:36px;overflow:hidden;background:#030b14;border-bottom:1px solid #263247;white-space:nowrap}.ticker-track{display:flex;gap:28px;align-items:center;height:100%;width:max-content;animation:ticker 34s linear infinite}.ticker a,.ticker span{font-size:13px;text-decoration:none;color:#e2e8f0}.ticker span{color:#fbbf24}@keyframes ticker{from{transform:translateX(0)}to{transform:translateX(50%)}}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background:#0d1728ee;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:1000;backdrop-filter:blur(10px)}.brand{display:flex;gap:10px;align-items:center}.brand b{display:block;font-size:20px}.brand small{color:var(--muted)}.flag-waving{display:inline-block;font-size:30px;animation:flag 2.4s ease-in-out infinite}@keyframes flag{0%,100%{transform:rotate(0) skewY(0)}50%{transform:rotate(-2deg) skewY(-5deg)}}.small{font-size:22px}.auth-tools{display:flex;gap:8px;align-items:center}.auth-tools span{color:var(--muted)}main{max-width:1350px;margin:auto;padding:18px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:0 14px 40px #0006;backdrop-filter:blur(7px)}.login-panel{max-width:540px;margin:60px auto}.login-mark{font-size:45px}.login-panel input{width:100%;display:block;background:#07111f;color:#fff;border:1px solid #334155;border-radius:10px;padding:13px;margin:10px 0}.row,.hero-actions,.phone-row{display:flex;gap:9px;flex-wrap:wrap}button{border:1px solid #334155;background:#172033;color:#fff;border-radius:10px;padding:10px 14px;cursor:pointer}button:hover{filter:brightness(1.1)}button.active{outline:2px solid #38bdf8}.primary{background:var(--blue)}.danger{background:#b91c1c;border-color:#ef4444}.big{font-weight:800;padding:14px 18px}.glass{background:#0b1628c9;backdrop-filter:blur(8px)}a{color:inherit}.hero{min-height:410px;border-radius:22px;overflow:hidden;background:linear-gradient(90deg,#06101dcc,#06101d45),url("./assets/maqam-echahid.jpg") center/cover;display:flex;align-items:flex-end;box-shadow:0 22px 65px #0008;margin-bottom:16px}.hero-overlay{padding:34px}.hero h1{font-size:54px;margin:8px 0}.hero p{font-size:21px;color:#e2e8f0}.tabs{display:flex;gap:8px;overflow:auto;padding:8px 0 14px}.tabs button{flex:0 0 auto}.tabs button.active{background:var(--blue)}.section-title,.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.eyebrow{color:#60a5fa;font-size:12px}.feature-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.feature-card{min-height:145px;text-align:right;background:linear-gradient(145deg,#10213a,#0a1424);border:1px solid var(--line);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:8px}.feature-card span{font-size:31px}.feature-card b{font-size:18px}.feature-card small{color:var(--muted)}.notice{margin-top:14px}.institution-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.institution-card{overflow:hidden;border:1px solid var(--line);border-radius:18px;background:#0d1728ee}.institution-card>img{width:100%;height:230px;object-fit:contain;background:#f7fafc}.inst-body{padding:16px}.inst-body h3{display:flex;align-items:center;gap:7px}.phone-row a{background:#0a1424;border:1px solid var(--line);border-radius:9px;padding:8px 10px;text-decoration:none}.map-search{width:100%;margin:12px 0 6px}.official{display:block;text-align:center;color:#93c5fd;text-decoration:none;padding:8px}.guide-grid,.hazard-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.guide-grid article,.hazard-grid article{background:#0a1424;border:1px solid var(--line);border-radius:14px;padding:15px}.guide-grid p,.hazard-grid p{line-height:1.75;color:#cbd5e1}.medical-note{color:#fbbf24}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}.stats div{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:15px}.stats b{display:block;font-size:28px}.stats span{color:var(--muted)}.map-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}.map-toolbar>span{color:var(--muted);font-size:12px}.grid{display:grid;grid-template-columns:1.5fr 1fr;gap:14px}.map-panel{min-height:560px}#map{height:500px;border-radius:12px;overflow:hidden}.feed{display:grid;gap:10px}.item{border:1px solid var(--line);border-radius:12px;padding:13px;background:#0a1424}.item strong{display:block}.meta{color:var(--muted);font-size:13px;margin-top:5px}.pill{display:inline-block;border-radius:99px;padding:3px 8px;font-size:11px}.critical{background:#7f1d1d}.high{background:#9a3412}.medium{background:#854d0e}.low{background:#166534}.live{color:#4ade80;font-size:12px}.truck-pin{font-size:34px;text-align:center;filter:drop-shadow(0 3px 4px #000)}textarea{width:100%;background:#07111f;color:#fff;border:1px solid #334155;border-radius:10px;padding:12px;margin:8px 0}.ai-output{white-space:pre-wrap;background:#07111f;border:1px solid var(--line);border-radius:10px;padding:14px;min-height:120px}.msg{color:#fbbf24;min-height:22px}footer{text-align:center;color:#8fa1b6;padding:30px 15px;font-size:12px}footer a{color:#93c5fd}@media(max-width:1000px){.feature-grid{grid-template-columns:repeat(2,1fr)}.institution-grid{grid-template-columns:1fr}.guide-grid,.hazard-grid{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:1fr}}@media(max-width:650px){main{padding:10px}.topbar{padding:0 10px}.brand small{display:none}.hero{min-height:430px}.hero-overlay{padding:22px}.hero h1{font-size:40px}.hero p{font-size:18px}.feature-grid,.guide-grid,.hazard-grid{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}#map{height:420px}}
.embeddedMap{margin-top:12px}.embeddedMap iframe{width:100%;height:280px;border:0;border-radius:12px}.area-label{background:#0b1728;color:#fff;border:1px solid #38bdf8;border-radius:8px;padding:3px 6px;font-weight:700;white-space:nowrap}.grid.two{grid-template-columns:repeat(2,1fr)}select,input[type=number]{width:100%;background:#07111f;color:#fff;border:1px solid #334155;border-radius:10px;padding:12px;margin-top:6px}@media(max-width:650px){.grid.two{grid-template-columns:1fr}}
.unit-pin{font-size:25px;text-align:center;filter:drop-shadow(0 2px 3px #000)}.official-map iframe{height:600px}.official-map{margin-top:12px}
.official-units-map{height:560px;margin-top:14px;border-radius:14px;overflow:hidden;border:1px solid var(--line)}
.map-result-mini{min-height:40px;margin:8px 0}.internal-map-note{padding:10px;border:1px solid var(--line);border-radius:10px;background:#0a1424;color:#cbd5e1}

.pricing-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:18px}.price-card{background:#0a1424;border:1px solid var(--line);border-radius:16px;padding:18px}.price-card h3{margin-top:0}.price-card>b{display:block;font-size:22px;color:#93c5fd;margin:12px 0}.price-card p{color:#cbd5e1;line-height:1.7}.subscribeBtn{width:100%;background:#0b63ce}.institution-card .primary{width:100%;margin:6px 0}.tab .panel{margin-bottom:14px}@media(max-width:800px){.pricing-grid{grid-template-columns:1fr}}

.news-item{padding:14px;border:1px solid rgba(255,255,255,.12);border-radius:14px;margin-bottom:10px;background:rgba(0,0,0,.14)}.news-item h3{margin:.35rem 0}.news-item p{margin:.3rem 0;line-height:1.65}.news-item a{font-weight:700}.chat-box{height:420px;overflow:auto;padding:12px;border-radius:16px;background:rgba(0,0,0,.18);margin-bottom:12px}.chat-msg{white-space:pre-wrap;padding:10px 13px;border-radius:14px;margin:8px 0;max-width:88%;line-height:1.6}.chat-msg.user{margin-right:auto;background:rgba(0,120,255,.18)}.chat-msg.bot{margin-left:auto;background:rgba(0,170,120,.16)}

/* YAKADHA DZ — fixed professional operational identity */
:root{--accent:#0B3D91;--accent-2:#06285f;--surface:#ffffff;--text:#132238;--muted:#607089;--topbar:#ffffff;--border:rgba(19,34,56,.12)}
body{color:var(--text)}
button.primary,.primary{background:var(--accent)!important;border-color:var(--accent)!important}
.app-topbar{position:sticky;top:0;z-index:1200;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:var(--topbar);border-bottom:1px solid var(--border);box-shadow:0 3px 14px rgba(0,0,0,.06)}
.dz-flag-top{width:58px;height:38px;flex:0 0 auto;overflow:hidden;border-radius:4px;position:relative;filter:drop-shadow(0 3px 5px rgba(0,0,0,.18));perspective:180px}.dz-flag-top img{display:block;width:100%;height:100%;object-fit:cover;transform-origin:left center;animation:dzFlagWave 2.7s ease-in-out infinite;will-change:transform,filter}.dz-flag-top::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,rgba(255,255,255,.08),transparent 32%,rgba(0,0,0,.10) 62%,transparent 82%);mix-blend-mode:soft-light;pointer-events:none}@keyframes dzFlagWave{0%,100%{transform:perspective(180px) rotateY(0deg) skewY(0deg);filter:brightness(1)}25%{transform:perspective(180px) rotateY(-7deg) skewY(1deg);filter:brightness(1.02)}50%{transform:perspective(180px) rotateY(-13deg) skewY(-2deg);filter:brightness(.98)}75%{transform:perspective(180px) rotateY(-6deg) skewY(1deg);filter:brightness(1.02)}}@media(prefers-reduced-motion:reduce){.dz-flag-top img{animation:none}}
.brand-mini{display:flex;align-items:center;gap:10px;min-width:0}.brand-mini strong{display:block;font-size:1rem}.brand-mini small{display:block;color:var(--muted);font-size:.75rem;margin-top:2px}.role-logo{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;overflow:hidden;border:2px solid var(--accent);background:linear-gradient(135deg,#fff,#e8eef8);font-size:24px;flex:0 0 auto}.role-logo.image-logo img{width:100%;height:100%;object-fit:contain;background:#fff}.platform-logo img{padding:3px}.top-controls{display:flex;align-items:center;gap:8px}
.install-btn{width:38px;height:38px;padding:0;display:grid;place-items:center;font-size:17px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);cursor:pointer}.install-btn:hover{border-color:var(--accent);transform:translateY(-1px)}
.institution-detail-page{max-width:1100px;margin:auto}.institution-detail-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px;border-radius:20px;margin-bottom:16px;background:linear-gradient(135deg,var(--accent-2),var(--accent));color:#fff}.institution-detail-head h2,.institution-detail-head p{color:#fff}.institution-logo-large{width:125px;height:125px;object-fit:contain;border-radius:50%;background:#fff;padding:8px;box-shadow:0 8px 30px rgba(0,0,0,.2)}.unit-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin-top:16px}.unit-detail-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:14px;text-align:center}.unit-detail-card img{width:68px;height:68px;object-fit:contain}.institution-scope-note{margin-top:14px;padding:12px;border-radius:12px;background:rgba(31,111,235,.08);border-right:4px solid var(--accent)}
@media(max-width:650px){.app-topbar{padding:8px 10px}.theme-btn span{display:none}.language-picker{padding:0 7px}.institution-detail-head{padding:16px}.institution-logo-large{width:92px;height:92px}.theme-options{grid-template-columns:1fr}.brand-mini small{max-width:130px}}
.institution-entry{border-color:var(--accent);background:rgba(31,111,235,.08)}
.admin-entry{max-width:1200px;margin:10px auto 0;padding:0 16px}.admin-entry-btn{width:100%;background:linear-gradient(135deg,var(--accent-2),var(--accent));color:#fff;border:0;font-weight:800;padding:12px;border-radius:14px}.institution-register-dialog{max-height:90vh;overflow:auto}.institution-register-dialog label{display:block;margin:10px 0}.institution-register-dialog input,.institution-register-dialog select{box-sizing:border-box}.scope-hidden{display:none!important}.role-scope-banner{margin:12px 0;padding:12px 15px;border-radius:14px;background:linear-gradient(90deg,rgba(31,111,235,.12),rgba(16,185,129,.08));border:1px solid var(--border);font-weight:700}.request-card{display:grid;gap:7px}.request-actions{display:flex;gap:8px;flex-wrap:wrap}.request-actions button{flex:1;min-width:130px}.approved{color:#16a34a;font-weight:800}.pending{color:#d97706;font-weight:800}.rejected{color:#dc2626;font-weight:800}

.login-secondary-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:10px;font-size:.85rem}.link-button{background:transparent!important;border:0!important;color:var(--accent,#4da3ff);padding:4px 0;cursor:pointer}.login-hint{opacity:.65}.login-panel .msg{min-height:2.4em;white-space:normal;overflow-wrap:anywhere}

/* Operational resource placement + incoming SOS */
.resource-add-panel{margin-bottom:12px;border:1px solid var(--accent);box-shadow:0 8px 28px rgba(11,61,145,.10)}
.sos-operational-card{border-right:4px solid #dc2626;background:rgba(220,38,38,.05)}
#incomingSosAlert{position:fixed;top:76px;right:18px;z-index:5000;width:min(390px,calc(100vw - 36px))}
.incoming-sos-card{background:#fff;color:#132238;border:2px solid #dc2626;border-radius:16px;padding:16px;box-shadow:0 16px 50px rgba(0,0,0,.28)}
.incoming-title{font-weight:900;font-size:18px;margin-bottom:8px}.sos-alert-flash .incoming-sos-card{animation:sosPulse .65s infinite alternate}
@keyframes sosPulse{from{box-shadow:0 0 0 0 rgba(220,38,38,.15),0 16px 50px rgba(0,0,0,.28)}to{box-shadow:0 0 0 9px rgba(220,38,38,.35),0 16px 50px rgba(0,0,0,.28)}}
#opsActionMsg{margin:8px 0}.map-toolbar button{white-space:nowrap}

.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(15px);opacity:0;pointer-events:none;z-index:6000;background:#0B3D91;color:#fff;border:1px solid rgba(255,255,255,.25);padding:11px 16px;border-radius:12px;box-shadow:0 12px 35px rgba(0,0,0,.3);transition:.2s ease;font-weight:700}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* =========================================================
   YAKADHA DZ — accessibility / contrast / active-control hardening
   ========================================================= */
button,select,input,textarea{font:inherit}
button{min-height:42px;font-weight:700;transition:transform .15s ease,filter .15s ease,box-shadow .15s ease,border-color .15s ease}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #38bdf8;outline-offset:2px}
button:disabled{opacity:.55;cursor:not-allowed;filter:none}
.tabs button{background:#13233a;color:#f8fafc;border-color:#38506f;box-shadow:0 2px 8px rgba(0,0,0,.12)}
.tabs button.active{background:var(--accent);color:#fff;border-color:#4d8de8;box-shadow:0 5px 16px rgba(11,61,145,.3)}
.feature-card,.guide-grid article,.hazard-grid article,.item,.price-card,.news-item,.chat-box{color:#f8fafc}
.feature-card b,.feature-card small,.guide-grid article b,.guide-grid article p,.hazard-grid article b,.hazard-grid article p,.item strong,.item div,.price-card h3,.price-card p,.news-item h3,.news-item p{color:#f8fafc}
.feature-card small,.guide-grid article p,.hazard-grid article p,.price-card p,.meta,.map-toolbar>span{color:#cbd5e1}
.panel>h1,.panel>h2,.panel>h3,.section-title h2,.section-head h2,.section-head h3{color:var(--text)}
.panel p{color:#334155}
.institution-card .inst-body p{color:#334155;line-height:1.7}
.institution-card .inst-body h3{color:#132238}
.institution-card .official{color:#0b4f9c;font-weight:800}
.phone-row a{color:#eaf2ff!important}
.notice{color:#132238;background:#f1f6fc;border:1px solid #c9d8ea;border-radius:12px;padding:12px}
.msg{color:#8a4b00;background:#fff7df;border-radius:10px;padding:8px 10px}
.role-scope-banner{color:#16314f;background:#eef5ff}
.map-toolbar.panel{background:#fff;color:#132238}
.map-toolbar.panel button{color:#f8fafc;background:#172033;border-color:#38506f}
.map-toolbar.panel button.primary{background:var(--accent)!important;color:#fff}
.map-toolbar.panel button.active{background:#0e7490;color:#fff;border-color:#22d3ee}
.map-toolbar.panel>span{color:#425466}
.ai-output{color:#f8fafc}
.chat-msg.user{color:#eaf4ff}.chat-msg.bot{color:#eafff7}
.official-map .panel p,.institution-scope-note{color:#334155}
.institution-detail-head .eyebrow{color:#dbeafe}
.critical,.high,.medium,.low{color:#fff!important;font-weight:800}
.pill{border:1px solid rgba(255,255,255,.2)}
.install-btn{background:#fff;color:#132238}
#backendStatus{font-weight:700}
.unit-pin{line-height:30px}
.area-label{font-size:12px;box-shadow:0 4px 12px rgba(0,0,0,.22)}
@media(max-width:650px){button{min-height:44px}.hero-actions button{width:100%}.tabs{padding-bottom:10px}.map-toolbar.panel{align-items:stretch}.map-toolbar.panel button{flex:1 1 auto}.panel{padding:14px}}
.coordination-panel{margin-bottom:14px}.coord-note{margin:0 0 10px;color:#425466!important}.coord-feed{max-height:280px;overflow:auto;display:grid;gap:8px;padding:8px;background:#0a1424;border:1px solid #263247;border-radius:12px}.coord-msg{padding:10px 12px;border-radius:10px;background:#13233a;border:1px solid #38506f;color:#f8fafc;line-height:1.6}.coord-msg b{color:#fff}.coord-inst{font-size:11px;color:#93c5fd;margin-inline-start:6px}.coord-compose{display:flex;gap:8px;align-items:stretch;margin-top:10px}.coord-compose textarea{flex:1;margin:0}.coord-compose button{white-space:nowrap}@media(max-width:650px){.coord-compose{flex-direction:column}.coord-compose button{width:100%}}

/* YAKADHA DZ — final citizen/health/institution UX */
.citizen-grid{display:grid;grid-template-columns:1fr 1.15fr;gap:16px}.citizen-hero{background:linear-gradient(135deg,#06285f,#0B3D91);color:#fff}.citizen-hero h3,.citizen-hero p{color:#fff}.compact-guides{margin-top:12px}.firstaid-rich article{min-height:145px}.firstaid-rich article b{font-size:1.05rem}.medical-note{margin-top:16px;padding:14px;border-radius:14px;background:#fff7df;border:1px solid #e9d39a;color:#5b4300!important;font-weight:600}.institution-info-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:16px;margin-bottom:16px}.info-list{margin:0;padding-right:20px;line-height:2}.emergency-links{display:grid;gap:9px;margin:12px 0}.emergency-links a{display:block;padding:11px;border-radius:11px;background:#eef5ff;color:#0b4f9c;font-weight:800}.big-official{display:block;margin-top:12px}.health-map{height:430px;border-radius:14px;overflow:hidden}.health-list{display:grid;gap:10px}.health-card{border:1px solid var(--border);border-radius:14px;padding:13px;background:#fff}.health-card-head{display:flex;gap:10px;align-items:center}.health-symbol{font-size:30px}.health-card h4{margin:0;color:#132238}.health-card p{color:#475569!important;line-height:1.65}.phone-btn,.health-focus{display:inline-flex;align-items:center;justify-content:center;padding:9px 12px;border-radius:10px;background:#eef5ff;color:#0b4f9c;font-weight:800;text-decoration:none;border:1px solid #cbdcf1}.health-pin{font-size:29px;text-align:center;filter:drop-shadow(0 3px 5px rgba(0,0,0,.28))}.civil-unit-marker{border-radius:50%;box-shadow:0 3px 10px rgba(0,0,0,.3);background:#fff}.resource-select-pin{font-size:28px;text-align:center}.sos-target-pin{font-size:30px;text-align:center;filter:drop-shadow(0 4px 7px rgba(0,0,0,.35))}.sos-dispatch-meta{margin:8px 0;padding:9px;border-radius:10px;background:#eef5ff;color:#183b61}.unit-detail-card button{margin-top:8px}.unit-detail-card img{border-radius:50%;background:#fff}.map-toolbar.panel>span{display:block;width:100%}@media(max-width:800px){.citizen-grid,.institution-info-grid{grid-template-columns:1fr}.health-map{height:360px}.firstaid-rich article{min-height:0}}

/* ===== FINAL OPERATIONS UX ===== */
.device-mode-btn{white-space:nowrap;font-weight:800}.resource-board{margin:12px 0}.resource-palette{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:9px;margin-top:10px}.resource-drag-card{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:13px;background:#0a1424;cursor:grab;user-select:none}.resource-drag-card:active{cursor:grabbing}.resource-drag-icon{font-size:30px;line-height:1}.resource-drag-card b{display:block}.resource-drag-card small{display:block;color:#cbd5e1;margin-top:3px}.drag-hint{margin-inline-start:auto;color:#93c5fd;font-size:12px}.map-drop-ready{outline:4px dashed #22d3ee;outline-offset:-6px}.resource-type-pin{display:flex;align-items:center;justify-content:center;font-size:32px;filter:drop-shadow(0 4px 5px rgba(0,0,0,.4));background:rgba(255,255,255,.9);border-radius:50%;border:2px solid #fff}.resource-type-pin span{line-height:1}.sos-command-summary{background:#eef7ff;color:#102a43;border:1px solid #b7d5ef}.route-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:10px}.route-summary-grid>div{padding:10px;border-radius:11px;background:#fff;border:1px solid #d6e4f2}.coord-channel-row{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.coord-channel{background:#172033}.coord-channel.active{background:#0e7490;border-color:#22d3ee}.coord-medical{display:inline-block;margin-inline-start:7px;padding:2px 7px;border-radius:20px;background:#dff7ea;color:#166534;font-size:10px}.role-compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.role-compare-grid article{padding:14px;border:1px solid var(--line);border-radius:14px;background:#0a1424}.role-compare-grid h4{margin-top:0}@media(max-width:800px){.route-summary-grid,.role-compare-grid{grid-template-columns:1fr}}
body[data-device-mode="computer"] main{max-width:1500px}body[data-device-mode="computer"] #map{height:650px}body[data-device-mode="computer"] .map-panel{min-height:710px}body[data-device-mode="computer"] .resource-palette{grid-template-columns:repeat(3,1fr)}body[data-device-mode="phone"] .resource-palette{grid-template-columns:1fr 1fr}body[data-device-mode="phone"] .resource-drag-card{padding:8px}body[data-device-mode="phone"] .drag-hint{display:none}

.resource-drag-card{touch-action:none}

.modal-backdrop{position:fixed;inset:0;z-index:10000;background:rgba(2,8,23,.72);display:flex;align-items:center;justify-content:center;padding:18px}.modal-card{width:min(720px,96vw);max-height:92vh;overflow:auto;background:#fff;color:#172033;border-radius:18px;padding:18px;box-shadow:0 25px 80px rgba(0,0,0,.35)}.modal-card label{color:#172033}.health-add-map-modal .section-head{position:sticky;top:0;background:#fff;z-index:2}.health-add-map-modal .grid{margin:10px 0}.health-add-map-modal .row{margin-top:14px}

.full-span{grid-column:1/-1}.pluscode-preview{border-color:rgba(34,197,94,.4)!important}
/* YAKADHA DZ — true device editions */
.app-logo img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.admin-entry{display:flex;gap:10px;flex-wrap:wrap}
.admin-entry .admin-entry-btn{font-weight:900}
body[data-device-mode="phone"] .app-topbar{position:sticky;top:0;z-index:1100}
body[data-device-mode="phone"] .tabs{display:flex;overflow-x:auto;white-space:nowrap;scrollbar-width:none}
body[data-device-mode="phone"] .tabs::-webkit-scrollbar{display:none}
body[data-device-mode="phone"] main{padding:10px}
body[data-device-mode="computer"]{background:#e8eef7}
body[data-device-mode="computer"] .app-topbar{position:sticky;top:0;z-index:1200;min-height:66px;padding-inline:24px}
body[data-device-mode="computer"] .ticker{position:sticky;top:66px;z-index:1190}
body[data-device-mode="computer"] .topbar{position:sticky;top:96px;z-index:1180}
body[data-device-mode="computer"] #appView{min-height:calc(100vh - 120px)}
body[data-device-mode="computer"] #appView>.tabs{position:fixed;right:0;top:96px;bottom:0;width:245px;z-index:1050;display:flex;flex-direction:column;align-items:stretch;overflow-y:auto;overflow-x:hidden;padding:14px 10px 30px;background:linear-gradient(180deg,#06285f,#07111f);border-left:1px solid #29456c;box-shadow:-12px 0 35px rgba(0,0,0,.18)}
body[data-device-mode="computer"] #appView>.tabs button{width:100%;min-height:46px;text-align:right;border-radius:10px;margin:3px 0;font-size:14px}
body[data-device-mode="computer"] #appView>section.tab,
body[data-device-mode="computer"] #appView>.hero,
body[data-device-mode="computer"] #appView>.admin-entry,
body[data-device-mode="computer"] #appView>.role-scope-banner{margin-right:265px;margin-left:18px}
body[data-device-mode="computer"] #appView>.hero{border-radius:0 0 22px 22px;min-height:470px}
body[data-device-mode="computer"] #appView>section.tab{max-width:none}
body[data-device-mode="computer"] .grid{grid-template-columns:minmax(0,1.7fr) minmax(320px,.8fr)}
body[data-device-mode="computer"] #map{height:650px}
body[data-device-mode="computer"] .map-panel{min-height:710px}
body[data-device-mode="computer"] .feature-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
body[data-device-mode="computer"] .institution-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
body[data-device-mode="computer"] .stats{grid-template-columns:repeat(4,minmax(0,1fr))}
body[data-device-mode="computer"] .device-mode-btn{min-width:150px}
body[data-device-mode="computer"] .resource-add-panel{max-width:1100px;margin-inline:auto}
@media(max-width:900px){body[data-device-mode="computer"] #appView>.tabs{width:210px}body[data-device-mode="computer"] #appView>section.tab,body[data-device-mode="computer"] #appView>.hero,body[data-device-mode="computer"] #appView>.admin-entry,body[data-device-mode="computer"] #appView>.role-scope-banner{margin-right:225px;margin-left:10px}}
@media(max-width:650px){body[data-device-mode="computer"] #appView>.tabs{position:static;width:auto;display:flex;flex-direction:row;overflow-x:auto;border:0;box-shadow:none}body[data-device-mode="computer"] #appView>section.tab,body[data-device-mode="computer"] #appView>.hero,body[data-device-mode="computer"] #appView>.admin-entry,body[data-device-mode="computer"] #appView>.role-scope-banner{margin-right:0;margin-left:0}}
/* YAKADHA DZ — smart 100 km operational scope + caller SOS card */
.sos-caller-marker{background:transparent!important;border:0!important;display:flex;align-items:center;justify-content:center;overflow:visible}
.sos-caller-marker>span{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:#dc2626;color:#fff;border:3px solid #fff;box-shadow:0 5px 18px rgba(127,29,29,.55);font-size:25px;line-height:1}
@keyframes yakadhaCallerPulse{0%,100%{transform:scale(1);filter:drop-shadow(0 0 0 rgba(220,38,38,0))}50%{transform:scale(1.18);filter:drop-shadow(0 0 13px rgba(220,38,38,.9))}}
.sos-caller-marker.caller-pulse>span{animation:yakadhaCallerPulse 1s ease-in-out infinite}
.sos-caller-card{direction:rtl;min-width:270px;color:#132238;background:#fff;border-radius:14px;padding:10px;box-shadow:0 8px 28px rgba(0,0,0,.2)}
.sos-caller-head{display:flex;align-items:center;gap:9px;padding-bottom:9px;margin-bottom:9px;border-bottom:1px solid #dbe4ef}
.sos-caller-head b{display:block;font-size:16px}.sos-caller-head small{display:block;color:#b91c1c;margin-top:2px;font-weight:800}
.sos-caller-badge{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#fee2e2;font-size:22px}
.sos-caller-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.sos-caller-grid>div{padding:7px;border-radius:9px;background:#f5f8fc;border:1px solid #e1e8f0}.sos-caller-grid>div.full{grid-column:1/-1}.sos-caller-grid span{display:block;color:#64748b;font-size:11px}.sos-caller-grid b{display:block;margin-top:2px;font-size:12px;word-break:break-word}
.sos-caller-focus{width:100%;margin-top:9px;background:#0b3d91;color:#fff;border-color:#0b3d91;font-weight:800}
@media(max-width:650px){.sos-caller-card{min-width:235px}.sos-caller-grid{grid-template-columns:1fr}.sos-caller-grid>div.full{grid-column:auto}}

/* YAKADHA DZ — automatic Civil Protection wilaya identity banner */
.civil-directorate-banner{position:relative;display:flex;align-items:center;gap:12px;margin:0 0 12px;padding:8px 12px;min-height:54px;overflow:hidden;border:1px solid rgba(255,255,255,.18);border-radius:16px;background:linear-gradient(90deg,#06285f,#0b3d91 55%,#071b36);box-shadow:0 8px 24px rgba(0,0,0,.16);color:#fff}
.civil-directorate-logo-wrap{flex:0 0 42px;width:42px;height:42px;border-radius:50%;padding:2px;background:#fff;box-shadow:0 0 0 2px rgba(255,255,255,.2)}
.civil-directorate-logo-wrap img{width:100%;height:100%;display:block;object-fit:contain;border-radius:50%}
.civil-directorate-marquee{min-width:0;flex:1;overflow:hidden;direction:rtl;mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.civil-directorate-track{display:inline-block;white-space:nowrap;padding-inline:40px;font-weight:900;font-size:clamp(14px,2vw,18px);letter-spacing:.1px;animation:yakadha-directorate-marquee 32s linear infinite}
.civil-directorate-banner:hover .civil-directorate-track{animation-play-state:paused}
.civil-directorate-status{flex:0 0 auto;font-size:11px;font-weight:800;opacity:.9;padding:5px 8px;border-radius:999px;background:rgba(255,255,255,.1);white-space:nowrap}
@keyframes yakadha-directorate-marquee{from{transform:translateX(105%)}to{transform:translateX(-115%)}}
@media(prefers-reduced-motion:reduce){.civil-directorate-track{animation:none;transform:none}}
@media(max-width:650px){.civil-directorate-banner{gap:8px;border-radius:12px;padding:7px 9px}.civil-directorate-logo-wrap{flex-basis:36px;width:36px;height:36px}.civil-directorate-track{font-size:13px;animation-duration:38s}.civil-directorate-status{font-size:9px;padding:4px 6px}}

/* ===== YAKADHA DZ — FINAL FIELD RELEASE UX 15/09/2026 ===== */
.yakadha-splash{position:fixed;inset:0;z-index:50000;background:#061326 url('./assets/yakadha-splash-20260915.png') center/cover no-repeat;display:flex;align-items:flex-end;justify-content:center;padding:clamp(20px,5vw,70px);transition:opacity .55s ease,visibility .55s ease}.yakadha-splash.hidden{opacity:0;visibility:hidden;pointer-events:none}.yakadha-splash-overlay{width:min(760px,92vw);text-align:center;color:#fff;background:linear-gradient(180deg,rgba(3,15,30,.1),rgba(3,15,30,.88));border-radius:24px;padding:24px 24px 20px;backdrop-filter:blur(6px);box-shadow:0 20px 70px rgba(0,0,0,.45)}.yakadha-splash-badge{font-size:clamp(20px,3vw,32px);font-weight:900;text-shadow:0 3px 14px #000}.yakadha-splash-overlay p{font-size:clamp(15px,2vw,22px);margin:7px 0;color:#fff}.yakadha-enter-btn{background:#c91f26!important;border:2px solid #fff!important;border-radius:14px!important;padding:13px 30px!important;font-size:18px!important;font-weight:900!important;box-shadow:0 8px 25px rgba(0,0,0,.3)}.yakadha-splash-overlay small{display:block;margin-top:10px;color:#e2e8f0}.sos-popup-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.sos-history-panel{margin-top:18px;padding-top:14px;border-top:1px solid #dbe4ef}.sos-history-row{display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;background:#fff!important;color:#132238!important;border-color:#dbe4ef!important}.sos-history-row strong,.sos-history-row div{color:#132238!important}.sos-history-rank{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#0b63ce;color:#fff!important;font-weight:900}.sos-history-main{min-width:0}.sos-history-main .meta{color:#64748b!important}.sos-caller-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.sos-caller-grid>div{padding:8px;border:1px solid #dbe4ef;border-radius:9px;background:#f7fafc}.sos-caller-grid span{display:block;font-size:11px;color:#64748b;margin-bottom:2px}.sos-caller-grid b{display:block;color:#132238;overflow-wrap:anywhere}.sos-caller-grid .full{grid-column:1/-1}.sos-caller-marker.caller-pulse>span{will-change:transform,filter}.operational-radius-label{font-weight:900;color:#0b4f9c;background:#fff;border:1px solid #b7d5ef;padding:4px 8px;border-radius:999px}

/* Desktop edition: operational workstation inspired by the reference interface. */
body[data-device-mode="computer"]{background:#e7edf5;color:#132238}body[data-device-mode="computer"] .app-topbar{background:#071b33;color:#fff;border-bottom:0;height:64px}body[data-device-mode="computer"] .topbar{background:#fff;color:#132238;top:100px;border-bottom:1px solid #d7e1ed}body[data-device-mode="computer"] .ticker{background:#062b55}body[data-device-mode="computer"] #appView>.tabs{left:0;right:auto;border-left:0;border-right:1px solid #29456c;background:linear-gradient(180deg,#06285f,#071b33);box-shadow:12px 0 35px rgba(0,0,0,.14)}body[data-device-mode="computer"] #appView>section.tab,body[data-device-mode="computer"] #appView>.hero,body[data-device-mode="computer"] #appView>.admin-entry,body[data-device-mode="computer"] #appView>.role-scope-banner{margin-left:265px;margin-right:18px}body[data-device-mode="computer"] .hero{background:linear-gradient(90deg,rgba(4,17,32,.78),rgba(4,17,32,.16)),url('./assets/maqam-echahid.jpg') center/cover}body[data-device-mode="computer"] .hero h1{font-size:58px}body[data-device-mode="computer"] .feature-card{background:#fff;color:#132238;box-shadow:0 7px 22px rgba(13,35,60,.09);border-color:#d6e1ec;text-align:center;align-items:center}body[data-device-mode="computer"] .feature-card b,body[data-device-mode="computer"] .feature-card small{color:#132238}body[data-device-mode="computer"] .panel{background:#fff;color:#132238;border-color:#d6e1ec;box-shadow:0 7px 22px rgba(13,35,60,.08)}body[data-device-mode="computer"] .section-title h2,body[data-device-mode="computer"] .section-head h2,body[data-device-mode="computer"] .section-head h3,body[data-device-mode="computer"] .panel>h2,body[data-device-mode="computer"] .panel>h3{color:#132238}body[data-device-mode="computer"] .stats div{background:#fff;border-color:#d6e1ec}body[data-device-mode="computer"] .stats b{color:#0b3d91}body[data-device-mode="computer"] #map{height:650px}body[data-device-mode="computer"] .map-panel{min-height:710px}body[data-device-mode="computer"] .map-toolbar.panel{background:#fff}body[data-device-mode="computer"] .tabs button{font-size:14px}body[data-device-mode="computer"] .civil-directorate-banner{margin-left:265px;margin-right:18px}
@media(max-width:650px){.yakadha-splash{padding:14px}.yakadha-splash-overlay{padding:16px 14px}.sos-popup-actions{grid-template-columns:1fr}.sos-history-row{grid-template-columns:34px 1fr}.sos-history-row>.sos-map-btn{grid-column:2;justify-self:start}}

/* alyakadaDZ — weather / local alert module */
.weather-grid{display:grid;grid-template-columns:1.25fr .9fr;gap:16px}
.weather-current{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:12px 0}
.weather-card{padding:14px;border:1px solid rgba(11,61,145,.15);border-radius:14px;background:rgba(255,255,255,.55)}
.weather-temp{font-size:2.2rem;font-weight:800}
.weather-alert{margin-top:12px;padding:14px;border-radius:14px;font-weight:700}
.weather-alert.safe{background:#e9f8ef;border:1px solid #a9ddba}
.weather-alert.watch{background:#fff7df;border:1px solid #f0cf72}
.weather-alert.danger{background:#fff0ef;border:1px solid #efaaa4}
.weather-metrics,.weather-hourly{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px}
.weather-hour{padding:12px;border:1px solid rgba(0,0,0,.08);border-radius:12px;background:rgba(255,255,255,.5)}
.satellite-snapshot{width:100%;min-height:260px;object-fit:cover;border-radius:14px;background:#07111f}
.flood-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.flood-image-card{overflow:hidden;border:1px solid rgba(0,0,0,.08);border-radius:14px;background:#fff}
.flood-image-card img{display:block;width:100%;height:150px;object-fit:cover}
.flood-image-card .body{padding:10px}
.weather-pulse{animation:weatherPulse 1.8s ease-in-out infinite}
@keyframes weatherPulse{50%{opacity:.55}}
@media(max-width:800px){.weather-grid{grid-template-columns:1fr}.satellite-snapshot{min-height:210px}}

/* alyakadaDZ emergency map layer */
.health-pin, .discovered-hospital-pin { background: transparent; border: 0; }
.discovered-hospital-pin span, .health-pin span { display:flex; width:34px; height:34px; align-items:center; justify-content:center; border:3px solid #2563eb; background:#fff; border-radius:50%; box-shadow:0 2px 8px rgba(0,0,0,.28); font-size:21px; }
.map-legend { display:flex; gap:16px; flex-wrap:wrap; padding:8px 2px 0; font-size:.88rem; }
.legend-hospital { color:#1d4ed8; font-weight:700; } .legend-route { color:#b91c1c; font-weight:700; }

.intel-map{height:430px;border-radius:18px;overflow:hidden;background:#eef2f7}.intel-result{min-height:70px;padding:14px;border-radius:14px;background:rgba(15,23,42,.04);line-height:1.8}.vision-preview img{max-width:100%;max-height:220px;border-radius:14px;margin:10px 0}.emergency-float{position:fixed;right:18px;bottom:18px;z-index:9999;width:58px;height:58px;border:0;border-radius:50%;background:#b91c1c;color:#fff;font-size:25px;box-shadow:0 10px 30px rgba(0,0,0,.25)}.switch-row{display:flex;gap:10px;align-items:center;padding:12px;border-radius:12px;background:rgba(37,99,235,.08)}.switch-row input{width:20px;height:20px}.intel-stats{margin-bottom:16px}.emergency-mode .danger{font-weight:900}.emergency-mode .emergency-float{animation:alyPulse 1.6s infinite}@keyframes alyPulse{50%{transform:scale(1.08);box-shadow:0 0 0 12px rgba(185,28,28,.08)}}

/* ================= alyakadaDZ REAL DEVICE EXPERIENCE v2 ================= */
:root{--device-max:100%;--device-side:0px}
#deviceModeBtn,#smartWeatherBtn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:12px;min-height:42px;padding:8px 12px;font-weight:900;transition:.2s ease}
#deviceModeBtn{border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.1);color:inherit}
#deviceModeBtn:hover,#smartWeatherBtn:hover{transform:translateY(-1px);filter:brightness(1.06)}
.device-mode-icon{font-size:18px}.smart-weather-btn{border:1px solid #b7d5ef;background:#eaf5ff;color:#0b3d91}.smart-weather-risk{font-size:11px;border-radius:999px;padding:2px 7px;background:#dbeafe;color:#1e40af}.smart-weather-risk.safe{background:#dcfce7;color:#166534}.smart-weather-risk.watch{background:#fef3c7;color:#92400e}.smart-weather-risk.danger{background:#fee2e2;color:#991b1b}
body[data-device-mode="phone"] #appView{width:min(100%,480px);margin:0 auto;overflow-x:hidden;box-shadow:0 0 0 1px rgba(15,61,145,.05)}
body[data-device-mode="phone"] .app-topbar .top-controls{gap:6px}
body[data-device-mode="phone"] .device-mode-btn,body[data-device-mode="phone"] .smart-weather-btn{min-width:42px;width:42px;padding:7px}.device-mode-btn span:not(.device-mode-icon),body[data-device-mode="phone"] #smartWeatherLabel{display:none}
body[data-device-mode="phone"] .smart-weather-risk{display:none}
body[data-device-mode="phone"] #appView>.tabs{padding-inline:6px;gap:4px}
body[data-device-mode="phone"] #appView>.tabs button{flex:0 0 auto;min-height:43px;padding:9px 12px}
body[data-device-mode="phone"] .hero{min-height:390px}
body[data-device-mode="phone"] .hero h1{font-size:38px}
body[data-device-mode="phone"] .feature-grid{grid-template-columns:1fr 1fr}
body[data-device-mode="phone"] .grid,.body[data-device-mode="phone"] .grid{grid-template-columns:1fr}
body[data-device-mode="phone"] .stats{grid-template-columns:1fr 1fr}
body[data-device-mode="phone"] .weather-grid{grid-template-columns:1fr}
body[data-device-mode="phone"] .weather-hourly{grid-template-columns:repeat(2,minmax(0,1fr))}
body[data-device-mode="computer"] #appView{width:100%;max-width:none;margin:0}
body[data-device-mode="computer"] #appView>.tabs{scrollbar-width:thin}
body[data-device-mode="computer"] .smart-weather-btn{min-width:150px}
body[data-device-mode="computer"] .device-mode-btn{min-width:165px}
body[data-device-mode="computer"] .hero{min-height:500px}
body[data-device-mode="computer"] .hero-actions{display:flex;flex-wrap:wrap;gap:10px}
body[data-device-mode="computer"] .panel{min-width:0}
body[data-device-mode="computer"] .feature-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
body[data-device-mode="computer"] .weather-grid{grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr)}
body[data-device-mode="computer"] .weather-hourly{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:720px){#smartWeatherLabel,#deviceModeLabel{display:none!important}#deviceModeBtn,#smartWeatherBtn{width:42px;padding:7px}.smart-weather-risk{display:none!important}}

.gemini-settings-float{position:fixed;left:18px;bottom:18px;z-index:9998;border:1px solid #0B3D91;background:#fff;color:#0B3D91;border-radius:999px;font-weight:700;box-shadow:0 8px 24px rgba(0,0,0,.15)}.gemini-key-modal{position:fixed;inset:0;z-index:10001;background:rgba(0,0,0,.48);display:grid;place-items:center;padding:18px}.gemini-key-card{width:min(560px,100%);background:#fff;color:#132238;border-radius:18px;padding:20px;box-shadow:0 24px 70px rgba(0,0,0,.3)}.gemini-key-card input{width:100%;box-sizing:border-box;background:#f8fafc;color:#132238;border:1px solid #cbd5e1;border-radius:10px;padding:12px;margin:10px 0}.gemini-key-card .meta{line-height:1.7}.gemini-key-card .msg{margin-top:8px}
.intel-hospital-pin{position:relative;background:transparent;border:0}.intel-hospital-pin span{display:flex;width:34px;height:34px;align-items:center;justify-content:center;border:3px solid #2563eb;background:#fff;border-radius:50%;box-shadow:0 2px 8px rgba(0,0,0,.28);font-size:20px}.intel-hospital-pin b{position:absolute;right:-5px;top:-7px;min-width:18px;height:18px;padding:0 4px;border-radius:10px;background:#fff;color:#b91c1c;border:1px solid #b91c1c;font-size:11px;line-height:17px;text-align:center}.hospitals-output .item{margin:6px 0}
/* v6 safety center */
.firstaid-alert{border-right:5px solid #b91c1c;background:linear-gradient(90deg,#fff,#f8fbff)}
.firstaid-alert .button-link{display:inline-flex;align-items:center;justify-content:center;padding:.75rem 1rem;border-radius:12px;background:#0b3d91;color:#fff;text-decoration:none;font-weight:700}
.firstaid-alert .row{margin-top:12px}
.firstaid-tool,.firstaid-checklist{border:1px solid #d9e4f2}
.firstaid-result{margin-top:12px;padding:14px;border-radius:12px;background:#f4f8fc;line-height:1.75}
.firstaid-result ol{margin:.5rem 1.2rem}
.firstaid-rich article{position:relative;overflow:hidden}
.firstaid-rich article small{display:block;margin-top:8px;color:#6b7280}
.fire-command{border-right:5px solid #dc2626}
.fire-steps{margin:0;padding-right:1.5rem;line-height:1.9}
.fire-steps li{margin:.25rem 0}
.fire-risk-panel{border-right:5px solid #f59e0b}
.fire-report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}
.fire-report-grid label{display:flex;flex-direction:column;gap:6px}
@media(max-width:700px){.fire-report-grid{grid-template-columns:1fr}.firstaid-alert .row{flex-wrap:wrap}.firstaid-alert .button-link,.firstaid-alert button{min-width:140px}}

.role-logo-fallback{background:linear-gradient(135deg,#0b3d91,#06285f)!important;color:#fff!important;border-color:#fff!important}.role-logo-fallback-mark{display:grid;place-items:center;width:100%;height:100%;font-size:24px}.civil-directorate-logo-wrap.logo-fallback{display:grid;place-items:center;color:#0b3d91;font-size:23px}.civil-directorate-logo-wrap.logo-fallback img{display:none}
.health-from-unit{filter:saturate(.9)}
.clear-record{margin-top:8px;font-size:.8rem;padding:5px 9px}.sos-operational-card{border-inline-start:4px solid #d00}

.ops-mini-panel{padding:10px;margin-bottom:10px}.ops-mini-feed{display:grid;gap:6px;max-height:190px;overflow:auto}.ops-mini-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;border:1px solid rgba(0,0,0,.08);border-radius:10px;background:rgba(255,255,255,.72)}.ops-mini-row>div{min-width:0}.ops-mini-row b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ops-mini-row small{display:block;color:#68727d;margin-top:2px}.mini-clear{flex:0 0 auto;padding:4px 7px;font-size:.78rem}

/* V17 Statistics Intelligence — additive only */
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0}.stats-card{padding:16px;border:1px solid rgba(11,61,145,.12);border-radius:16px;background:linear-gradient(180deg,#fff,#f7faff);box-shadow:0 5px 18px rgba(0,0,0,.05)}.stats-card b{display:block;font-size:1.8rem;line-height:1.1;color:#0b3d91}.stats-card span{display:block;margin-top:7px;font-weight:700}.stats-card small{display:block;margin-top:4px;color:#68727d}.stats-geo-panel{border-right:4px solid #0b3d91}.stats-geo-summary{display:flex;flex-wrap:wrap;gap:8px}.stats-chip{display:inline-flex;align-items:center;gap:5px;padding:7px 10px;border-radius:999px;background:#eef5ff;color:#173b6d;font-size:.88rem}.stats-detail-grid{align-items:start}.stats-bars{display:grid;gap:9px}.stats-bar-row{display:grid;grid-template-columns:90px 1fr 58px;gap:8px;align-items:center}.stats-bar-track{height:10px;border-radius:99px;background:#e7edf5;overflow:hidden}.stats-bar-fill{height:100%;border-radius:99px;background:#0b3d91}.stats-bar-row b{text-align:left}.stats-issue-row{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid #edf0f4}.stats-performance{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.stats-perf{padding:12px;border-radius:12px;background:#f6f8fb}.stats-perf b{display:block;font-size:1.2rem}.stats-table-wrap{overflow:auto}.stats-table{width:100%;border-collapse:collapse}.stats-table th,.stats-table td{padding:9px;border-bottom:1px solid #edf0f4;text-align:right;white-space:nowrap}.stats-table th{background:#f7f9fc}.stats-empty{padding:14px;color:#68727d}.stats-loading{padding:18px;text-align:center}.stats-ok{color:#176b3a}.stats-warn{color:#9a6700}@media(max-width:900px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-performance{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.stats-grid{grid-template-columns:1fr 1fr}.stats-performance{grid-template-columns:1fr 1fr}.stats-bar-row{grid-template-columns:70px 1fr 45px}.stats-table th,.stats-table td{font-size:.82rem}}

/* ==========================================================
   YAKADHA DZ — V17 VISUAL THEME / INSTITUTIONAL EMERGENCY
   VISUAL-ONLY PATCH: colors, surfaces, borders, shadows.
   No application logic, Firebase, SOS, maps, routing or stats logic changed.
   ========================================================== */
:root{
  --color-primary:#123B66;
  --color-primary-dark:#082A4A;
  --color-primary-light:#EAF3FA;
  --color-secondary:#1F6FAE;
  --color-background:#F5F7FA;
  --color-surface:#FFFFFF;
  --color-surface-soft:#F8FAFC;
  --color-text:#17212B;
  --color-text-secondary:#5B6875;
  --color-text-muted:#7A8794;
  --color-text-on-primary:#FFFFFF;
  --color-border:#DCE3EA;
  --color-border-strong:#C5D0DA;
  --color-danger:#D62828;
  --color-danger-dark:#A91F1F;
  --color-danger-soft:#FDECEC;
  --color-warning:#E69A00;
  --color-warning-soft:#FFF5DD;
  --color-success:#16855B;
  --color-success-soft:#E8F6F0;
  --color-info:#1976D2;
  --color-info-soft:#EAF3FF;
  --color-civil-protection:#D62828;
  --color-health:#1976D2;
  --color-unit:#123B66;
  --shadow-card:0 4px 18px rgba(18,59,102,.08);
  --shadow-card-hover:0 8px 24px rgba(18,59,102,.12);
  --focus-ring:0 0 0 3px rgba(31,111,174,.22);
}

html,body{background:var(--color-background);color:var(--color-text)}
body{background:linear-gradient(180deg,#F8FAFC 0%,#F5F7FA 55%,#EEF3F8 100%);}

/* Navigation / identity */
.app-topbar,.topbar{background:#FFFFFF;border-color:var(--color-border);color:var(--color-text);box-shadow:0 3px 16px rgba(18,59,102,.06)}
.brand b,.brand-mini strong{color:var(--color-primary-dark)}
.brand small,.brand-mini small,.auth-tools span{color:var(--color-text-secondary)}
.ticker{background:var(--color-primary-dark);border-bottom-color:#1F4F78}
.ticker a,.ticker span{color:#F7FBFF}.ticker span{color:#FFD166}

/* Main surfaces */
.panel,.institution-card,.price-card{background:var(--color-surface);color:var(--color-text);border-color:var(--color-border);box-shadow:var(--shadow-card)}
.panel:hover,.institution-card:hover,.price-card:hover{box-shadow:var(--shadow-card-hover)}
.meta,.feature-card small,.guide-grid p,.hazard-grid p,.stats-card small,.internal-map-note,.stats-empty{color:var(--color-text-secondary)}
.section-title h2,.section-head h2,.section-head h3,.feature-card b,.inst-body h3{color:var(--color-primary-dark)}
.eyebrow{color:var(--color-secondary)}

/* Hero — preserve image, improve contrast only */
.hero{background:linear-gradient(90deg,rgba(8,42,74,.88),rgba(8,42,74,.28)),url("./assets/maqam-echahid.jpg") center/cover;box-shadow:0 18px 45px rgba(18,59,102,.16)}
.hero h1,.hero p,.hero-overlay>span{color:#FFFFFF}

/* Controls */
button{background:#FFFFFF;color:var(--color-text);border-color:var(--color-border-strong);box-shadow:0 1px 3px rgba(18,59,102,.05)}
button:hover{filter:none;border-color:#AFC1D1;box-shadow:0 4px 12px rgba(18,59,102,.10)}
button.active{outline:2px solid #1F6FAE;outline-offset:1px}
button.primary,.primary{background:var(--color-primary)!important;border-color:var(--color-primary)!important;color:#FFFFFF!important}
button.primary:hover,.primary:hover{background:var(--color-primary-dark)!important}
button.danger,.danger{background:var(--color-danger)!important;border-color:var(--color-danger-dark)!important;color:#FFFFFF!important}
button.danger:hover,.danger:hover{background:var(--color-danger-dark)!important}
.glass{background:rgba(255,255,255,.94);color:var(--color-primary-dark);border-color:rgba(255,255,255,.75);backdrop-filter:blur(10px)}
.smart-weather-btn{background:#EAF3FF;color:var(--color-primary);border-color:#B7D5EF}
.smart-weather-risk{background:#EAF3FF;color:#24548A}.smart-weather-risk.safe{background:#E8F6F0;color:#166B4A}.smart-weather-risk.watch{background:#FFF5DD;color:#8A5A00}.smart-weather-risk.danger{background:#FDECEC;color:#9F2020}

/* Forms */
input,textarea,select,input[type=number]{background:#FFFFFF!important;color:var(--color-text)!important;border-color:var(--color-border-strong)!important}
input:focus,textarea:focus,select:focus{outline:none;box-shadow:var(--focus-ring);border-color:var(--color-secondary)!important}
.login-panel input{background:#FFFFFF;color:var(--color-text);border-color:var(--color-border-strong)}

/* Feature / content cards */
.feature-card{background:linear-gradient(145deg,#FFFFFF,#F4F8FC);border-color:var(--color-border);color:var(--color-text);box-shadow:var(--shadow-card)}
.feature-card:hover{border-color:#B8CAD9;transform:translateY(-1px);box-shadow:var(--shadow-card-hover)}
.guide-grid article,.hazard-grid article,.item,.news-item,.chat-box,.chat-msg.bot{background:#FFFFFF;border-color:var(--color-border);color:var(--color-text)}
.phone-row a{background:#F8FAFC;border-color:var(--color-border);color:var(--color-primary)}
.official,footer a{color:var(--color-secondary)}
.notice{background:#FFFFFF}

/* Status colors */
.critical{background:#FDECEC;color:#9F2020}.high{background:#FFF0E7;color:#9A3B0A}.medium{background:#FFF5DD;color:#8A5A00}.low{background:#E8F6F0;color:#166B4A}.live{color:#16855B}
.msg{color:#8A5A00}

/* Maps — neutral frame so geographic colors stay dominant */
#map,.intel-map,.official-units-map{background:#EEF3F8;border-color:var(--color-border)}
.area-label{background:#FFFFFF;color:var(--color-primary-dark);border-color:#1F6FAE;box-shadow:0 2px 8px rgba(18,59,102,.12)}
.internal-map-note{background:#F8FAFC;border-color:var(--color-border)}
.legend-hospital{color:#1976D2}.legend-route{color:#D62828}
.intel-hospital-pin span{border-color:#1976D2}.intel-hospital-pin b{color:#D62828;border-color:#D62828}

/* Statistics — keep existing functionality and strengthen visual hierarchy */
.stats-card{background:linear-gradient(180deg,#FFFFFF,#F7FAFD);border-color:#D7E1EA;box-shadow:var(--shadow-card)}
.stats-card b,.stats-bar-fill{color:var(--color-primary);background-color:var(--color-primary)}
.stats-chip{background:#EAF3FA;color:#173B6D}.stats-geo-panel{border-right-color:var(--color-primary)}
.stats-bar-track{background:#E7EDF5}.stats-table th{background:#F7F9FC}.stats-table th,.stats-table td{border-color:#E7EDF2}
.stats-perf{background:#F6F8FB}.stats-ok{color:#176B3A}.stats-warn{color:#8A5A00}

/* Institutional identity blocks */
.institution-detail-head{background:linear-gradient(135deg,#082A4A,#123B66)}
.role-logo-fallback{background:linear-gradient(135deg,#123B66,#082A4A)!important}
.civil-directorate-banner{background:#FFFFFF!important;color:var(--color-primary-dark)!important;border-color:var(--color-border)!important;box-shadow:var(--shadow-card)}
.civil-directorate-status{color:var(--color-success)!important}

/* SOS remains visually unmistakable */
.sos-operational-card{border-inline-start-color:#D62828}
.emergency-float{background:#D62828;box-shadow:0 10px 30px rgba(214,40,40,.25)}
.emergency-mode .emergency-float{animation:alyPulseLight 1.6s infinite}
@keyframes alyPulseLight{50%{transform:scale(1.08);box-shadow:0 0 0 12px rgba(214,40,40,.10)}}

/* Footer */
footer{color:#687788}

/* Existing dark visual mode remains available if the application sets it explicitly. */
body[data-theme="dark"],html[data-theme="dark"] body{
  --color-primary:#38BDF8;--color-primary-dark:#0EA5E9;--color-primary-light:#102A43;
  --color-secondary:#60A5FA;--color-background:#07111F;--color-surface:#0D1B2A;--color-surface-soft:#13263A;
  --color-text:#F8FAFC;--color-text-secondary:#A9B8C8;--color-text-muted:#8295A8;--color-border:#243B53;--color-border-strong:#334E68;
  --color-danger:#FF3B3B;--color-danger-dark:#E11D2E;--color-danger-soft:#35151A;--color-warning:#FFB020;--color-warning-soft:#332713;
  --color-success:#2DD4BF;--color-info:#60A5FA;--color-civil-protection:#FF3B3B;--color-health:#60A5FA;--color-unit:#38BDF8;
  --shadow-card:0 6px 20px rgba(0,0,0,.28);--shadow-card-hover:0 10px 28px rgba(0,0,0,.38);
}
body[data-theme="dark"]{background:linear-gradient(180deg,#07111F,#0D1B2A)}
body[data-theme="dark"] .app-topbar,body[data-theme="dark"] .topbar{background:#0D1B2A;color:#F8FAFC;border-color:#243B53}
body[data-theme="dark"] .panel,body[data-theme="dark"] .institution-card,body[data-theme="dark"] .price-card,body[data-theme="dark"] .feature-card,body[data-theme="dark"] .item,body[data-theme="dark"] .news-item,body[data-theme="dark"] .guide-grid article,body[data-theme="dark"] .hazard-grid article{background:#0D1B2A;color:#F8FAFC;border-color:#243B53}
body[data-theme="dark"] input,body[data-theme="dark"] textarea,body[data-theme="dark"] select,body[data-theme="dark"] button{background:#13263A!important;color:#F8FAFC!important;border-color:#334E68!important}
body[data-theme="dark"] .glass{background:rgba(13,27,42,.92);color:#F8FAFC}

@media(max-width:650px){
  .hero{box-shadow:0 12px 32px rgba(18,59,102,.13)}
  .panel{border-radius:14px}
}

/* =========================================================
   V17 VISUAL MAP EXPERIENCE — safe visual/layout layer
   No operational logic, Firebase, SOS or routing changes.
   ========================================================= */
body:not([data-theme="dark"]) .panel p,
body:not([data-theme="dark"]) .panel li,
body:not([data-theme="dark"]) .panel label,
body:not([data-theme="dark"]) .panel .item,
body:not([data-theme="dark"]) .panel .section-head,
body:not([data-theme="dark"]) .panel .section-head h2,
body:not([data-theme="dark"]) .panel .section-head h3,
body:not([data-theme="dark"]) .panel > h2,
body:not([data-theme="dark"]) .panel > h3 {
  color: #132238;
}
body:not([data-theme="dark"]) .panel .meta { color:#526173; }
body:not([data-theme="dark"]) .panel .notice { color:#132238; }
body:not([data-theme="dark"]) .panel a:not(.primary):not(.danger) { color:#123B66; }
body:not([data-theme="dark"]) .panel input,
body:not([data-theme="dark"]) .panel textarea,
body:not([data-theme="dark"]) .panel select { color:#132238!important; }
body:not([data-theme="dark"]) .panel input::placeholder,
body:not([data-theme="dark"]) .panel textarea::placeholder { color:#6B7785!important; opacity:1; }

.map-explorer-grid {
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:12px;
  align-items:stretch;
}
.map-explorer-grid .map-main-panel { min-width:0; }
.map-explorer-grid .map-main-panel > .section-head { margin-bottom:10px; }
.ops-map-explorer #map,
.official-map-explorer .official-units-map,
.health-map-explorer .health-map {
  height:clamp(680px, 82vh, 980px);
  min-height:680px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid #D5DFE9;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.45), 0 8px 24px rgba(18,59,102,.08);
}
/* V17 MAP-FIRST UI: the former vertical information card is intentionally removed. */
.map-explorer-grid > .map-main-panel,
.map-explorer-grid > .panel.map-main-panel { width:100%; min-width:0; }

.map-info-column {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:12px;
  background:linear-gradient(180deg,#FFFFFF,#F7FAFD);
}
.map-info-column .section-head { margin-bottom:2px; }
.map-info-block {
  padding:13px 14px;
  border:1px solid #DCE3EA;
  border-radius:13px;
  background:#F8FAFC;
}
.map-info-block b { display:block; color:#123B66; margin-bottom:5px; }
.map-info-block p { margin:0; color:#425466!important; line-height:1.7; font-size:13px; }
.map-info-list { display:grid; gap:8px; }
.map-info-row {
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px 12px;
  border-radius:11px;
  background:#FFFFFF;
  border:1px solid #E0E7EE;
  color:#132238;
}
.map-info-row span { width:26px; text-align:center; font-size:19px; }
.map-info-row b { font-size:13px; }
.map-info-live {
  padding:13px;
  border-radius:12px;
  background:#EAF3FA;
  border:1px solid #C8DDEC;
  color:#123B66!important;
  font-weight:700;
  line-height:1.65;
}
.map-info-note {
  margin-top:auto;
  padding:12px;
  border-radius:12px;
  background:#EEF5FA;
  border:1px solid #D5E3EE;
  color:#425466!important;
  font-size:12px;
  line-height:1.65;
}
.map-legend.vertical { display:grid; gap:7px; }
.map-legend.vertical span {
  display:block;
  padding:8px 10px;
  border-radius:9px;
  background:#fff;
  border:1px solid #E0E7EE;
  color:#132238;
  font-weight:700;
  font-size:12px;
}
.health-map-explorer + .health-list-panel { margin-top:16px; }
.incident-feed-panel { margin-top:16px; }

body[data-theme="dark"] .map-info-column,
body[data-theme="dark"] .map-info-block,
body[data-theme="dark"] .map-info-row,
body[data-theme="dark"] .map-legend.vertical span {
  background:#0D1B2A;
  border-color:#243B53;
  color:#F8FAFC;
}
body[data-theme="dark"] .map-info-block b,
body[data-theme="dark"] .map-info-row b,
body[data-theme="dark"] .map-info-live { color:#F8FAFC!important; }
body[data-theme="dark"] .map-info-block p,
body[data-theme="dark"] .map-info-note { color:#A9B8C8!important; }
body[data-theme="dark"] .map-info-live { background:#102A43; border-color:#243B53; }
body[data-theme="dark"] .ops-map-explorer #map,
body[data-theme="dark"] .official-map-explorer .official-units-map,
body[data-theme="dark"] .health-map-explorer .health-map { border-color:#243B53; }

/* V17 MAP-FIRST HARD OVERRIDE: full-width operational maps, no side column. */
.map-explorer-grid { grid-template-columns:1fr !important; }
.map-explorer-grid > .map-main-panel { grid-column:1 / -1 !important; }
.ops-map-explorer { width:calc(100vw - 36px); max-width:none; margin-left:calc((1350px - 100vw + 36px) / 2); }
.ops-map-explorer .map-main-panel { padding:12px; }
.ops-map-explorer #map { width:100%; height:calc(100vh - 220px) !important; min-height:760px !important; max-height:1000px; }
.official-map-explorer, .health-map-explorer { width:100%; }
.official-map-explorer .official-units-map, .health-map-explorer .health-map { width:100%; height:calc(100vh - 250px) !important; min-height:720px !important; }
.map-info-column { display:none !important; }
@media(max-width:1350px){ .ops-map-explorer { width:calc(100vw - 36px); margin-left:calc((100% - 100vw + 36px) / 2); } }
@media(max-width:800px){
  .ops-map-explorer { width:100%; margin-left:0; }
  .ops-map-explorer #map, .official-map-explorer .official-units-map, .health-map-explorer .health-map { height:calc(100vh - 190px) !important; min-height:520px !important; }
}
@media(max-width:650px){
  .ops-map-explorer #map, .official-map-explorer .official-units-map, .health-map-explorer .health-map { height:calc(100vh - 175px) !important; min-height:500px !important; }
}


/* V17 UI FIX — desktop tabs are part of the layout, not a floating overlay */
@media (min-width: 721px){
  body[data-device-mode="computer"] #appView>.tabs{position:relative !important;top:auto !important;right:auto !important;left:auto !important;bottom:auto !important;width:auto !important;height:auto !important;min-height:0 !important;z-index:10 !important;display:flex !important;flex-direction:row !important;flex-wrap:nowrap !important;align-items:center !important;gap:8px !important;overflow-x:auto !important;overflow-y:hidden !important;padding:10px 0 12px !important;margin:0 18px !important;background:transparent !important;border:0 !important;box-shadow:none !important;scrollbar-width:thin;}
  body[data-device-mode="computer"] #appView>.tabs button{width:auto !important;min-width:max-content !important;min-height:44px !important;flex:0 0 auto !important;text-align:center !important;margin:0 !important;border-radius:10px !important;font-size:14px !important;}
  body[data-device-mode="computer"] #appView>section.tab,body[data-device-mode="computer"] #appView>.hero,body[data-device-mode="computer"] #appView>.admin-entry,body[data-device-mode="computer"] #appView>.role-scope-banner{margin-left:18px !important;margin-right:18px !important;}
}


/* =========================================================
   V17 SPLASH RESPONSIVE POLISH — desktop + phone
   Visual-only: no Firebase, SOS, GPS, map, routing or auth logic.
   ========================================================= */

/* Desktop: show the complete vertical poster without cover-cropping. */
@media (min-width: 651px){
  .yakadha-splash{
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    padding: 18px !important;
  }
  .yakadha-splash-overlay{
    width: min(620px, 76vw) !important;
    padding: 14px 18px 12px !important;
    border-radius: 18px !important;
    margin-bottom: 6px !important;
  }
  .yakadha-splash-badge{
    font-size: clamp(18px, 2vw, 26px) !important;
  }
  .yakadha-splash-overlay p{
    font-size: clamp(13px, 1.45vw, 18px) !important;
    margin: 4px 0 !important;
  }
  .yakadha-enter-btn{
    min-height: 44px !important;
    padding: 10px 26px !important;
    font-size: 16px !important;
  }
  .yakadha-splash-overlay small{
    margin-top: 6px !important;
    font-size: 11px !important;
  }
}

/* Phone: make the splash feel like a real mobile launch screen.
   The complete poster remains visible; controls are compact and never
   cover the important poster content. */
@media (max-width: 650px){
  .yakadha-splash{
    padding: 10px !important;
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: #061326 !important;
  }
  .yakadha-splash-overlay{
    position: absolute !important;
    left: 10px !important;
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    padding: 10px 10px 9px !important;
    margin: 0 !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, rgba(3,15,30,.18), rgba(3,15,30,.82)) !important;
    border: 1px solid rgba(255,255,255,.20) !important;
    backdrop-filter: blur(7px) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.30) !important;
  }
  .yakadha-splash-badge{
    font-size: 15px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }
  .yakadha-splash-overlay p{
    font-size: 11px !important;
    line-height: 1.35 !important;
    margin: 3px 0 6px !important;
  }
  .yakadha-enter-btn{
    width: 100% !important;
    min-height: 44px !important;
    padding: 9px 16px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
  }
  .yakadha-splash-overlay small{
    display: none !important;
  }
}

/* Very short phones: keep the launch control compact and avoid covering
   the lower part of the poster. */
@media (max-width: 650px) and (max-height: 700px){
  .yakadha-splash-overlay{
    padding: 7px 8px !important;
  }
  .yakadha-splash-badge,
  .yakadha-splash-overlay p{
    display: none !important;
  }
  .yakadha-enter-btn{
    min-height: 42px !important;
  }
}

/* V17 Health route + medical channel polish */
.health-medical-channel-launch{margin-top:12px;border:1px solid rgba(25,118,210,.22);background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(240,248,255,.94));}
.health-medical-channel-launch .section-head{align-items:center;gap:12px;}
.health-medical-channel-launch .primary{white-space:nowrap;}
.health-medical-channel{width:min(760px,94vw);max-height:min(82vh,760px);display:flex;flex-direction:column;gap:10px;}
.health-medical-channel .coord-feed{min-height:220px;max-height:48vh;overflow:auto;border-radius:14px;padding:8px;background:rgba(8,31,58,.035);}
.health-route-origin span{display:block;font-size:26px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.28));}
@media (prefers-reduced-motion:reduce){.health-route-origin span{animation:none!important;}}


/* Smart Operations — WebRTC emergency audio channel B1 */
.yakadha-webrtc-panel{position:fixed;right:18px;bottom:18px;z-index:9999;width:min(440px,calc(100vw - 36px));padding:16px;border:1px solid rgba(255,255,255,.16);border-radius:18px;background:rgba(10,18,28,.96);box-shadow:0 18px 55px rgba(0,0,0,.35);backdrop-filter:blur(12px)}
.yakadha-webrtc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.yakadha-webrtc-head b{font-size:1rem}.yakadha-webrtc-state{font-size:.75rem;font-weight:700;white-space:nowrap}.yakadha-webrtc-status{margin:12px 0;padding:10px;border-radius:12px;background:rgba(255,255,255,.07);font-size:.88rem;line-height:1.5}.yakadha-webrtc-panel audio{display:none}.yakadha-webrtc-panel .row{display:flex;gap:8px;flex-wrap:wrap}.yakadha-webrtc-panel button{flex:1;min-width:145px}
.sos-call-btn{border:1px solid rgba(59,130,246,.35)}
@media(max-width:640px){.yakadha-webrtc-panel{right:10px;bottom:10px;width:calc(100vw - 20px)}}

.map-scope-status{margin:.65rem 0;padding:.65rem .85rem;border:1px solid rgba(11,99,206,.18);border-radius:12px;background:rgba(11,99,206,.06);font-weight:700;line-height:1.6}.map-scope-status .meta{font-weight:500}
/* V18.1 humanitarian media + medical/hazard visual layer */
.humanity-gallery-panel{margin:0 0 18px;overflow:hidden;border-radius:20px}
.humanity-stage{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(260px,.75fr);gap:16px;align-items:stretch}
.humanity-image-link{display:block;min-height:300px;border-radius:16px;overflow:hidden;background:#020617}
.humanity-image-link img{width:100%;height:100%;min-height:300px;max-height:430px;object-fit:cover;display:block;transition:opacity .25s ease,transform .45s ease}
.humanity-image-link:hover img{transform:scale(1.015)}
.humanity-caption{display:flex;flex-direction:column;justify-content:center;padding:20px;border:1px solid var(--line);border-radius:16px;background:#07111fd9}
.humanity-caption b{font-size:22px;line-height:1.35}.humanity-caption p{color:var(--muted);line-height:1.8}.humanity-caption small{color:#94a3b8;line-height:1.6}
.humanity-dots{display:flex;justify-content:center;gap:7px;padding:12px}.humanity-dot{width:10px;height:10px;padding:0;border-radius:50%;border:1px solid #64748b;background:#334155}.humanity-dot.active{background:#38bdf8;transform:scale(1.25)}
.humanity-official-links{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}.humanity-official-links a{font-size:13px;text-decoration:none;border:1px solid var(--line);border-radius:999px;padding:7px 12px;background:#0b1628}
.medical-step-image,.hazard-real-image{width:100%;height:180px;object-fit:cover;border-radius:12px;margin:-2px 0 12px;display:block;background:#0b1220}
.firstaid-rich article,.hazard-grid article{overflow:hidden}.firstaid-rich article .medical-step-image{height:165px}.hazard-grid article .hazard-real-image{height:150px}
.unit-phone-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}.unit-phone-edit{font-size:12px;padding:7px 9px}.phone-btn{display:inline-flex;align-items:center;gap:5px;text-decoration:none;border:1px solid #334155;border-radius:9px;padding:7px 10px;background:#0b1628}
@media(max-width:760px){.humanity-stage{grid-template-columns:1fr}.humanity-image-link,.humanity-image-link img{min-height:230px;max-height:300px}.humanity-caption{padding:15px}.medical-step-image,.hazard-real-image{height:145px}}

/* V18.2 Humanitarian Media Library */
.humanity-media-admin-list{display:grid;gap:12px;margin-top:14px}.humanity-media-admin-card{display:grid;grid-template-columns:180px minmax(0,1fr);gap:14px;padding:12px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.035)}.humanity-media-thumb{min-height:120px;border-radius:12px;overflow:hidden;background:#020617}.humanity-media-thumb img{width:100%;height:100%;min-height:120px;max-height:170px;object-fit:cover;display:block}.humanity-media-admin-body{min-width:0}.humanity-media-admin-body p{margin:7px 0;line-height:1.7}.humanity-media-admin-body a{color:#38bdf8}.humanity-media-admin .row{margin-top:10px}.humanity-media-action{min-width:105px}.humanity-media-action.danger{border-color:rgba(239,68,68,.35)}
@media(max-width:700px){.humanity-media-admin-card{grid-template-columns:1fr}.humanity-media-thumb,.humanity-media-thumb img{min-height:190px;max-height:250px}}

/* First Aid Education Upgrade — 2026-10-04 */
.firstaid-rich{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.firstaid-rich article{min-height:0;border:1px solid #d9e4f2;border-radius:16px;padding:15px;background:#fff;box-shadow:0 4px 14px rgba(15,35,60,.05)}
.firstaid-rich article b{display:block;font-size:1.08rem;margin-bottom:7px;color:#102a43}
.firstaid-rich article p{line-height:1.8;margin:0;color:#334155}
.firstaid-rich article small{line-height:1.7}
.firstaid-sources{margin-top:16px;border:1px solid #d9e4f2}
.firstaid-sources .button-link{display:inline-flex;align-items:center;justify-content:center;padding:.65rem .9rem;border-radius:10px;background:#eef5ff;color:#0b4f9c;text-decoration:none;font-weight:800}
.firstaid-alert p{line-height:1.8;margin:.5rem 0 0}
@media(max-width:800px){.firstaid-rich{grid-template-columns:1fr}}

/* =========================================================
   FINAL RESPONSIVE REPAIR — V18.2 FIRST-AID FOCUS
   Fixes the large empty vertical area and narrow/clipped content
   when the computer edition is viewed on tablet/phone widths.
   Layout-only: no Firebase, SOS, GPS, map, routing or auth logic.
   ========================================================= */
html,body{max-width:100%;overflow-x:hidden}
@media (max-width:900px){
  body[data-device-mode="computer"] #appView{
    width:100% !important;
    max-width:100% !important;
    min-height:0 !important;
    margin:0 !important;
    overflow-x:hidden !important;
  }
  body[data-device-mode="computer"] #appView>.tabs{
    position:relative !important;
    inset:auto !important;
    width:auto !important;
    height:auto !important;
    min-height:0 !important;
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    padding:8px 10px 12px !important;
    margin:0 10px !important;
    gap:6px !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
  }
  body[data-device-mode="computer"] #appView>.tabs button{
    width:auto !important;
    min-width:max-content !important;
    min-height:43px !important;
    flex:0 0 auto !important;
    margin:0 !important;
    text-align:center !important;
    border-radius:10px !important;
  }
  body[data-device-mode="computer"] #appView>section.tab,
  body[data-device-mode="computer"] #appView>.hero,
  body[data-device-mode="computer"] #appView>.admin-entry,
  body[data-device-mode="computer"] #appView>.role-scope-banner,
  body[data-device-mode="computer"] #appView>.civil-directorate-banner{
    width:auto !important;
    max-width:none !important;
    margin-left:10px !important;
    margin-right:10px !important;
  }
  body[data-device-mode="computer"] main{
    width:100% !important;
    max-width:100% !important;
    padding-left:10px !important;
    padding-right:10px !important;
  }
  body[data-device-mode="computer"] .hero{
    min-height:390px !important;
  }
}
@media (max-width:650px){
  body[data-device-mode="phone"] #appView,
  body[data-device-mode="computer"] #appView{width:100% !important;max-width:100% !important}
  body[data-device-mode="phone"] #appView>section.tab,
  body[data-device-mode="phone"] #appView>.hero,
  body[data-device-mode="phone"] #appView>.admin-entry,
  body[data-device-mode="phone"] #appView>.role-scope-banner,
  body[data-device-mode="phone"] #appView>.civil-directorate-banner{margin-left:0 !important;margin-right:0 !important}
}

/* =========================================================
   V18.2 FINAL LAYOUT REPAIR — 2026-10-05
   Root cause: the computer-mode shell reserves viewport height
   for the former fixed sidebar even after the sidebar is converted
   to normal horizontal navigation on narrow screens. The result is
   a large empty vertical area before .tabs.
   This patch changes layout only.
   ========================================================= */
@media (max-width: 900px){
  html, body, main{
    height:auto !important;
    min-height:0 !important;
  }
  body[data-device-mode="computer"] #appView{
    position:relative !important;
    display:block !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
  }
  body[data-device-mode="computer"] #appView > .hero,
  body[data-device-mode="computer"] #appView > .civil-directorate-banner,
  body[data-device-mode="computer"] #appView > .admin-entry,
  body[data-device-mode="computer"] #appView > .role-scope-banner{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
  }
  body[data-device-mode="computer"] .tabs{
    position:relative !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    left:auto !important;
    float:none !important;
    clear:both !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:10px 0 0 !important;
    padding:8px 8px 12px !important;
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    gap:6px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    box-sizing:border-box !important;
  }
  body[data-device-mode="computer"] .tabs button{
    position:static !important;
    float:none !important;
    flex:0 0 auto !important;
    width:auto !important;
    min-width:max-content !important;
    margin:0 !important;
  }
}
@media (max-width:650px){
  body[data-device-mode="phone"] #appView{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
  }
  body[data-device-mode="phone"] .tabs{
    position:relative !important;
    inset:auto !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    margin:10px 0 0 !important;
  }
}


/* =========================================================
   ANDROID CHROME DESKTOP-SITE FIX — V18.2
   Chrome's "Desktop site" can expose a large CSS viewport even
   though the physical device is a touch phone. Therefore ordinary
   @media(max-width) rules may never run. The runtime marks the
   physical touch device explicitly so computer mode can remain
   computer-styled without reserving the old desktop sidebar/height.
   ========================================================= */
html[data-physical-mobile="true"] body[data-device-mode="computer"],
body[data-physical-mobile="true"][data-device-mode="computer"]{overflow-x:hidden !important}
body[data-physical-mobile="true"][data-device-mode="computer"] #appView{
  position:relative !important;
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  margin:0 !important;
  padding:0 !important;
  overflow-x:hidden !important;
}
body[data-physical-mobile="true"][data-device-mode="computer"] #appView>.tabs{
  position:relative !important;
  inset:auto !important;
  float:none !important;
  clear:both !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  box-sizing:border-box !important;
  margin:10px 0 0 !important;
  padding:8px 8px 12px !important;
  gap:6px !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
body[data-physical-mobile="true"][data-device-mode="computer"] #appView>.tabs button{
  position:static !important;
  flex:0 0 auto !important;
  width:auto !important;
  min-width:max-content !important;
  min-height:43px !important;
  margin:0 !important;
  text-align:center !important;
  border-radius:10px !important;
}
body[data-physical-mobile="true"][data-device-mode="computer"] #appView>section.tab,
body[data-physical-mobile="true"][data-device-mode="computer"] #appView>.hero,
body[data-physical-mobile="true"][data-device-mode="computer"] #appView>.admin-entry,
body[data-physical-mobile="true"][data-device-mode="computer"] #appView>.role-scope-banner,
body[data-physical-mobile="true"][data-device-mode="computer"] #appView>.civil-directorate-banner{
  width:auto !important;
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
}
body[data-physical-mobile="true"][data-device-mode="computer"] #appView>.hero{min-height:390px !important}
body[data-physical-mobile="true"][data-device-mode="computer"] main{
  width:100% !important;
  max-width:100% !important;
  padding-left:10px !important;
  padding-right:10px !important;
  box-sizing:border-box !important;
}
body[data-physical-mobile="true"][data-device-mode="computer"] .topbar,
body[data-physical-mobile="true"][data-device-mode="computer"] .ticker{
  max-width:100% !important;
}

/* Offline-first status: explicitly distinguishes local queue from delivered reports. */
.offline-status-banner{position:sticky;top:0;z-index:1300;padding:10px 16px;border-bottom:1px solid #f59e0b;background:#451a03;color:#fef3c7;font-size:14px;line-height:1.65;font-weight:700;text-align:center}.offline-status-banner[data-state="pending"]{background:#172554;border-color:#60a5fa;color:#dbeafe}.offline-status-banner[hidden]{display:none}


/* Brand identity: professional, technical and humanitarian slogan (2026-10-13) */
.yakadha-brand-slogan{font-weight:800!important;color:#f1c96a!important;line-height:1.8;text-wrap:balance;text-shadow:0 2px 12px rgba(0,0,0,.55)}
.hero-brand-slogan{font-weight:900;color:#f1c96a!important;font-size:clamp(16px,2vw,23px)!important;line-height:1.8;max-width:900px;text-wrap:balance;text-shadow:0 2px 12px rgba(0,0,0,.55);margin:8px 0 4px!important}
.hero-brand-tagline{display:inline-flex;align-items:center;justify-content:center;margin:5px 0 14px;padding:7px 14px;border:1px solid rgba(241,201,106,.55);border-radius:999px;background:rgba(7,17,31,.38);color:#fff;font-weight:800;font-size:clamp(13px,1.5vw,17px)}
@media(max-width:600px){.yakadha-brand-slogan{font-size:15px!important}.hero-brand-slogan{font-size:16px!important}.hero-brand-tagline{white-space:normal;max-width:100%;line-height:1.7}}

/* V18.2 Phase 1+2: smart calling, visible local outbox and operations hints */
.smart-call-panel,.offline-outbox-panel,.ops-intelligence-panel{margin-top:14px}
.smart-call-panel>p{line-height:1.8}
.smart-call-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.smart-call-grid>*{min-width:0;white-space:normal;line-height:1.65;justify-content:center;text-align:center}
.smart-call-share{border:1px solid rgba(245,158,11,.55)!important}
.offline-outbox-panel .feed,.ops-intelligence-panel .feed{display:grid;gap:8px;margin:10px 0}
.ops-intelligence-panel .pill.critical{background:#7f1d1d;color:#fee2e2}
.ops-intelligence-panel .pill.watch{background:#78350f;color:#fef3c7}
.ops-intelligence-panel .item p{line-height:1.7;margin:8px 0}
@media(max-width:620px){.smart-call-grid{grid-template-columns:1fr}.smart-call-grid>*{width:100%;box-sizing:border-box}.smart-call-panel .section-head,.offline-outbox-panel .section-head,.ops-intelligence-panel .section-head{align-items:flex-start;gap:8px;flex-wrap:wrap}}

/* V18.2.2: accessible voice guidance */
.voice-help-panel{margin:12px 0;padding:14px;border:1px solid rgba(37,99,235,.28);border-radius:14px;background:rgba(37,99,235,.055)}
.voice-help-panel h4{margin:0 0 8px;font-size:1.05rem}
.voice-help-panel p{line-height:1.8;margin:6px 0 10px}
.voice-help-panel .row{display:flex;gap:8px;flex-wrap:wrap}
.voice-help-panel .row button{min-height:46px}
#smartCallVoiceStatus{margin-top:10px;line-height:1.8}
@media(max-width:620px){.voice-help-panel .row button{width:100%}}
