/* ============ TABS ============ */
.tab {
  padding: 0 18px; display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.78); cursor: pointer;
  font-size: 14px; font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
}
.tab:hover { color: white; background: rgba(255,255,255,0.06); }
.tab.active { color: white; border-bottom-color: var(--caixa-orange); background: rgba(255,255,255,0.08); }
.tab .dot { width: 10px; height: 10px; border-radius: 50%; }
.tab[data-tab="sust"] .dot { background: var(--caixa-green); }
.tab[data-tab="obras"] .dot { background: var(--caixa-teal); }
.tab[data-tab="ppp"] .dot { background: var(--caixa-yellow); }
.tab[data-tab="log"] .dot { background: var(--caixa-orange); }
.tab[data-tab="desastres"] .dot { background: #D7263D; }
.tab .count {
  font-size: 11px; opacity: 0.7; background: rgba(255,255,255,0.12);
  padding: 2px 6px; border-radius: 10px; margin-left: auto;
}

/* ============ THEME TAGS ============ */
.theme-sust  { background: var(--caixa-green); }
.theme-obras { background: var(--caixa-teal); }
.theme-ppp   { background: var(--caixa-yellow); color: var(--caixa-blue-darker) !important; }
.theme-log   { background: var(--caixa-orange); }
.theme-desastres { background: #D7263D; }

/* ============ KPI cards ============ */
.kpis {
  padding: 14px 20px; display: grid;
  grid-template-columns: repeat(2, 1fr); gap: 10px;
  border-bottom: 1px solid var(--border);
}
.kpi { background: var(--bg); border-radius: 8px; padding: 12px; }
.kpi .val { font-size: 22px; font-weight: 700; color: var(--caixa-blue-darker); line-height: 1.1; }
.kpi .lbl { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.3px; }

/* ============ FRENTE cards ============ */
.frentes { padding: 12px 14px 80px; }
.frente {
  border-radius: 8px; padding: 12px; cursor: pointer; margin-bottom: 8px;
  transition: all 0.15s;
  background: var(--bg); border: 1px solid var(--border);
}
.frente:hover { border-color: var(--caixa-blue); background: white; box-shadow: 0 2px 8px rgba(0,92,169,0.08); }
.frente.active { border-color: var(--caixa-blue); background: white; box-shadow: 0 2px 8px rgba(0,92,169,0.15); }
.frente .row { display: flex; align-items: center; gap: 8px; }
.frente .id {
  background: var(--caixa-blue); color: white;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 3px;
  min-width: 30px; text-align: center;
}
.frente .name { font-size: 13px; font-weight: 600; color: var(--caixa-blue-darker); flex: 1; line-height: 1.2; }
.frente .ger { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.frente .stats { display: flex; gap: 14px; margin-top: 8px; }
.frente .stat { display: flex; flex-direction: column; }
.frente .stat .v { font-size: 15px; font-weight: 700; color: var(--caixa-blue); }
.frente .stat .l { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }

/* ============ DETAIL CARD (sidebar right) ============ */
.detail-card { padding: 0; }
.detail-card .head {
  background: var(--caixa-blue-dark); color: white;
  padding: 16px; border-radius: 8px 8px 0 0;
  margin: -20px -20px 16px;
}
.detail-card .head .id-tag {
  display: inline-block; background: var(--caixa-orange); color: white;
  padding: 2px 8px; border-radius: 3px;
  font-size: 11px; font-weight: 700;
}
.detail-card .head h3 { font-size: 17px; font-weight: 600; margin-top: 8px; line-height: 1.3; }
.detail-card .head .sub { font-size: 12px; opacity: 0.85; margin-top: 4px; }

.detail-rows { display: grid; gap: 8px; margin-bottom: 14px; }
.detail-row {
  display: grid; grid-template-columns: 100px 1fr; gap: 8px;
  padding: 6px 0; font-size: 12px;
  border-bottom: 1px dashed var(--border);
}
.detail-row .k { color: var(--text-muted); text-transform: uppercase; font-size: 10px; letter-spacing: 0.3px; padding-top: 2px; }
.detail-row .v { color: var(--text); font-weight: 500; }
.detail-row .v.tag { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; }

.layers-info { background: var(--bg); border-radius: 8px; padding: 12px; margin-top: 16px; }
.layers-info h4 { font-size: 11px; color: var(--caixa-blue-darker); margin-bottom: 8px; text-transform: uppercase; font-weight: 700; }
.layers-info ul { list-style: none; }
.layers-info li { font-size: 12px; padding: 3px 0; color: var(--text-muted); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.actions button {
  padding: 8px 14px; border: 1px solid var(--caixa-blue);
  background: white; color: var(--caixa-blue);
  border-radius: 4px; font-size: 12px; cursor: pointer; font-weight: 500;
}
.actions button.primary { background: var(--caixa-blue); color: white; }
.actions button:hover { box-shadow: 0 2px 6px rgba(0,92,169,0.2); }

/* ============ RISCO color codes ============ */
.risco-critico { background: #DC2626 !important; color: white; }
.risco-alto    { background: var(--caixa-orange) !important; color: white; }
.risco-medio   { background: var(--caixa-yellow) !important; color: var(--caixa-blue-darker); }
.risco-indef   { background: var(--text-muted) !important; color: white; }

/* ============ PPP IP lamp types ============ */
.lamp-led   { color: var(--caixa-green); }
.lamp-vapor { color: var(--caixa-orange); }

/* ============ Status pills ============ */
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.status-on   { background: #D1FAE5; color: #065F46; }
.status-off  { background: #FEE2E2; color: #991B1B; }
.status-warn { background: #FEF3C7; color: #92400E; }

/* ============ LOGIN ============ */
.login-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background:
    radial-gradient(circle at 20% 20%, rgba(241,143,42,0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(0,168,89,0.10) 0%, transparent 45%),
    linear-gradient(135deg, #002752 0%, #003366 45%, #005CA9 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease-out;
}
.login-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.login-bg-pattern {
  position: absolute; inset: 0; opacity: 0.06; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.login-card {
  position: relative;
  width: 100%; max-width: 420px;
  background: white; border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05);
  overflow: hidden;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.login-header {
  background: var(--caixa-blue-dark); color: white;
  padding: 28px 32px 24px; position: relative;
}
.login-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--caixa-orange) 0%, var(--caixa-yellow) 50%, var(--caixa-orange) 100%);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.login-brand .caixa-logo {
  width: 48px; height: 48px;
  background-image: url('../assets/logo_CAIXA.png');
  background-color: white;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 8px;
  padding: 4px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.login-brand .brand-text h1 { font-size: 18px; font-weight: 600; letter-spacing: 0.2px; line-height: 1.2; }
.login-brand .brand-text .sub { font-size: 12px; opacity: 0.8; margin-top: 2px; }
.login-header h2 { font-size: 22px; font-weight: 600; line-height: 1.2; }
.login-header .desc { font-size: 13px; opacity: 0.85; margin-top: 6px; line-height: 1.4; }

.login-body { padding: 28px 32px 24px; }
.login-field { margin-bottom: 16px; }
.login-field label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--caixa-blue-darker); text-transform: uppercase;
  letter-spacing: 0.4px; margin-bottom: 6px;
}
.login-field .input-wrap { position: relative; }
.login-field input {
  width: 100%; padding: 11px 12px; padding-right: 38px;
  font-size: 14px; color: var(--text);
  border: 1.5px solid var(--border); border-radius: 6px;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.login-field input:focus { outline: none; border-color: var(--caixa-blue); box-shadow: 0 0 0 3px rgba(0,92,169,0.12); }
.login-field input::placeholder { color: #9CA3AF; }
.login-field .toggle-pwd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--text-muted); font-size: 16px;
  line-height: 1; border-radius: 4px;
}
.login-field .toggle-pwd:hover { background: var(--bg); color: var(--caixa-blue); }

.login-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: 12px; }
.login-row label { display: flex; align-items: center; gap: 7px; cursor: pointer; color: var(--text-muted); }
.login-row label input { cursor: pointer; accent-color: var(--caixa-blue); }
.login-row .help { color: var(--caixa-blue); text-decoration: none; }
.login-row .help:hover { text-decoration: underline; }

.login-error {
  background: #FEE2E2; color: #991B1B;
  border-left: 3px solid #DC2626;
  padding: 9px 12px; border-radius: 4px; font-size: 12.5px;
  margin-bottom: 14px; display: none; align-items: center; gap: 8px;
  line-height: 1.35;
}
.login-error.show { display: flex; animation: shake 0.4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

.login-btn {
  width: 100%; padding: 12px; font-size: 14px; font-weight: 600;
  background: var(--caixa-orange); color: white;
  border: none; border-radius: 6px; cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(241,143,42,0.3);
}
.login-btn:hover { background: #E07F1F; box-shadow: 0 4px 12px rgba(241,143,42,0.4); }
.login-btn:active { transform: translateY(1px); }
.login-btn:disabled { background: #C5C9CE; cursor: wait; box-shadow: none; }

.login-footer {
  padding: 14px 32px; background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
}
.login-footer .badge-restrito {
  background: var(--caixa-orange); color: white;
  padding: 3px 8px; border-radius: 10px;
  font-weight: 700; letter-spacing: 0.3px; font-size: 10px;
  text-transform: uppercase;
}

.login-hint {
  margin-top: 14px; padding: 10px 12px;
  background: #EFF6FF; border: 1px dashed #93C5FD;
  border-radius: 6px; font-size: 11.5px; color: #1E40AF;
  line-height: 1.4;
}
.login-hint strong { color: #1E3A8A; }

/* ============ V2 Pipeline Badge (frente card · F2 zones) ============ */
.v2-badge {
  margin-top: 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(45, 165, 121, 0.10), rgba(0, 145, 181, 0.08));
  border-left: 3px solid #2DA579;
  border-radius: 4px;
}
.v2-badge-title {
  font-size: 12px;
  font-weight: 600;
  color: #2DA579;
  line-height: 1.3;
}
.v2-badge-sub {
  margin-top: 3px;
  font-size: 10px;
  color: #5B6166;
  line-height: 1.35;
}

/* ============ Legend divider + polygon swatch ============ */
.legend-divider {
  margin: 10px 0 6px;
  padding-top: 8px;
  border-top: 1px solid #eaeaea;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #888;
}
.marker.poly {
  border-radius: 2px !important;
  opacity: 0.55;
}

/* ============ V2 Help Button (?) + Modal ============ */
.v2-help-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  margin-left: 6px;
  background: #2DA579;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  vertical-align: middle;
  transition: background 0.12s;
}
.v2-help-btn:hover { background: #1F8B6B; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.15s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: #fff;
  border-radius: 10px;
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.30);
  overflow: hidden;
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid #E5E7EB;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, #2DA579, #0091B5);
  color: #fff;
}
.modal-tag {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.6px;
  opacity: 0.85; margin-bottom: 4px;
}
.modal-head h3 {
  margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3;
}
.modal-close {
  background: rgba(255,255,255,0.15); color: #fff;
  border: none; width: 32px; height: 32px; border-radius: 8px;
  font-size: 20px; font-weight: 300; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(255,255,255,0.28); }
.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  font-size: 13px;
  color: #1F2937;
  line-height: 1.55;
}
.modal-body section + section { margin-top: 18px; }
.modal-body h4 {
  margin: 0 0 8px;
  font-size: 13px; font-weight: 600;
  color: #1F2937;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.modal-body p { margin: 4px 0 0; color: #374151; font-size: 12.5px; }
.zona-help {
  display: flex; gap: 10px; margin-bottom: 10px;
  padding: 10px; background: #F9FAFB; border-radius: 6px;
  align-items: flex-start;
}
.zona-help-swatch {
  width: 14px; height: 14px; border-radius: 3px;
  margin-top: 3px; flex-shrink: 0; opacity: 0.7;
}
.zona-help strong { color: #1F2937; font-size: 13px; }
.pipeline-steps {
  margin: 0; padding-left: 20px;
  font-size: 12.5px;
}
.pipeline-steps li { margin-bottom: 5px; color: #374151; }
.pipeline-steps code, .endpoint-list code, .modal-body code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: #F3F4F6;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11.5px;
  color: #1E40AF;
}
.todo-list {
  margin: 0; padding-left: 20px;
  font-size: 12.5px;
}
.todo-list li { margin-bottom: 5px; color: #374151; }
.endpoint-list {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px;
}
.endpoint-list > div {
  padding: 6px 10px;
  background: #F9FAFB; border-left: 3px solid #2DA579;
  border-radius: 3px; color: #374151;
}
.modal-foot {
  padding: 12px 22px;
  border-top: 1px solid #E5E7EB;
  background: #F9FAFB;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-link {
  color: #1E40AF; text-decoration: none;
  font-size: 13px; font-weight: 500;
}
.modal-link:hover { text-decoration: underline; }
.modal-btn-close {
  padding: 7px 18px;
  background: #1F2937; color: #fff;
  border: none; border-radius: 6px;
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.modal-btn-close:hover { background: #111827; }

/* ============ NDVI month selector (overlay map control) ============ */
/* Posicionado no TOPO do mapa, OCUPANDO A FAIXA À DIREITA do painel de
   Camadas Públicas (~320 px) até antes dos zoom controls (~50 px).
   Sem competir com painéis nem com a legenda/escala do bottom. */
.ndvi-month-selector {
  position: absolute;
  top: 12px;
  left: 340px;        /* depois do painel "Camadas Públicas" (top-left) */
  right: 56px;        /* antes dos zoom controls (top-right) */
  z-index: 10;
  background: rgba(255,255,255,0.97);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
  padding: 7px 12px 9px;
  font-size: 12px;
  pointer-events: auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
@media (max-width: 900px) {
  .ndvi-month-selector {
    /* Em telas estreitas: ocupa quase toda a largura, sai do canto esquerdo. */
    left: 12px;
    right: 12px;
  }
}
.ndvi-month-selector:empty { display: none; }
.ndvi-month-row {
  display: flex; align-items: center; gap: 5px; flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.22) transparent;
  padding-bottom: 2px;
}
.ndvi-month-row::-webkit-scrollbar { height: 5px; }
.ndvi-month-row::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.22); border-radius: 4px; }
.ndvi-month-row::-webkit-scrollbar-track { background: transparent; }
.ndvi-month-label {
  font-weight: 700; color: #1F2937; margin-right: 6px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px;
  flex-shrink: 0;
}
.ndvi-month-pill {
  padding: 4px 10px; border: 1px solid #E5E7EB; border-radius: 14px;
  background: #fff; color: #374151; cursor: pointer;
  font-size: 11.5px; font-weight: 500; line-height: 1.2;
  transition: all 0.12s;
  flex-shrink: 0;
  white-space: nowrap;
}
.ndvi-month-pill:hover { background: #F0FDF4; border-color: #2DA579; }
.ndvi-month-pill.active {
  background: #2DA579; color: #fff; border-color: #2DA579;
}
.ndvi-month-empty {
  color: #6B7280; font-size: 11.5px; line-height: 1.4; padding: 2px 4px;
}

/* ============ NDVI legend strip (color bar) ============ */
.ndvi-legend-strip {
  display: flex; align-items: center; gap: 6px;
  margin-top: 5px; padding: 4px 6px; background: rgba(249,250,251,0.85);
  border-radius: 4px; font-size: 10.5px; color: #374151;
}
.ndvi-legend-bar {
  flex: 1; height: 6px; border-radius: 3px; min-width: 80px;
  background: linear-gradient(to right,
    #A50026 0%, #D73027 12%, #F46D43 25%, #FDAE61 37%, #FEE08B 50%,
    #D9EF8B 62%, #A6D96A 75%, #66BD63 87%, #1A9850 100%);
}
.ndvi-legend-tick { color: #6B7280; font-variant-numeric: tabular-nums; font-size: 10px; }
.ndvi-legend-strip { cursor: help; }
.ndvi-legend-label {
  margin-left: 8px; color: #6B7280;
  font-size: 10.5px; font-weight: 500;
  white-space: nowrap;
}

/* ============ Point-click popup + chart ============ */
.ndvi-point-card {
  padding: 12px 16px;
}
.ndvi-point-card .point-coord {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px; color: #6B7280;
}
.ndvi-point-chart {
  width: 100%;
  height: 160px;
  background: #fff;
  border: 1px solid #E5E7EB; border-radius: 4px;
  margin-top: 8px;
}
.ndvi-point-chart .axis { stroke: #9CA3AF; stroke-width: 1; }
.ndvi-point-chart .grid { stroke: #F3F4F6; stroke-width: 1; }
.ndvi-point-chart .line { stroke: #2DA579; stroke-width: 2; fill: none; }
.ndvi-point-chart .dot { fill: #2DA579; stroke: #fff; stroke-width: 1.5; }
.ndvi-point-chart .label { font-size: 10px; fill: #6B7280; }
.ndvi-point-chart .value { font-size: 11px; font-weight: 600; fill: #065F46; }
.ndvi-point-chart .tooltip { fill: #1F2937; }

.ndvi-point-status {
  margin-top: 8px;
  font-size: 11px; color: #6B7280; line-height: 1.4;
}

/* ============ MRV report modal (Sub-frente B) ============ */
.mrv-modal-card { max-width: 900px; max-height: 92vh; }
.mrv-modal-card .modal-body { padding: 0; }
.mrv-loading {
  padding: 60px 22px; text-align: center; color: #6B7280; font-size: 13px;
}
.mrv-error {
  padding: 22px; background: #FEE2E2; color: #991B1B;
  border: 1px solid #FCA5A5; border-radius: 6px; margin: 16px;
}
.mrv-section {
  padding: 18px 22px;
  border-bottom: 1px solid #E5E7EB;
}
.mrv-section:last-child { border-bottom: none; }
.mrv-section.mrv-sumario {
  padding: 16px 22px 14px;
}
.mrv-sumario-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px;
  color: #1F2937; margin-bottom: 4px;
}
.mrv-sumario-rec {
  font-size: 17px; font-weight: 700; line-height: 1.25; margin-bottom: 6px;
}
.mrv-sumario-desc {
  font-size: 12.5px; color: #1F2937; line-height: 1.5;
}
.mrv-sumario-stats {
  display: flex; gap: 14px; margin-top: 10px;
  font-size: 11.5px; color: #374151; align-items: center;
}
.mrv-sumario-stats .mrv-sumario-meta {
  margin-left: auto; color: #6B7280; font-size: 10.5px;
}
.mrv-h3 {
  margin: 0 0 12px; font-size: 13px; font-weight: 700;
  color: #1F2937; text-transform: uppercase; letter-spacing: 0.4px;
}
.mrv-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.mrv-grid-3 {
  display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 10px;
}
.mrv-row {
  display: grid; grid-template-columns: 130px 1fr; gap: 8px;
  padding: 5px 0; font-size: 12px;
  border-bottom: 1px dashed #F3F4F6;
}
.mrv-row .k { color: #6B7280; font-size: 10.5px; letter-spacing: 0.3px;
  text-transform: uppercase; padding-top: 2px; }
.mrv-row .v { color: #1F2937; }
.mrv-row.mrv-warn { background: #FEFCE8; padding: 5px 8px;
  border-radius: 4px; border-bottom: none; }
.mrv-row.mrv-warn .v { color: #854D0E; }

.mrv-card {
  background: #F0FDF4; border-left: 4px solid #10B981;
  padding: 10px 12px; border-radius: 4px;
}
.mrv-card-hi { background: #EFF6FF; border-left-color: #0091B5; }
.mrv-card-info { background: #FEFCE8; border-left-color: #F59E0B; }
.mrv-card-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.4px;
  color: #065F46; text-transform: uppercase;
}
.mrv-card-hi .mrv-card-label { color: #1E40AF; }
.mrv-card-info .mrv-card-label { color: #854D0E; }
.mrv-card-val {
  font-size: 19px; font-weight: 700; line-height: 1.2; margin-top: 2px;
  color: #065F46;
}
.mrv-card-val .u { font-size: 11px; font-weight: 500; color: #6B7280; }
.mrv-card-hi .mrv-card-val { color: #1E40AF; }
.mrv-card-info .mrv-card-val { color: #854D0E; }
.mrv-card-sub { font-size: 11px; color: #6B7280; margin-top: 2px; }

.mrv-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.mrv-table thead tr { background: #F9FAFB; color: #6B7280; }
.mrv-table th { padding: 6px 8px; font-weight: 600; text-align: left;
  border-bottom: 1px solid #E5E7EB; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.3px; }
.mrv-table td { padding: 5px 8px; border-bottom: 1px solid #F3F4F6;
  color: #1F2937; }
.mrv-table-wide { width: 100%; }

.mrv-restricoes {
  margin-top: 12px; padding: 10px 12px; background: #FEFCE8;
  border-left: 3px solid #F59E0B; border-radius: 4px;
  font-size: 11.5px; color: #92400E; line-height: 1.5;
}
.mrv-restricoes ul { margin: 4px 0 0 18px; }

.mrv-help {
  margin-top: 8px; padding: 8px 10px; background: #F9FAFB;
  border-radius: 4px; font-size: 10.5px; color: #6B7280; line-height: 1.5;
}
.mrv-criterios {
  display: flex; flex-direction: column; gap: 10px;
}
.mrv-criterio {
  padding: 10px 14px; background: #F9FAFB; border-radius: 4px;
}
.mrv-criterio-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.mrv-criterio-dim {
  font-size: 12.5px; font-weight: 600; color: #1F2937;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.mrv-criterio-resumo {
  font-size: 12.5px; color: #1F2937; font-weight: 500; margin-bottom: 4px;
}
.mrv-criterio-detalhe {
  font-size: 11.5px; color: #6B7280; line-height: 1.5;
}

.mrv-section-meta { background: #F9FAFB; }
.mrv-limits {
  margin-top: 10px; padding: 10px 12px; background: #fff;
  border-radius: 4px; font-size: 11px; color: #374151; line-height: 1.5;
  border: 1px solid #E5E7EB;
}
.mrv-limits ul { margin: 4px 0 0 16px; }

/* MRV button no card F2 */
.v2-mrv-btn {
  display: block; width: 100%; margin-top: 8px;
  padding: 7px 10px; background: #fff; color: #2DA579;
  border: 1.5px solid #2DA579; border-radius: 4px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.12s;
}
.v2-mrv-btn:hover { background: #2DA579; color: #fff; }

/* ============ Legend toggle rows (zonas F2 toggleáveis) ============ */
.legend-toggle {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 4px 2px; border-radius: 4px;
  transition: background 0.12s;
  user-select: none;
}
.legend-toggle:hover { background: rgba(0, 92, 169, 0.06); }
.legend-toggle .legend-cb {
  width: 14px; height: 14px; cursor: pointer; flex-shrink: 0;
  accent-color: #2DA579;
}
.legend-toggle .legend-label { flex: 1; }
.legend-toggle:has(.legend-cb:not(:checked)) .legend-label,
.legend-toggle:has(.legend-cb:not(:checked)) .marker {
  opacity: 0.45;
}
.legend-toggle:has(.legend-cb:not(:checked)) .legend-label {
  text-decoration: line-through;
}
.legend-divider {
  display: flex; align-items: center; justify-content: space-between;
  margin: 10px 0 6px;
  padding-top: 8px;
  border-top: 1px solid #eaeaea;
  font-size: 10px; font-weight: 600; letter-spacing: 0.4px;
  color: #888;
}
.legend-toggle-all {
  background: transparent; border: 1px solid #d1d5db;
  color: #6B7280; font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px; cursor: pointer;
  letter-spacing: 0.2px; text-transform: lowercase;
}
.legend-toggle-all:hover { background: #2DA579; color: #fff; border-color: #2DA579; }

/* (removida) .ndvi-fill-note — agora a info de gap-fill está como tooltip no
   .ndvi-legend-strip pra economizar altura do painel. */
