:root {
  --uatt-primary: #2e7d32;
  --uatt-secondary: #43a047;
  --uatt-accent: #ffb300;
  --uatt-bg: #f5f7fa;
}

body.uatt-apc-dash {
  background: var(--uatt-bg);
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.uatt-dash-header {
  background: linear-gradient(135deg, #1b5e20 0%, var(--uatt-primary) 55%, var(--uatt-secondary) 100%);
  color: #fff;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.kpi-card {
  border: none;
  border-radius: 12px;
  border-top: 3px solid var(--uatt-primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s;
}

.kpi-card:hover { transform: translateY(-2px); }

.kpi-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1b5e20;
}

.kpi-label {
  font-size: 0.78rem;
  color: #546e7a;
}

#apcMap {
  height: 420px;
  border-radius: 12px;
  z-index: 1;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
  font-size: 0.75rem;
  color: #455a64;
}

.map-legend i {
  width: 18px;
  height: 12px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 2px;
}

.panel-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.drill-row { cursor: pointer; }
.drill-row:hover { background: #e8f5e9 !important; }

#loadingOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#loadingOverlay.show { display: flex; }

.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 360px; }

.rec-box {
  background: #f1f8e9;
  border-left: 4px solid #43a047;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.farmer-img-wrap {
  max-width: 260px;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.farmer-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.zoom-hint-label {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 0.65rem;
  color: #fff;
  background: rgba(27, 94, 32, 0.8);
  padding: 2px 5px;
  border-radius: 3px;
  pointer-events: none;
}

.image-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.image-zoom-overlay img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.image-zoom-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
}

@media print {
  .no-print { display: none !important; }
}
