:root {
  --green-dark: #161b3d;
  --green-main: #212347;
  --green-light: #eef1fb;
  --green-soft: #f5f7ff;
  --text-main: #1f2933;
  --text-muted: #667085;
  --white: #ffffff;
  --gray-bg: #f5f7f6;
  --border: #e5e7eb;
  --red: #e53935;
  --yellow: #f9a825;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--gray-bg);
  color: var(--text-main);
}

.login-page {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}

.login-left {
  padding: 60px;
  background:
    linear-gradient(rgba(0, 50, 30, 0.86), rgba(0, 50, 30, 0.86)),
    url("../img/fundo-login.jpg");
  background-size: cover;
  background-position: center;
  color: white;
}

.brand-login {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 70px;
}

.logo-img {
  width: 150px;
  height: auto;
}

.brand-login h1 {
  font-size: 42px;
}

.brand-login p {
  font-size: 16px;
}

.login-content h2 {
  font-size: 58px;
  line-height: 1.08;
  margin-bottom: 24px;
}

.login-content h2 span {
  color: #78c850;
}

.login-content > p {
  font-size: 22px;
  max-width: 540px;
  line-height: 1.4;
  margin-bottom: 38px;
}

.feature,
.secure-box {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.feature-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: rgba(0, 107, 60, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.feature strong,
.secure-box strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.feature small,
.secure-box small {
  color: #d8eadc;
  font-size: 15px;
}

.secure-box {
  margin-top: 40px;
  max-width: 460px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  background: rgba(0,0,0,0.16);
}

.login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: linear-gradient(135deg, #f9faf9, #edf5ef);
}

.login-card {
  width: 100%;
  max-width: 560px;
  background: white;
  padding: 54px;
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.login-card-logo {
  text-align: center;
  margin-bottom: 36px;
}

.logo-card {
  width: 200px;
  height: auto;
  margin-bottom: 12px;
}

.login-card-logo h2 {
  color: var(--green-dark);
  font-size: 34px;
}

.login-card h3 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 8px;
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 34px;
}

.login-card label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.login-card input[type="email"],
.login-card input[type="password"],
.selection-card input,
.selection-card select {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 22px;
  font-size: 16px;
}

.login-options {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 28px;
}

.login-options a {
  color: var(--green-main);
  text-decoration: none;
  font-weight: 600;
}

.login-card button {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 14px;
  background: var(--green-main);
  color: white;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.login-error {
  color: var(--red);
  font-weight: 600;
  margin-top: 14px;
  text-align: center;
}

.support {
  border-top: 1px solid var(--border);
  margin-top: 36px;
  padding-top: 24px;
  color: var(--text-muted);
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 285px;
  height: 100vh;
  background: linear-gradient(180deg, #003f25, #002b1a);
  color: white;
  padding: 32px 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 42px;
}

.logo-small {
  width: 48px;
}

.brand h2 {
  font-size: 28px;
}

.brand p {
  font-size: 13px;
  color: #cce3d2;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar nav a {
  color: white;
  text-decoration: none;
  padding: 16px 18px;
  border-radius: 14px;
  font-weight: 600;
  transition: 0.2s;
  cursor: pointer;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: rgba(255,255,255,0.14);
}

.main {
  margin-left: 285px;
  padding: 38px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 34px;
}

.topbar h1 {
  font-size: 34px;
  margin-bottom: 6px;
}

.topbar p {
  color: var(--text-muted);
}

.user-btn {
  border: none;
  background: white;
  padding: 14px 22px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  font-weight: 700;
  cursor: pointer;
}

.cards-grid {
  display: grid;
  gap: 22px;
  margin-bottom: 24px;
}

.cards-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.cards-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.card,
.status-card,
.map-card,
.summary-card,
.report-card,
.selection-card,
.selected-summary,
.client-card {
  background: white;
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border: 1px solid #eef0ef;
}

.card-icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-main);
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 16px;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 6px;
}

.card h2 {
  font-size: 30px;
  color: var(--green-dark);
}

.badge {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13px;
}

.badge.green {
  background: var(--green-light);
  color: var(--green-main);
}

.badge.yellow {
  background: #fff6d6;
  color: #c78900;
}

.status-card h2 {
  font-size: 32px;
  margin: 8px 0;
}

.status-card.low h2 {
  color: var(--red);
}

.status-card.medium h2 {
  color: var(--yellow);
}

.status-card.high h2 {
  color: var(--green-main);
}

.bar {
  height: 8px;
  background: #edf0ee;
  border-radius: 30px;
  margin-top: 18px;
  overflow: hidden;
}

.status-card.low .bar div {
  background: var(--red);
  height: 100%;
}

.status-card.medium .bar div {
  background: var(--yellow);
  height: 100%;
}

.status-card.high .bar div {
  background: var(--green-main);
  height: 100%;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.map-card h3,
.summary-card h3,
.card h3,
.report-card h3 {
  margin-bottom: 18px;
  font-size: 22px;
}

.map-preview {
  width: 100%;
  height: 390px;
  border-radius: 16px;
  overflow: hidden;
  background: #dde8dd;
}

.map-preview.big {
  height: 560px;
}

.map-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.summary-card p {
  line-height: 1.6;
  margin-bottom: 18px;
  color: #4b5563;
}

.btn-primary,
.btn-secondary,
.btn-light {
  display: block;
  text-decoration: none;
  padding: 15px 18px;
  border-radius: 12px;
  margin-top: 12px;
  font-weight: 700;
}

.btn-primary {
  background: var(--green-main);
  color: white;
}

.btn-secondary {
  background: white;
  border: 1px solid var(--border);
  color: var(--green-dark);
}

.btn-light {
  background: var(--green-light);
  color: var(--green-main);
}

.selection-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 26px;
}

.selected-summary {
  background: var(--green-light);
  margin-bottom: 28px;
}

.selected-summary p {
  line-height: 1.7;
  margin: 12px 0 18px;
}

.btn-access,
.filter-btn {
  border: none;
  background: var(--green-main);
  color: white;
  padding: 15px 24px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 16px;
}

.section-title {
  margin-bottom: 18px;
  color: var(--green-dark);
}

.client-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.client-card h3 {
  color: var(--green-dark);
  margin-bottom: 8px;
}

.client-card p {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}

.filters div {
  background: white;
  padding: 20px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.filters label {
  display: block;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.filters select {
  border: none;
  width: 100%;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  background: transparent;
}

.map-page-layout {
  display: grid;
  grid-template-columns: 2.4fr 1fr;
  gap: 24px;
}

.map-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.info-note {
  margin-top: 18px;
  padding: 15px;
  border-radius: 12px;
  background: #f4faf4;
  color: var(--green-dark);
}

.recommendation-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr 1.1fr;
  gap: 22px;
  align-items: start;
}

.technical-list {
  list-style: none;
}

.technical-list li {
  margin-bottom: 18px;
  line-height: 1.5;
  padding-left: 22px;
  position: relative;
}

.technical-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--green-main);
  font-weight: 800;
}

.red-list li::before {
  color: var(--red);
}

.recommendation-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.recommendation-item strong {
  color: var(--green-dark);
}

.recommendation-item p {
  margin-top: 6px;
  color: var(--text-muted);
  line-height: 1.45;
}

.indicator {
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.indicator h2 {
  color: var(--green-main);
  font-size: 24px;
}

.report-preview {
  background: linear-gradient(135deg, #ffffff, #eaf6ea);
  border: 1px solid var(--border);
  height: 280px;
  border-radius: 16px;
  padding: 28px;
  margin: 20px 0;
}

.report-preview h4 {
  color: var(--green-main);
  font-size: 24px;
  margin-bottom: 28px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

@media (max-width: 1100px) {
  .cards-grid.four,
  .cards-grid.three,
  .filters,
  .dashboard-layout,
  .map-page-layout,
  .recommendation-layout,
  .selection-layout,
  .client-list {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }

  .main {
    margin-left: 0;
  }

  .login-page {
    grid-template-columns: 1fr;
  }
}

.mapa-interativo {
  width: 100%;
  height: 560px;
  border-radius: 16px;
  overflow: hidden;
  background: #dde8dd;
  border: 1px solid #e5e7eb;
}

.leaflet-container {
  font-family: "Segoe UI", Arial, sans-serif;
}

.dashboard-mapa-interativo {
  width: 100%;
  height: 390px;
  border-radius: 16px;
  overflow: hidden;
  background: #dde8dd;
  border: 1px solid #e5e7eb;
}

.leaflet-container {
  font-family: "Segoe UI", Arial, sans-serif;
}


.cards-grid.six {
  grid-template-columns: repeat(6, 1fr);
}

.cards-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1400px) {
  .cards-grid.six {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .cards-grid.six,
  .cards-grid.two {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.metric-card h2 {
  margin-top: 8px;
  line-height: 1.15;
}

.cards-grid.metrics {
  grid-template-columns: repeat(4, 1fr);
}

.dashboard-layout {
  grid-template-columns: 2.35fr 1fr;
  align-items: start;
}

.dashboard-mapa-interativo {
  height: 470px;
}

.mapa-interativo {
  height: 620px;
}

.client-card .area-value,
.client-card .fontes-value {
  color: var(--text-main);
}

.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 1400px) {
  .cards-grid.metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .cards-grid.metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-mapa-interativo,
  .mapa-interativo {
    height: 420px;
  }
}

/* --- Melhorias mapas de fertilidade --- */
.enhanced-layout {
  align-items: start;
}

.right-stack {
  display: grid;
  gap: 24px;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.base-toggle {
  display: inline-flex;
  background: #eef3ef;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.base-toggle-btn {
  border: none;
  background: transparent;
  color: var(--green-dark);
  padding: 10px 14px;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
}

.base-toggle-btn.is-active {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.map-toolbar-status {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 14px;
}

.legend-card h3 {
  margin-bottom: 14px;
}

.legend-image-container {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #f8faf8;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.legend-image-container img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.legend-placeholder {
  color: var(--text-muted);
  text-align: center;
}

.legend-info-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f4faf4;
  color: var(--green-dark);
  line-height: 1.65;
  border: 1px solid #e2efe2;
}

.map-bottom-grid {
  margin-top: 24px;
}

.chart-subtitle {
  color: var(--text-muted);
  margin: 0 0 16px;
}

.talhao-chart {
  display: grid;
  gap: 12px;
}

.talhao-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 120px;
  gap: 14px;
  align-items: center;
}

.talhao-bar-label {
  font-weight: 700;
  color: var(--green-dark);
}

.talhao-bar-track {
  height: 18px;
  background: #edf2ed;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.talhao-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f7b46, #42a86d);
}

.talhao-bar-value {
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
}

.map-header.compact {
  margin-bottom: 10px;
}

.leaflet-popup-content-wrapper {
  border-radius: 14px;
}

.leaflet-popup-content {
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .map-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .talhao-bar-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .talhao-bar-value {
    text-align: left;
  }
}

/* Rótulos dos talhões no Leaflet */
.talhao-label {
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
}

.talhao-label span {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 1px 1px rgba(255,255,255,0.9);
  white-space: nowrap;
}

/* Ajustes solicitados - legenda textual e tela cheia do mapa */
.legend-text-container {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #f8faf8;
  min-height: 220px;
  overflow: hidden;
}

.legend-table {
  display: grid;
  gap: 8px;
  width: 100%;
}

.legend-table-header,
.legend-table-row {
  display: grid;
  grid-template-columns: 42px 1fr 70px;
  align-items: center;
  gap: 10px;
}

.legend-table-header {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.legend-table-row {
  font-size: 15px;
  color: var(--text-main);
}

.legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.12);
}

.legend-range {
  font-weight: 600;
}

.legend-percent {
  text-align: right;
  font-weight: 700;
  color: var(--green-dark);
}

.fullscreen-map-btn {
  border: 1px solid var(--border);
  background: white;
  color: var(--green-dark);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.fullscreen-map-btn:hover {
  background: var(--green-light);
}

#mapCardPrincipal:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 18px;
  border-radius: 0;
  overflow: auto;
  background: white;
}

#mapCardPrincipal:fullscreen .mapa-interativo {
  height: calc(100vh - 165px);
  border-radius: 14px;
}

#mapCardPrincipal:fullscreen .info-note {
  display: none;
}

/* Ajustes compactos do dashboard e barras por faixa */
.cards-grid.metrics.metrics-compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.metric-card.compact {
  min-height: 0;
  padding: 18px 18px 16px;
  border-radius: 18px;
}

.metric-card.compact .card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  font-size: 15px;
}

.metric-card.compact p {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
}

.metric-card.compact h2 {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.15;
}

.metric-card.compact small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.loading-card h2 {
  font-size: 20px;
}

.talhao-bar-track {
  height: 20px;
  background: #edf2ed;
}

.talhao-bar-fill {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
  transition: width 0.3s ease;
}

@media (max-width: 1600px) {
  .cards-grid.metrics.metrics-compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .cards-grid.metrics.metrics-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cards-grid.metrics.metrics-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cards-grid.metrics.metrics-compact {
    grid-template-columns: 1fr;
  }
}

/* Pontos de coleta */
.point-toggle-btn.is-active {
  background: #fff7ed;
  border-color: #fb923c;
  color: #9a3412;
}

.ponto-popup table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.ponto-popup td {
  padding: 3px 6px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
  font-size: 12px;
}

.ponto-popup td:first-child {
  color: #065f46;
  white-space: nowrap;
}

/* ===== Página de recomendação de insumos ===== */
.rec-filters {
  margin-bottom: 24px;
}

.rec-layout {
  align-items: start;
}

.rec-map-toolbar {
  margin-bottom: 14px;
}

.rec-bottom-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 24px;
  margin-top: 24px;
}

.rec-summary-card p {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
  margin: 10px 0;
  line-height: 1.45;
}

.rec-summary-card span {
  color: var(--green-dark);
  font-weight: 700;
}

.compact-legend {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.rec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rec-table th,
.rec-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.rec-table th {
  color: var(--text-muted);
  font-weight: 800;
  font-size: 13px;
}

.rec-table td:nth-child(2),
.rec-table td:nth-child(3),
.rec-table td:nth-child(4),
.rec-table th:nth-child(2),
.rec-table th:nth-child(3),
.rec-table th:nth-child(4) {
  text-align: right;
}

.rec-table .total-row {
  background: #f4faf4;
  font-weight: 800;
  color: var(--green-dark);
}

#recMapCardPrincipal:fullscreen {
  background: white;
  padding: 22px;
  overflow: auto;
}

#recMapCardPrincipal:fullscreen #recMapaInterativo {
  height: calc(100vh - 160px);
}

#recPontosBtn.is-active {
  background: #ffffff;
  color: var(--green-dark);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

@media (max-width: 1200px) {
  .rec-bottom-grid {
    grid-template-columns: 1fr;
  }

  .rec-summary-card p {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.rec-bottom-grid.single {
  grid-template-columns: 1fr;
}

/* Página Relatórios */
.report-main {
  padding-bottom: 36px;
}

.report-topbar {
  align-items: flex-start;
}

.report-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.report-filters label {
  display: block;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 8px;
}

.report-filters select,
.report-filters input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.report-kpi {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.report-kpi span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.report-kpi strong {
  color: var(--green-dark);
  font-size: 22px;
  line-height: 1.1;
}

.report-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-empty {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  color: var(--text-muted);
}

.report-element-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.report-element-info {
  padding: 22px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.report-element-info small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.report-element-info h3 {
  color: var(--text-main);
  font-size: 20px;
  line-height: 1.15;
  margin-bottom: 5px;
}

.report-element-info span {
  color: var(--text-muted);
  font-size: 14px;
}

.report-depth-list {
  padding: 10px 18px;
}

.report-depth-row {
  display: grid;
  grid-template-columns: 160px minmax(260px, 1fr) 330px 130px;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.report-depth-row:last-child {
  border-bottom: none;
}

.report-depth-label small {
  display: block;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 4px;
}

.report-depth-label strong {
  color: var(--text-main);
  font-size: 16px;
}

.report-gauge-wrap {
  min-width: 0;
}

.report-gauge-value {
  text-align: center;
  font-weight: 900;
  color: var(--text-main);
  font-size: 16px;
  margin-bottom: 6px;
}

.report-gauge {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444 0%, #f97316 22%, #facc15 42%, #84cc16 62%, #00a33b 80%, #006b2f 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}

.report-gauge::after {
  content: "";
  position: absolute;
  left: var(--marker, 50%);
  top: -8px;
  width: 12px;
  height: 30px;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid #b7c0bd;
  border-radius: 5px;
  box-shadow: 0 2px 7px rgba(0,0,0,.22);
}

.report-gauge-ticks {
  display: flex;
  justify-content: space-between;
  color: #8aa097;
  font-size: 12px;
  font-weight: 700;
  margin-top: 9px;
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: end;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.report-stats::before {
  content: "AMOSTRAS";
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  margin-bottom: -4px;
}

.report-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
}

.report-stat strong {
  color: var(--text-main);
  font-size: 15px;
}

.report-class-badge {
  justify-self: end;
  border-radius: 9px;
  padding: 9px 14px;
  font-weight: 900;
  min-width: 110px;
  text-align: center;
  border: 1px solid #bfe2ce;
  background: #eefaf2;
  color: var(--green-main);
}

.report-class-badge::before {
  content: "▪ ";
}

.report-class-badge.baixa {
  background: #fff1f1;
  color: #d92d20;
  border-color: #f5b7b1;
}

.report-class-badge.media {
  background: #eefaf2;
  color: #087443;
  border-color: #bfe2ce;
}

.report-class-badge.alta {
  background: #edf7ff;
  color: #175cd3;
  border-color: #b2ddff;
}

.report-table-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.report-table-card h3 {
  margin-bottom: 14px;
}

.report-table-scroll {
  overflow: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.report-table th,
.report-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.report-table th {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 12px;
  background: #f9fbfa;
}

.report-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.report-profile-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.report-profile-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-profile-gauge-row {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  gap: 12px;
  align-items: center;
}

.report-profile-gauge-row strong {
  color: var(--text-main);
  font-size: 15px;
}

.report-profile-gauge-wrap .report-gauge {
  height: 14px;
}

.report-profile-gauge-wrap .report-gauge::after {
  top: -7px;
  height: 28px;
}

.report-profile-gauge-row span {
  text-align: right;
  font-weight: 800;
  color: var(--text-main);
}

.report-profile-line {
  display: grid;
  grid-template-columns: 90px 1fr 80px;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.profile-bar {
  height: 10px;
  background: #e8eee9;
  border-radius: 999px;
  overflow: hidden;
}

.profile-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316, #84cc16, #087443);
}

.report-footer-note {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 14px 4px 0;
}

@media (max-width: 1400px) {
  .report-depth-row {
    grid-template-columns: 130px minmax(220px, 1fr) 280px 110px;
  }
}

@media (max-width: 1100px) {
  .report-profile-gauge-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .report-profile-gauge-row span {
    text-align: left;
  }

  .report-filters,
  .report-kpis,
  .report-profile-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-element-card,
  .report-depth-row {
    grid-template-columns: 1fr;
  }

  .report-element-info {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .report-class-badge {
    justify-self: stretch;
  }
}

@media print {
  .sidebar,
  .report-actions,
  .report-filters {
    display: none !important;
  }

  .main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .report-element-card,
  .report-table-card,
  .report-profile-card,
  .report-kpi {
    box-shadow: none;
    break-inside: avoid;
  }
}


/* ===== Controles em tela cheia dos mapas ===== */
.fullscreen-filter-panel {
  display: none;
  gap: 12px;
  align-items: end;
  padding: 12px;
  margin-bottom: 12px;
  background: #f8fbf8;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.fullscreen-filter-panel > div {
  min-width: 180px;
  flex: 1;
}

.fullscreen-filter-panel label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.fullscreen-filter-panel select {
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  color: var(--text-main);
  font-weight: 700;
}

.fullscreen-filter-panel button {
  height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: var(--green-main);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

#mapCardPrincipal:fullscreen .fullscreen-filter-panel,
#recMapCardPrincipal:fullscreen .fullscreen-filter-panel {
  display: flex;
}

#mapCardPrincipal:fullscreen .mapa-interativo {
  height: calc(100vh - 235px);
}

#recMapCardPrincipal:fullscreen #recMapaInterativo {
  height: calc(100vh - 225px);
}

#mapCardPrincipal:fullscreen .map-toolbar,
#recMapCardPrincipal:fullscreen .map-toolbar {
  margin-bottom: 10px;
}

/* ===== Página Análise de Dados ===== */
.data-analysis-main {
  background: #f4f7f5;
}

.analysis-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.analysis-filters div {
  background: white;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.03);
}

.analysis-filters label {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}

.analysis-filters select {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-weight: 800;
  font-size: 16px;
}

.analysis-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.analysis-kpi {
  background: white;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.03);
}

.analysis-kpi span {
  display: block;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 13px;
}

.analysis-kpi strong {
  color: var(--green-dark);
  font-size: 24px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.95fr;
  gap: 18px;
  align-items: start;
}

.analysis-card {
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
}

.analysis-card.wide {
  grid-column: span 2;
}

.analysis-card.is-highlight {
  outline: 3px solid rgba(33, 35, 71, 0.18);
}

.analysis-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.analysis-card-header h3 {
  margin: 0;
  color: var(--text-main);
}

.analysis-card-header span {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
}

.analysis-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.analysis-bar-row {
  display: grid;
  grid-template-columns: 190px 1fr 130px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.analysis-bar-row span {
  font-weight: 700;
  color: var(--text-main);
}

.analysis-bar-track {
  height: 30px;
  border-radius: 999px;
  background: #e9f0eb;
  overflow: hidden;
}

.analysis-bar-track div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #212347, #4f68d8);
}

.analysis-bar-row strong {
  text-align: right;
  color: var(--text-main);
}

.analysis-summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analysis-summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.analysis-summary-list span {
  color: var(--text-muted);
}

.analysis-summary-list strong {
  color: var(--green-dark);
  text-align: right;
}

.analysis-ranking {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.analysis-ranking h4 {
  margin: 0 0 8px;
  color: var(--green-dark);
}

.analysis-ranking p {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  font-size: 13px;
}

.analysis-ranking p span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 900;
}

.analysis-ranking p strong {
  color: var(--text-main);
}

.analysis-line-chart svg,
.analysis-scatter svg {
  width: 100%;
  height: auto;
}

.analysis-line-chart line,
.analysis-scatter line {
  stroke: #d9e2dc;
  stroke-width: 1;
}

.analysis-line-chart polyline {
  fill: none;
  stroke: var(--green-dark);
  stroke-width: 3;
}

.analysis-line-chart circle {
  fill: var(--green-main);
}

.analysis-line-chart text,
.analysis-scatter text {
  fill: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
}

.analysis-line-chart .x-label {
  fill: var(--text-muted);
}

.analysis-scatter circle {
  fill: var(--green-main);
  fill-opacity: 0.72;
  stroke: white;
  stroke-width: 1;
}

.status-baixa,
.status-baixo {
  color: #dc2626 !important;
}

.status-media,
.status-medio {
  color: #212347 !important;
}

@media (max-width: 1300px) {
  .analysis-filters,
  .analysis-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .analysis-card.wide {
    grid-column: span 1;
  }

  .analysis-bar-row {
    grid-template-columns: 1fr;
  }

  .analysis-bar-row strong {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .fullscreen-filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .analysis-ranking {
    grid-template-columns: 1fr;
  }
}

/* ===== Ajustes Análise de Dados v2 ===== */
.analysis-relation-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: -4px 0 18px;
}

.analysis-relation-filters div {
  background: #ffffff;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.03);
}

.analysis-relation-filters label {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 7px;
}

.analysis-relation-filters select {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-weight: 900;
  font-size: 15px;
}

.analysis-ranking-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.analysis-ranking-main h4 {
  margin: 0 0 12px;
  color: var(--green-dark);
}

.analysis-ranking-line {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.analysis-ranking-line span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.analysis-ranking-line.low span { background: #dc2626; }
.analysis-ranking-line.high span { background: var(--green-main); }

.analysis-ranking-line p {
  margin: 0;
  color: var(--text-main);
  font-weight: 700;
  font-size: 13px;
}

.analysis-ranking-line strong {
  color: var(--green-dark);
  white-space: nowrap;
}

.analysis-main-chart svg {
  width: 100%;
  height: auto;
}

.analysis-main-chart line,
.analysis-main-chart svg line {
  stroke: #d9e2dc;
  stroke-width: 1;
}

.analysis-main-chart polyline {
  fill: none;
  stroke: var(--green-dark);
  stroke-width: 3;
}

.analysis-main-chart circle {
  fill: var(--green-main);
}

.analysis-card.is-highlight {
  box-shadow: 0 10px 28px rgba(33, 35, 71, 0.12);
}

@media (max-width: 1300px) {
  .analysis-relation-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-ranking-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .analysis-relation-filters {
    grid-template-columns: 1fr;
  }
}

/* ===== Correção: Análise de Dados sem blocos estáticos ===== */
.analysis-secondary-card.is-hidden {
  display: none !important;
}

.analysis-grid.analysis-focus {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
}

.analysis-grid.analysis-focus #analisePainelPrincipalCard {
  grid-column: span 1;
}

.analysis-grid.analysis-focus #analiseResumoCard {
  grid-column: span 1;
}

.analysis-grid.analysis-focus #analiseRelacaoCard,
.analysis-grid.analysis-focus #analiseRankingCard,
.analysis-grid.analysis-focus #analiseEvolucaoCard {
  grid-column: span 1;
}

.analysis-scatter text.axis-label,
.analysis-main-chart text.axis-label {
  text-anchor: middle;
}

.analysis-scatter text.axis-label-y,
.analysis-main-chart text.axis-label-y {
  text-anchor: start;
}

.analysis-scatter text.axis-label-x,
.analysis-main-chart text.axis-label-x {
  text-anchor: middle;
}

@media (max-width: 1300px) {
  .analysis-grid.analysis-focus {
    grid-template-columns: 1fr;
  }
}

/* ===== Valores dos eixos no gráfico de relação ===== */
.analysis-scatter .analysis-grid-line,
.analysis-main-chart .analysis-grid-line {
  stroke: #edf3ef;
  stroke-width: 1;
}

.analysis-scatter .analysis-axis-line,
.analysis-main-chart .analysis-axis-line {
  stroke: #141414;
  stroke-width: 1.9;
}

.analysis-scatter .analysis-tick-line,
.analysis-main-chart .analysis-tick-line {
  stroke: #aebfb6;
  stroke-width: 1;
}

.analysis-scatter .axis-tick,
.analysis-main-chart .axis-tick {
  fill: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
}

.analysis-scatter .axis-tick-x,
.analysis-main-chart .axis-tick-x {
  text-anchor: middle;
}

.analysis-scatter .axis-tick-y,
.analysis-main-chart .axis-tick-y {
  text-anchor: end;
}

.analysis-scatter .axis-label,
.analysis-main-chart .axis-label {
  fill: var(--text-main);
  font-size: 12px;
  font-weight: 900;
}

.analysis-scatter .axis-label-y-vertical,
.analysis-main-chart .axis-label-y-vertical {
  text-anchor: middle;
}

.analysis-scatter .analysis-point.farm-highlight,
.analysis-main-chart .analysis-point.farm-highlight {
  stroke: #ffffff;
  stroke-width: 2.2;
}

.analysis-scatter .analysis-point.safra-highlight,
.analysis-main-chart .analysis-point.safra-highlight {
  stroke: #ffffff;
  stroke-width: 2.2;
}

/* ===== Barras por talhão em estilo régua/ponteiro ===== */
.talhao-bar-axis {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin: 2px 0 8px;
  padding-left: 210px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.talhao-bar-axis span:nth-child(1) { text-align: left; }
.talhao-bar-axis span:nth-child(2) { text-align: center; }
.talhao-bar-axis span:nth-child(3) { text-align: right; }

.talhao-bar-row {
  display: grid;
  grid-template-columns: 90px 110px 1fr;
  gap: 12px;
  align-items: center;
  margin: 9px 0;
}

.talhao-bar-label {
  font-weight: 900;
  color: var(--green-dark);
  white-space: nowrap;
}

.talhao-bar-value {
  font-weight: 900;
  color: var(--text-main);
  text-align: left;
  white-space: nowrap;
}

.talhao-bar-track {
  height: 16px;
  border-radius: 999px;
  position: relative;
  overflow: visible;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.talhao-bar-fill {
  display: none;
}

.talhao-bar-marker {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 5px;
  background: #ffffff;
  border: 2px solid #b7c7bd;
  box-shadow: 0 2px 5px rgba(0,0,0,0.28);
  z-index: 2;
}

@media (max-width: 900px) {
  .talhao-bar-axis {
    padding-left: 0;
  }

  .talhao-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 14px 0;
  }

  .talhao-bar-value {
    text-align: left;
  }
}


.analysis-main-chart .analysis-axis-arrow,
.analysis-scatter .analysis-axis-arrow {
  fill: #141414;
}

.analysis-main-chart .axis-letter,
.analysis-scatter .axis-letter {
  fill: var(--text-main);
  font-size: 12px;
  font-weight: 800;
}


#analiseDestaqueWrap.is-disabled {
  opacity: 0.65;
}

.analysis-scatter-wrap {
  position: relative;
}

.analysis-scatter-legend {
  margin: 2px 0 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.analysis-scatter .analysis-point,
.analysis-main-chart .analysis-point {
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  transform-origin: center;
}

.analysis-scatter .analysis-point.default,
.analysis-main-chart .analysis-point.default {
  fill: var(--green-main);
  stroke: #ffffff;
  stroke-width: 1.5;
}

.analysis-scatter .analysis-point.highlighted,
.analysis-main-chart .analysis-point.highlighted {
  fill: var(--green-dark);
  stroke: #e8edff;
  stroke-width: 2.2;
}

.analysis-scatter .analysis-point.muted,
.analysis-main-chart .analysis-point.muted {
  fill: #c8d3f0;
  opacity: 0.45;
  stroke: #ffffff;
  stroke-width: 1.2;
}

.analysis-scatter .analysis-point:hover,
.analysis-main-chart .analysis-point:hover {
  transform: scale(1.08);
  opacity: 1;
}

.analysis-trend-line {
  stroke: var(--green-dark);
  stroke-width: 2.2;
  stroke-dasharray: 7 5;
  opacity: 0.9;
}

.analysis-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-100%);
  min-width: 180px;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(11, 31, 21, 0.94);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0,0,0,0.22);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 20;
}

.analysis-tooltip.is-visible {
  opacity: 1;
}

.analysis-tooltip strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.analysis-tooltip span {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255,255,255,0.92);
}

.analysis-tooltip b {
  color: #c4ffd8;
}

/* ===== Página Análise de Dados - Fazenda ===== */
.farm-analysis-filters {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.farm-analysis-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.farm-analysis-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
}

.farm-analysis-main-card {
  min-height: 520px;
}

.farm-wide {
  grid-column: 1 / -1;
}

.farm-analysis-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.farm-analysis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.farm-analysis-table th,
.farm-analysis-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.farm-analysis-table th {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.farm-analysis-table td strong {
  color: var(--green-dark);
}

.farm-analysis-table-wrap {
  overflow-x: auto;
}

.farm-analysis-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #eef7f1;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.farm-analysis-status.is-warning {
  background: #fff5e8;
  color: #9a5b00;
}

.farm-analysis-summary-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.farm-analysis-summary-box p {
  margin: 0;
  color: var(--text-main);
  line-height: 1.45;
  font-size: 14px;
}

.farm-analysis-empty {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px dashed #cfdcd5;
  border-radius: 16px;
  background: #fbfdfb;
}

.farm-analysis-empty strong {
  color: var(--green-dark);
}

.farm-analysis-empty p,
.farm-analysis-empty li {
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.45;
}

.farm-analysis-empty ul {
  margin: 0 0 0 18px;
  padding: 0;
}

.farm-analysis-bars .analysis-bar-row {
  grid-template-columns: 220px 1fr 130px;
}

@media (max-width: 1400px) {
  .farm-analysis-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .farm-analysis-grid {
    grid-template-columns: 1fr;
  }

  .farm-wide {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .farm-analysis-filters,
  .farm-analysis-kpis {
    grid-template-columns: 1fr;
  }
}

/* ===== Seleção múltipla na Análise de Dados - Fazenda ===== */
.multi-select-control {
  min-height: 68px;
  padding: 8px 10px !important;
  line-height: 1.25;
}

.multi-select-control option {
  padding: 6px 8px;
  border-radius: 8px;
}

.select-hint {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.2;
}

.farm-analysis-filters > div {
  align-self: stretch;
}
