:root { --workspace-rail: 68px; --workspace-header: 68px; --workspace-metrics: 88px; --workspace-footer: 60px; --ink: #183448; --muted: #687b8d; --line: #dfe7ec; --accent: #087f8c; }
* { box-sizing: border-box; }
body.public-dashboard { margin: 0; padding: 0; height: 100dvh; overflow: hidden; background: #eef3f6; color: var(--ink); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
.public-dashboard [hidden] { display: none !important; }
.public-dashboard button, .public-dashboard input, .public-dashboard select { font: inherit; }
.public-dashboard button, .public-dashboard a { -webkit-tap-highlight-color: transparent; }
.public-dashboard :focus-visible { outline: 3px solid #e7ab3d; outline-offset: 3px; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: fixed; z-index: 10000; top: 8px; left: 8px; padding: 12px; background: white; color: var(--ink); }
.workspace-header { position: fixed; inset: 0 0 auto; height: var(--workspace-header); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 24px; background: #102f43; color: white; border-bottom: 3px solid #dca943; z-index: 1100; }
.workspace-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.workspace-brand img { width: 42px; height: 42px; object-fit: contain; }
.workspace-brand strong { font-size: 20px; letter-spacing: .07em; color: white; }
.brand-dot { color: #e7b04f; }
.workspace-brand small { display: block; color: #b9cedb; font-size: 11px; margin-top: 2px; }
.workspace-context { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #d3e3ed; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #70d4bd; }
.workspace-header #status-atualizacao { max-width: 36%; color: #d3e3ed; font-size: 11px; text-align: right; }
.workspace-rail { position: fixed; left: 0; top: var(--workspace-header); bottom: 0; width: var(--workspace-rail); display: flex; flex-direction: column; padding: 12px 8px; background: #fff; border-right: 1px solid var(--line); z-index: 1100; overflow: auto; scrollbar-width: thin; }
.workspace-rail button { display: flex; align-items: center; justify-content: flex-start; gap: 13px; width: 100%; min-height: 46px; padding: 12px 13px; margin-bottom: 5px; border: 0; background: transparent; border-radius: 10px; color: #556d7e; cursor: pointer; white-space: nowrap; }
.workspace-rail svg { width: 23px; height: 23px; flex: 0 0 23px; }
.workspace-rail button span { display: none; font-size: 13px; font-weight: 600; }
.workspace-rail button:hover { background: #f0f5f8; color: #183448; }
.workspace-rail button.is-active { color: #087f8c; background: #e6f4f3; }
#rail-toggle { margin-bottom: 17px; }
.rail-signature { margin-top: auto; text-align: center; color: #95a6b2; font-size: 10px; padding-top: 20px; }
.public-dashboard.menu-expanded { --workspace-rail: 214px; }
.menu-expanded .workspace-rail button span { display: inline; }
.workspace { position: fixed; inset: var(--workspace-header) 0 var(--workspace-footer) var(--workspace-rail); }
.workspace-metrics { height: var(--workspace-metrics); display: grid; grid-template-columns: 1fr 1fr 1fr 1.4fr; align-items: center; padding: 12px 28px; gap: 24px; background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 1000; }
.workspace-metrics article { padding-left: 20px; border-left: 1px solid var(--line); min-width: 0; }
.workspace-metrics article:first-child { border: 0; padding-left: 0; }
.workspace-metrics article > span:first-child { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-bottom: 5px; }
.workspace-metrics strong { display: block; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.04em; }
.workspace-metrics article:first-child strong { color: var(--accent); }
.workspace-metrics .metric-focus strong { font-size: 15px; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-map { position: absolute; inset: var(--workspace-metrics) 0 0; }
.workspace-map #mapa { width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; background: #e6eef0; }
.workspace-map .multirrisco-map-loading { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 1000; width: max-content; max-width: calc(100% - 32px); padding: 10px 18px; background: white; color: #183448; text-align: center; overflow-wrap: anywhere; pointer-events: none; border: 1px solid #dfe7ec; border-radius: 24px; box-shadow: 0 4px 24px #18344822; }
.workspace-map-caption { position: absolute; z-index: 900; top: 14px; right: 94px; display: flex; gap: 8px; pointer-events: none; max-width: calc(100% - 160px); }
.workspace-map-caption span { padding: 7px 11px; font-size: 11px; background: #ffffffed; border: 1px solid #dfe7ec; border-radius: 6px; box-shadow: 0 2px 10px #102f4310; }
.workspace-panel { position: absolute; top: calc(var(--workspace-metrics) + 14px); bottom: 14px; left: 14px; width: min(390px, calc(100% - 28px)); background: #fff; z-index: 1050; border: 1px solid #dbe5eb; border-radius: 18px; box-shadow: 0 16px 48px #14324a24; display: flex; flex-direction: column; overflow: hidden; }
.workspace-panel[data-panel="analises"] { width: min(600px, calc(100% - 28px)); }
.workspace-panel[data-panel="alertas"] { width: min(740px, calc(100% - 28px)); }
.workspace-panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; background: linear-gradient(120deg, #f4f9fb, #fff); }
.workspace-panel-heading h2 { margin: 0; font-size: 17px; font-weight: 650; }
.workspace-panel-heading button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: #edf3f6; color: var(--ink); font-size: 22px; cursor: pointer; }
.workspace-panel-body { padding: 20px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; min-height: 0; }
.workspace-panel-body .dashboard, .workspace-panel-body .alerta-form-panel, .workspace-panel-body .alerta-form-section { padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; min-width: 0; background: transparent; }
.workspace-panel-body .alerta-section-header { margin: 0 0 16px; }
.workspace-panel-body .alerta-section-title { font-size: 14px; }
#panel-filtros .alerta-section-header, #panel-ranking .alerta-section-header, #panel-evolucao .alerta-section-header { display: none; }
.workspace-panel-body .multirrisco-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }
.workspace-panel-body .form-group { min-width: 0; margin: 0; }
#panel-filtros .form-group:has(#filtro_uc), #panel-filtros .form-group:has(#filtro_ti) { grid-column: 1 / -1; }
.workspace-panel-body label { font-size: 11px; font-weight: 600; color: #4c6476; }
.workspace-panel-body input:not([type="checkbox"]):not([type="radio"]), .workspace-panel-body select { width: 100%; min-width: 0; min-height: 41px; padding: 9px; border: 1px solid #d8e2e9; border-radius: 8px; background: #f8fafc; font-size: 12px; color: var(--ink); }
.workspace-panel-body .alerta-form-actions { margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.workspace-panel-body .btn { min-height: 40px; border-radius: 8px; padding: 10px 13px; font-size: 12px; font-weight: 600; }
.public-dashboard .btn-primary { background: #087f8c; border-color: #087f8c; color: white; }
.public-dashboard .btn-secondary { background: #f0f5f8; border-color: #dfe7ec; color: #28475c; }
#panel-camadas input { position: static; opacity: 1; pointer-events: auto; width: 17px; height: 17px; flex-shrink: 0; accent-color: #087f8c; }
#panel-camadas label:has(input:checked) { background: #edf8f6; border-color: #beded8; }
#workspace-map-legend { display: grid; gap: 6px; padding: 6px; }
#workspace-map-legend .legenda-mapa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 8px; min-width: 0; padding: 0; border: 0; box-shadow: none; border-radius: 0; background: transparent; font-size: 11px; }
#workspace-map-legend .legenda-mapa > strong { grid-column: 1 / -1; font-size: 11px; line-height: 1.2; margin: 0; }
#workspace-map-legend .legenda-item { font-size: 10px; margin: 0; gap: 4px; min-height: 16px; min-width: 0; line-height: 1.25; overflow-wrap: anywhere; }
#workspace-map-legend .legenda-cor, #workspace-map-legend .legenda-ubm-icon { flex-shrink: 0; }
#workspace-map-legend .legenda-ubm-icon { width: 18px; height: 18px; }
.public-alert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) {
  .public-alert-grid { grid-template-columns: minmax(0, 1fr); }
}
#panel-analises .workspace-panel-body { background: #f5f8fa; }
#panel-analises #btnGerarRelatorio { width: 100%; }
@media (max-width: 600px) {
  #panel-analises .workspace-panel-body { padding: 12px; }
}
.public-analysis-nav { display: grid; gap: 10px; margin-bottom: 24px; }
.public-analysis-nav a { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; text-decoration: none; }
.public-analysis-nav a:hover { border-color: #087f8c; background: #edf8f6; }
.public-analysis-nav strong { font-size: 14px; }
.public-analysis-nav span, .public-analysis-report p { color: #687b8d; font-size: 12px; line-height: 1.6; }
.public-analysis-report h3 { font-size: 15px; margin: 0 0 10px; }
.public-analysis-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.public-analysis-filter-grid .form-group:has(#filtroEvento), .public-analysis-actions { grid-column: 1 / -1; }
.public-analysis-action-buttons, .public-analysis-action-buttons button { width: 100%; }
@media (max-width: 600px) { .public-analysis-filter-grid { grid-template-columns: minmax(0, 1fr); } }
#panel-alertas .public-section-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
#panel-alertas .public-section-meta .analises-chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.public-alert-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; overflow-wrap: anywhere; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.public-alert-card:focus-within { border-color: #78bdb8; background: #f5fbfa; box-shadow: 0 4px 14px #14324a12; }
@media (hover: hover) {
  .public-alert-card:hover { border-color: #78bdb8; background: #f5fbfa; box-shadow: 0 4px 14px #14324a12; }
}
.public-alert-actions { display: flex; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.public-alert-actions .btn { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 100%; white-space: normal; text-align: center; line-height: 1.4; }
.public-alert-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.public-alert-head > div { min-width: 0; }
.public-alert-number { font-size: 11px; color: var(--muted); }
.public-alert-head h3 { margin: 6px 0 12px; font-size: 16px; }
.public-alert-meta { display: grid; gap: 6px; font-size: 12px; line-height: 1.5; color: #536e80; }
.public-alert-region { margin: 0; font-size: 12px; line-height: 1.5; }
.public-alert-image { margin: 0; min-width: 0; }
.public-alert-image img { display: block; max-width: 100%; max-height: 220px; width: auto; height: auto; margin: 0 auto; object-fit: contain; }
.public-alert-image figcaption { margin-top: 8px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.public-alert-severity { border-radius: 5px; padding: 5px; background: #f6ece2; font-size: 10px; }
.public-section-header h2 { display: none; }
.public-section-meta { margin-bottom: 18px; font-size: 11px; }
.workspace-panel-body .multirrisco-chart-container { height: 230px; min-height: 230px; }
.about-brand { font-size: 24px; font-weight: 750; letter-spacing: .03em; }
.about-brand span { color: #087f8c; }
#panel-sobre p { font-size: 13px; line-height: 1.7; color: #536e80; }
.about-facts { font-size: 12px; margin: 24px 0; }
.about-facts div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.about-facts dt { color: var(--muted); margin-bottom: 5px; }
.about-facts dd { margin: 0; font-weight: 600; }
#panel-sobre a { color: #087f8c; font-size: 12px; }
.public-dashboard .leaflet-control-zoom { border: 1px solid #d3dee5; box-shadow: 0 3px 12px #14324a20; }
.public-dashboard .modal, .public-dashboard .modal-territorio { z-index: 3000; }
.public-dashboard .modal-territorio-dialog { max-height: 90dvh; }
.public-dashboard .modal { position: fixed; inset: 0; background: #102f4366; align-items: center; justify-content: center; }
.public-dashboard #modalIRP { padding: 16px; backdrop-filter: blur(9px); }
.public-dashboard #modalIRP.is-open { display: flex; }
.public-dashboard .irp-modal-conteudo { width: min(640px, 100%); max-width: 640px; max-height: calc(100dvh - 32px); margin: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #dbe5eb; border-radius: 24px; background: #fff; box-shadow: 0 30px 100px #102f4355; text-align: left; }
.public-dashboard .irp-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px; background: #102f43; color: #fff; flex-shrink: 0; }
.public-dashboard .irp-modal-heading { min-width: 0; }
.public-dashboard .irp-modal-kicker { font-size: 10px; letter-spacing: .12em; color: #80d7c8; text-transform: uppercase; }
.public-dashboard .irp-modal-heading h3 { margin: 8px 0 10px; font-size: 22px; line-height: 1.25; color: #fff; }
.public-dashboard .irp-modal-heading p { margin: 0; font-size: 13px; line-height: 1.6; color: #c6d8e3; }
.public-dashboard .irp-modal-close { width: 42px; height: 42px; flex-shrink: 0; padding: 0; border: 1px solid #ffffff26; border-radius: 10px; background: #ffffff12; color: #fff; font-size: 24px; cursor: pointer; }
.public-dashboard .irp-modal-body { min-height: 0; padding: 24px; overflow: auto; background: #f5f8fb; }
.public-dashboard .irp-modal-body > p { margin: 0 0 20px; font-size: 13px; line-height: 1.6; color: #536e80; }
.public-dashboard .irp-modal-peso-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.public-dashboard .irp-peso-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 10px; border: 1px solid #dce7ed; border-top: 4px solid var(--severity); border-radius: 12px; background: #fff; }
.public-dashboard .irp-peso-item:nth-child(1) { --severity: #15803d; }
.public-dashboard .irp-peso-item:nth-child(2) { --severity: #eab308; }
.public-dashboard .irp-peso-item:nth-child(3) { --severity: #ea580c; }
.public-dashboard .irp-peso-item:nth-child(4) { --severity: #dc2626; }
.public-dashboard .irp-peso-item:nth-child(5) { --severity: #7c3aed; }
.public-dashboard .irp-peso-item strong { font-size: 12px; line-height: 1.4; }
.public-dashboard .irp-peso-item span { font-size: 12px; color: #536e80; }
.public-dashboard .irp-modal-callout { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; padding: 16px; border: 1px solid #c5e3df; border-radius: 12px; background: #eaf6f3; font-size: 13px; line-height: 1.6; color: #35596e; }
.public-dashboard .irp-modal-footer { display: flex; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid #dfe7ec; flex-shrink: 0; }
.public-dashboard .irp-modal-footer .btn { min-height: 44px; border-radius: 10px; padding: 10px 22px; }
@media (max-width: 600px) {
  .public-dashboard #modalIRP { padding: 12px; }
  .public-dashboard .irp-modal-conteudo { max-height: calc(100dvh - 24px); border-radius: 20px; }
  .public-dashboard .irp-modal-header, .public-dashboard .irp-modal-body { padding: 20px; }
  .public-dashboard .irp-modal-heading h3 { font-size: 19px; }
  .public-dashboard .irp-modal-peso-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-dashboard .irp-peso-item:last-child { grid-column: 1 / -1; }
  .public-dashboard .irp-modal-footer { padding: 14px 20px; }
}
.public-dashboard .analises-modal-dialog { max-height: 90dvh; overflow: auto; }
@media (max-width: 900px) { .workspace-context { display: none; } .workspace-metrics { padding: 12px 18px; gap: 12px; } .workspace-metrics article { padding-left: 12px; } }
@media (max-width: 600px) {
  :root { --workspace-rail: 54px; --workspace-header: 60px; --workspace-metrics: 76px; }
  .workspace-header { padding: 0 12px; gap: 10px; }
  .workspace-brand { gap: 8px; } .workspace-brand img { width: 32px; height: 32px; } .workspace-brand strong { font-size: 14px; } .workspace-brand small { font-size: 9px; }
  .workspace-header #status-atualizacao { max-width: 34%; font-size: 9px; }
  .workspace-rail { padding: 10px 4px; } .workspace-rail button { padding: 11px 12px; min-height: 46px; }
  .public-dashboard.menu-expanded { --workspace-rail: 54px; } .menu-expanded .workspace-rail { width: 204px; box-shadow: 8px 0 30px #14324a30; }
  .public-dashboard.menu-expanded .workspace-panel { left: 158px; width: calc(100% - 166px); }
  .public-dashboard.menu-expanded .workspace-panel-heading h2 { min-width: 0; overflow-wrap: anywhere; }
  .public-dashboard.menu-expanded .workspace-panel-heading > div { min-width: 0; }
  .public-dashboard.menu-expanded .workspace-panel-heading button { flex-shrink: 0; }
  .public-dashboard.menu-expanded .workspace-panel-body { overflow-wrap: anywhere; }
  .public-dashboard.menu-expanded .territory-segments, .public-dashboard.menu-expanded .workspace-panel-body .multirrisco-filter-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-metrics { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; } .workspace-metrics .metric-focus { display: none; }
  .workspace-metrics article { padding-left: 8px; } .workspace-metrics article > span:first-child { font-size: 9px; line-height: 1.3; } .workspace-metrics strong { font-size: 23px; }
  .workspace-panel-body { padding: 16px; } .workspace-panel-heading { padding: 14px 16px; }
  #panel-filtros .form-group:has(#data_inicio), #panel-filtros .form-group:has(#data_fim) { grid-column: 1 / -1; }
  .workspace-map-caption { top: auto; bottom: 32px; right: 8px; gap: 4px; max-width: calc(100% - 16px); } .workspace-map-caption span { font-size: 9px; padding: 5px; }
}
@media (prefers-reduced-motion: reduce) { .public-dashboard *, .public-dashboard *::before, .public-dashboard *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.severity-baixo {
    background: rgba(21, 128, 61, 0.16);
    color: #166534;
}
.severity-moderado {
    background: rgba(255, 224, 0, 0.28);
    color: #806f00;
}
.severity-alto {
    background: rgba(255, 123, 0, 0.18);
    color: #aa4f00;
}
.severity-muito-alto {
    background: rgba(255, 29, 8, 0.15);
    color: #b51d0d;
}
.severity-extremo {
    background: rgba(122, 40, 198, 0.16);
    color: #6820a9;
}

.workspace-rail { bottom: var(--workspace-footer); background: #f8fafc; }
.workspace-rail .rail-item { border: 1px solid transparent; }
.workspace-rail .rail-item.is-active { border-color: #c7e3df; box-shadow: inset 3px 0 #087f8c; }
.rail-group-label { display: none; }
.menu-expanded .rail-group-label { display: block; font-size: 9px; font-weight: 650; letter-spacing: .1em; color: #8b9ea9; padding: 10px 14px; }
.panel-context { display: block; font-size: 10px; font-weight: 500; color: #6b889a; margin-bottom: 5px; }
.header-access { border: 1px solid #ffffff35; background: #ffffff12; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.header-access:hover { background: #ffffff25; }
.layer-group { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.layer-group legend { margin: 0 0 12px; color: #668193; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.layer-option { display: flex; align-items: center; gap: 12px; padding: 13px; margin: 8px 0; border: 1px solid #e0e8ed; border-radius: 12px; cursor: pointer; }
.layer-option strong { display: block; font-size: 12px; color: #27495d; font-weight: 600; }
.layer-option small { display: block; margin-top: 4px; font-size: 10px; color: #718697; font-weight: 400; }
.territory-segments { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.territory-segments label { display: flex; align-items: center; gap: 8px; border: 1px solid #dfe7ec; border-radius: 10px; padding: 12px 8px; cursor: pointer; }
.workspace-footer { position: fixed; bottom: 0; left: 0; right: 0; height: var(--workspace-footer); z-index: 1200; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 24px; border-top: 1px solid #315268; background: #102f43; }
.workspace-footer p { margin: 3px 0; font-size: 10px; line-height: 1.4; color: #c6d8e3; }
.workspace-footer strong { font-weight: 600; color: #fff; }
.workspace-footer nav { display: flex; gap: 18px; flex-shrink: 0; }
.workspace-footer a { color: #e3edf3; font-size: 10px; text-decoration: none; }
.workspace-footer a:hover { text-decoration: underline; }
.map-legend { position: absolute; right: 14px; bottom: 32px; z-index: 1000; width: 290px; max-width: calc(100% - 28px); background: #ffffffed; backdrop-filter: blur(10px); border: 1px solid #d7e3e8; border-radius: 14px; box-shadow: 0 8px 28px #14324a18; }
.map-legend summary { list-style: none; padding: 6px 12px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #35596e; font-weight: 650; cursor: pointer; }
.map-legend summary::-webkit-details-marker { display: none; }
.map-legend[open] summary { border-bottom: 1px solid #e3ebef; }
.map-legend:not([open]) { width: 112px; }
.map-legend:not([open]) summary span { transform: rotate(180deg); }
.workspace-dialog { width: min(600px, calc(100% - 24px)); height: min(740px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #dde7ec; border-radius: 20px; background: #fff; box-shadow: 0 30px 100px #102f4355; overflow: hidden; color: var(--ink); }
.workspace-dialog:not([open]) { display: none; }
.workspace-dialog[open] { display: flex; flex-direction: column; }
.workspace-dialog::backdrop { background: #102f4380; backdrop-filter: blur(5px); }
.workspace-dialog.legal-dialog { width: min(900px, calc(100% - 24px)); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 24px; background: #f5f9fb; border-bottom: 1px solid #dfe7ec; flex-shrink: 0; }
.dialog-heading small { color: #698595; font-size: 9px; letter-spacing: .12em; }
.dialog-heading h2 { font-size: 17px; margin: 4px 0 0; }
.dialog-heading button { border: 0; border-radius: 10px; width: 42px; height: 42px; font-size: 24px; background: #e8f0f4; cursor: pointer; flex-shrink: 0; }
.workspace-dialog iframe { border: 0; width: 100%; min-height: 0; flex: 1; background: #fff; }
.map-help-dialog { width: min(960px, calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 32px); color: #183448; }
.map-help-dialog .dialog-heading { background: #102f43; color: #fff; }
.map-help-dialog .dialog-heading small { color: #80d7c8; }
.map-help-dialog .dialog-heading button { min-width: 44px; min-height: 44px; border: 1px solid #ffffff26; background: #ffffff12; color: #fff; }
.map-help-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 20px 24px; font-size: 13px; line-height: 1.7; color: #536e80; }
.map-help-body > p { margin: 0 0 16px; }
.map-help-hero, .map-help-highlight { padding: 16px; border: 1px solid #dfe7ec; border-radius: 12px; background: #f0f6f8; margin-bottom: 16px; }
.map-help-hero-copy strong { color: #183448; font-size: 15px; }
.map-help-hero-copy p, .map-help-highlight-copy p { margin: 6px 0 12px; }
.map-help-pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.map-help-pill { border-radius: 8px; padding: 6px 10px; font-size: 11px; background: #e6f4f3; color: #087f8c; }
.map-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.map-help-card { min-width: 0; border: 1px solid #dfe7ec; border-radius: 12px; padding: 18px; background: #f8fafc; }
.map-help-card-flow { grid-column: 1 / -1; }
.map-help-card-kicker { color: #687b8d; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.map-help-card h3, .map-help-highlight h3 { margin: 4px 0 10px; color: #087f8c; font-size: 16px; }
.map-help-lista, .map-help-sequencia { margin: 0; padding-left: 20px; }
.map-help-lista li + li, .map-help-sequencia li + li { margin-top: 8px; }
.map-help-sequencia li::marker { color: #087f8c; font-weight: 700; }
.map-help-legenda-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.map-help-legenda-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; background: #fff; font-size: 12px; }
.map-help-legenda-item i { flex-shrink: 0; }
.map-help-legenda-fogo, .map-help-legenda-compdec, .map-help-legenda-ubm { display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; }
.map-help-legenda-fogo { border: 2px dashed #d94f04; border-radius: 50%; background: #d94f041a; }
.map-help-legenda-compdec { border-radius: 50%; background: #047857; box-shadow: 0 0 0 3px #0478572e; }
.map-help-legenda-ubm { border-radius: 2px; background: #7c3aed; transform: rotate(45deg); }
.map-help-footer { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 14px 24px; border-top: 1px solid #dfe7ec; background: #f5f9fb; flex-shrink: 0; }
.map-help-footer p { flex: 1; margin: 0; color: #687b8d; font-size: 12px; line-height: 1.5; }
.map-help-footer .btn { min-height: 44px; padding: 10px 22px; border: 1px solid #087f8c; border-radius: 10px; background: #087f8c; color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.map-help-dialog :focus-visible { outline: 3px solid #e7ab3d; outline-offset: 3px; }
@media (max-width: 600px) {
  .map-help-body { padding: 16px; }
  .map-help-grid, .map-help-legenda-grid { grid-template-columns: minmax(0, 1fr); }
  .map-help-card { padding: 14px; }
  .map-help-footer { padding: 12px 16px; flex-wrap: wrap; }
  .map-help-footer p { flex-basis: 100%; font-size: 11px; }
}
#auth-loading { padding: 24px; font-size: 13px; color: #698595; }
@media (max-width: 900px) { .workspace-header #status-atualizacao { display: none; } }
@media (max-width: 600px) {
  :root { --workspace-footer: 94px; }
  .header-access { padding: 8px 10px; font-size: 11px; }
  .workspace-panel { left: 10px; top: calc(var(--workspace-metrics) + 10px); bottom: 10px; width: calc(100% - 20px); border-radius: 14px; }
  .workspace-panel[data-panel="analises"], .workspace-panel[data-panel="alertas"] { width: calc(100% - 20px); }
  .workspace-map-caption { top: 14px; bottom: auto; right: 90px; max-width: calc(100% - 140px); }
  .workspace-map-caption span:first-child { display: none; }
  .workspace-map-caption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .map-legend { bottom: 32px; right: 10px; }
  .workspace-footer { flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 10px 14px; }
  .workspace-footer p { font-size: 9px; } .workspace-footer nav { gap: 18px; } .workspace-footer a { font-size: 10px; }
  .dialog-heading { padding: 14px 16px; } .dialog-heading h2 { font-size: 15px; }
}

@media (max-height: 500px) {
  .map-legend[open] { position: fixed; right: 10px; bottom: 10px; width: 520px; max-width: calc(100vw - 20px); }
}
@media (max-height: 500px) and (min-width: 480px) {
  #workspace-map-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  #workspace-map-legend > .fire-density-legend { grid-column: 2; grid-row: 1; }
  #workspace-map-legend > .legenda-mapa { grid-column: 1; grid-row: 1 / span 2; }
  #workspace-map-legend > .legenda-mapa + .legenda-mapa { grid-column: 2; grid-row: 2; }
}

/* Authentication shares the public map context. */
.access-dialog { width: min(500px, calc(100% - 24px)); height: min(700px, calc(100dvh - 32px)); border: 0; border-radius: 24px; }
.access-dialog[data-auth-stage="login"] { height: min(560px, calc(100dvh - 32px)); }
.access-dialog[data-auth-stage="verify"] { height: min(660px, calc(100dvh - 32px)); }
.access-dialog[data-auth-stage="recovery"] { height: min(620px, calc(100dvh - 32px)); }
.access-dialog .dialog-heading { background: #102f43; color: white; padding: 22px 24px; }
.access-dialog .dialog-heading small { color: #80d7c8; }
.access-dialog .dialog-heading h2 { font-size: 18px; }
.access-dialog .dialog-heading button { background: #ffffff12; color: white; border: 1px solid #ffffff26; }
.access-dialog::backdrop { background: #102f4366; backdrop-filter: blur(9px); }
@media (max-width: 600px) { .access-dialog .dialog-heading { padding: 18px; } .access-dialog .dialog-heading h2 { font-size: 16px; } }
