.bem-dashboard{--bem-ink:#172b3a;--bem-muted:#60717d;--bem-line:#dce5e9;max-width:1120px;margin:1.5rem auto;color:var(--bem-ink);font:inherit}
.bem-dashboard *{box-sizing:border-box}.bem-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.4rem}
.bem-eyebrow{font-size:.72rem;letter-spacing:.12em;font-weight:700;color:#537080;margin:0 0 .45rem}.bem-header h2{font-size:clamp(1.6rem,3vw,2.3rem);line-height:1.15;margin:0 0 .45rem;color:var(--bem-ink)}
.bem-intro{margin:0;color:var(--bem-muted)}.bem-live{white-space:nowrap;font-size:.8rem;font-weight:700;color:#176b4b;background:#e8f5ee;border-radius:999px;padding:.55rem .8rem}
.bem-live-dot{display:inline-block;width:.55rem;height:.55rem;border-radius:50%;background:#20a36b;margin-right:.35rem}
.bem-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.bem-card{border:1px solid var(--bem-line);border-radius:16px;padding:1.2rem;background:#fff;min-height:190px;box-shadow:0 3px 14px rgba(20,45,60,.045)}
.bem-card-top{display:flex;align-items:center;gap:.55rem;margin-bottom:1.1rem}.bem-icon{display:inline-grid;place-items:center;width:2rem;height:2rem;border-radius:10px;background:#edf4f6;font-size:1.25rem}
.bem-label{font-size:.72rem;letter-spacing:.1em;font-weight:800;color:#5c707d}.bem-card h3{font-size:1.55rem;line-height:1.2;margin:0 0 .45rem;color:var(--bem-ink)}
.bem-detail{color:var(--bem-muted);margin:0 0 .8rem;font-size:.95rem}.bem-meta{font-size:.75rem;color:#72828c;margin:.8rem 0 0}
.bem-alert-list{display:grid;gap:.4rem}.bem-alert-item{font-size:.85rem;padding:.55rem .7rem;border-radius:8px;margin:0;background:#fff4e8;border-left:4px solid #d88725}
.bem-level-1,.bem-level-2{background:#fff0ef;border-left-color:#c63832}.bem-level-3{background:#fff6e8;border-left-color:#d88725}
.bem-footer{margin-top:1.2rem;border-top:1px solid var(--bem-line);padding-top:1rem;color:var(--bem-muted);font-size:.82rem}.bem-footer p{margin:.45rem 0}.bem-footer a{color:#176b9a;text-decoration:underline}
.bem-refresh{border:0;border-radius:8px;background:#174f68;color:white;font:inherit;font-weight:700;padding:.7rem 1rem;cursor:pointer;margin-top:.5rem}.bem-refresh:hover{background:#103c50}.bem-refresh:disabled{opacity:.6;cursor:wait}
@media(max-width:650px){.bem-header{display:block}.bem-live{display:inline-block;margin-top:.9rem}.bem-grid{grid-template-columns:1fr}.bem-card{min-height:0}}

.bem-air-list { display: grid; gap: 8px; margin-top: 12px; }
.bem-air-item { display: grid; gap: 3px; padding: 8px 0; border-top: 1px solid rgba(0,0,0,.10); font-size: .9rem; }
.bem-air-item strong { font-weight: 600; }
.bem-air-item span { opacity: .85; }


/* Interactive Leaflet map */
.bem-map-section{margin:1.25rem 0 1.4rem;border:1px solid var(--bem-line);border-radius:16px;padding:1rem;background:#fff;box-shadow:0 3px 14px rgba(20,45,60,.045)}
.bem-map-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:.8rem}
.bem-map-heading h3{font-size:1.2rem;margin:0 0 .25rem;color:var(--bem-ink)}
.bem-map-heading p{font-size:.88rem;color:var(--bem-muted);margin:0}
.bem-map-status{font-size:.78rem;color:var(--bem-muted);white-space:nowrap}
.bem-map{height:520px;width:100%;border-radius:10px;background:#e9eff1;z-index:1}
.bem-map-attribution{font-size:.72rem;color:#71808a;margin:.65rem 0 0}
.bem-map-popup strong{display:block;margin-bottom:.2rem}
.bem-map-popup span{display:block;font-size:.82rem}
@media(max-width:650px){.bem-map{height:390px}.bem-map-heading{display:block}.bem-map-status{display:block;margin-top:.4rem}}

.bem-location-control{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:.7rem 0 .25rem;font-size:.84rem;color:var(--bem-muted)}
.bem-location-reset{border:1px solid var(--bem-line);border-radius:7px;background:#f7fafb;color:var(--bem-ink);font:inherit;font-weight:600;padding:.45rem .7rem;cursor:pointer}
.bem-location-reset:hover{background:#edf4f6}
@media(max-width:650px){.bem-location-control{align-items:flex-start;flex-direction:column;gap:.5rem}}


.bem-map-options{display:flex;align-items:center;flex-wrap:wrap;gap:.55rem .8rem;margin:.75rem 0 .2rem;padding:.7rem .8rem;border:1px solid var(--bem-line);border-radius:10px;background:#f8fafb;font-size:.82rem}
.bem-map-options>label{font-weight:700;color:var(--bem-ink)}
.bem-map-options select,.bem-custom-thresholds input{font:inherit;border:1px solid #bdcbd2;border-radius:6px;padding:.4rem .5rem;background:#fff;color:var(--bem-ink)}
.bem-map-option-note{color:var(--bem-muted);font-size:.76rem;flex-basis:100%}
.bem-custom-thresholds{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem .8rem;flex-basis:100%}
.bem-custom-thresholds[hidden]{display:none}
.bem-custom-thresholds label{display:flex;align-items:center;gap:.35rem}
.bem-custom-thresholds input{width:5.5rem}
.bem-custom-thresholds button{border:0;border-radius:6px;background:#174f68;color:#fff;font:inherit;font-weight:700;padding:.45rem .7rem;cursor:pointer}
