:root {
  --ui-scale: .9;
  --azul-tech: #0F172A;
  --charcoal-dark: #1E293B;
  --earthy-beige: #F8F5F0;
  --border-color: #E2E8F0;
  --text-main: #334155;
  --text-sub: #64748B;
  --green-light: #4ADE80;
  --green-dark: #15803D;
  --amber: #D97706;
  --red: #DC2626;
  --ndvi-high: rgba(34, 197, 94, 0.48);
  --ndvi-mid: rgba(234, 179, 8, 0.48);
  --ndvi-low: rgba(239, 68, 68, 0.48);
  --empty-canvas-bg:
    linear-gradient(135deg, rgba(17, 20, 15, .48), rgba(96, 124, 73, .36)),
    url("/static/field-placeholder.jpg");
  --card-bg: #FFFFFF;
  --card-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  scrollbar-width: thin;
  scrollbar-color: rgba(21, 128, 61, .72) rgba(226, 232, 240, .48);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(248, 250, 252, .78), rgba(226, 232, 240, .55));
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 3px solid rgba(248, 250, 252, .88);
  border-radius: 999px;
  background: linear-gradient(180deg, #22C55E, #15803D);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #34D399, #0F766E);
}

body.dark-theme * {
  scrollbar-color: rgba(136, 168, 110, .78) rgba(23, 25, 21, .88);
}

body.dark-theme *::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(23, 25, 21, .96), rgba(35, 38, 31, .86));
}

body.dark-theme *::-webkit-scrollbar-thumb {
  border-color: rgba(23, 25, 21, .92);
  background: linear-gradient(180deg, #8BA870, #47633A);
}

body {
  background-color: var(--earthy-beige);
  color: var(--text-main);
  display: flex;
  width: calc(100vw / var(--ui-scale));
  height: calc(100vh / var(--ui-scale));
  overflow: hidden;
  transform-origin: top left;
  zoom: var(--ui-scale);
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(74, 222, 128, .02), transparent 0 24%),
    radial-gradient(circle at 80% 70%, rgba(15, 23, 42, .012), transparent 0 22%),
    repeating-linear-gradient(45deg, rgba(51,65,85,0.017) 0px, rgba(51,65,85,0.017) 3px, transparent 3px, transparent 12px);
  animation: backgroundLineDrift 18s ease-in-out infinite alternate;
  will-change: transform;
}

body > .sidebar,
body > .main-content,
body > .analysis-panel {
  position: relative;
  z-index: 1;
}

.mobile-app-bar,
.mobile-menu-backdrop,
.mobile-menu-close {
  display: none;
}

body.auth-mode .main-content {
  background-color: transparent;
}

body.dark-theme {
  --azul-tech: #E7E3D3;
  --charcoal-dark: #141611;
  --earthy-beige: #151713;
  --border-color: #34382F;
  --text-main: #E7E3D3;
  --text-sub: #A7AA98;
  --green-light: #88A86E;
  --green-dark: #47633A;
  --amber: #C6A15B;
  --red: #B86B5F;
  --card-bg: #1D1F1A;
  --card-shadow: 0 14px 34px rgba(0, 0, 0, .25);
  background-color: #151713;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(85, 112, 64, .024), transparent 0 28%),
    repeating-linear-gradient(45deg, rgba(213, 207, 180, 0.009) 0px, rgba(213, 207, 180, 0.009) 3px, transparent 3px, transparent 12px);
}

body.dark-theme::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .011), transparent 0 24%),
    radial-gradient(circle at 80% 70%, rgba(136, 168, 110, .02), transparent 0 22%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .026) 0px, rgba(255, 255, 255, .026) 2px, transparent 2px, transparent 14px);
}

body.dark-theme.auth-mode .main-content,
body.dark-theme.app-mode .main-content,
body.dark-theme.app-mode .analysis-panel {
  background-color: transparent;
}

body.dark-theme .main-content,
body.dark-theme .toolbar-band,
body.dark-theme .location-workbench,
body.dark-theme .grid-container,
body.dark-theme .placeholder-panel,
body.dark-theme .analysis-panel,
body.dark-theme .auth-panel {
  background-color: #1D1F1A;
  color: var(--text-main);
}

body.dark-theme .toolbar-band,
body.dark-theme .location-workbench,
body.dark-theme .grid-container,
body.dark-theme .placeholder-panel,
body.dark-theme .auth-panel,
body.dark-theme .grid-canvas,
body.dark-theme input,
body.dark-theme select,
body.dark-theme .file-control span,
body.dark-theme .visual-tab,
body.dark-theme .expand-map-btn {
  border-color: var(--border-color);
}

body.dark-theme input,
body.dark-theme select,
body.dark-theme .file-control span,
body.dark-theme .location-result,
body.dark-theme .location-status,
body.dark-theme .map-toolbar button,
body.dark-theme th,
body.dark-theme .history-item {
  background: #171915;
  color: var(--text-main);
}

body.dark-theme .visual-tabs-band {
  background: transparent;
}

body.dark-theme .visual-tabs-band .map-actions {
  border-color: rgba(136, 168, 110, .26);
  background:
    repeating-linear-gradient(155deg, rgba(136, 168, 110, .11) 0 1px, transparent 1px 28px),
    linear-gradient(90deg, rgba(23, 25, 21, .96), rgba(35, 38, 31, .90), rgba(23, 25, 21, .96));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .05);
}

body.dark-theme .visual-carousel {
  background: transparent;
  box-shadow: none;
}

body.dark-theme .visual-tab {
  color: #F2ECD9;
  --tab-icon-color: #CBD5E1;
}

body.dark-theme .visual-tab:hover {
  background: rgba(136, 168, 110, .10);
}

body.dark-theme .visual-tab.active {
  background: transparent;
  border-color: transparent;
  color: #F2ECD9;
  box-shadow: none;
  --tab-icon-color: #6EE7A0;
}

body.dark-theme .visual-tabs-band .expand-map-btn {
  color: #F2ECD9;
  --tab-icon-color: #CBD5E1;
  border-left-color: rgba(136, 168, 110, .22);
}

body.dark-theme .toast {
  background: rgba(29, 31, 26, .96);
  border-color: rgba(136, 168, 110, .25);
  color: #F2ECD9;
}

body.dark-theme .field-command-center {
  border-color: rgba(136, 168, 110, .20);
  background:
    linear-gradient(135deg, rgba(29, 31, 26, .98), rgba(23, 25, 21, .94)),
    repeating-linear-gradient(135deg, rgba(136, 168, 110, .06) 0 1px, transparent 1px 24px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .04);
}

body.dark-theme .ops-main h2,
body.dark-theme .ops-kpi strong,
body.dark-theme .ops-action strong {
  color: #F2ECD9;
}

body.dark-theme .ops-kpi,
body.dark-theme .ops-action {
  border-color: rgba(136, 168, 110, .16);
  background: rgba(23, 25, 21, .78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

body.dark-theme .ops-action {
  background: linear-gradient(135deg, rgba(71, 99, 58, .28), rgba(23, 25, 21, .78));
}

body.dark-theme .auth-beta-label {
  border-color: rgba(136, 168, 110, .30);
  background: rgba(136, 168, 110, .14);
  color: #DDE8C9;
}

body.dark-theme .header-title h1,
body.dark-theme .section-heading h2,
body.dark-theme .placeholder-panel h2,
body.dark-theme .card h3,
body.dark-theme .logo.large {
  color: #F2ECD9;
}

body.dark-theme .grid-canvas {
  background: #171915;
}

body.dark-theme .card {
  background: #1D1F1A;
  border-color: #34382F;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

body.dark-theme .card p,
body.dark-theme .section-heading p,
body.dark-theme .placeholder-panel p,
body.dark-theme .auth-panel p {
  color: #AAB8CB;
}

body.dark-theme .file-control.has-file span {
  background: linear-gradient(135deg, rgba(96, 124, 73, .28), #171915 58%, rgba(198, 161, 91, .10));
  border-color: rgba(136, 168, 110, .42);
  color: #DDEBC6;
}

body.dark-theme .camera-box,
body.dark-theme .compare-controls {
  background: #1D1F1A;
  border-color: var(--border-color);
}

body.dark-theme .compare-controls select,
body.dark-theme .camera-actions #closeCameraBtn {
  background: #171915;
  color: var(--text-main);
  border-color: var(--border-color);
}

body.dark-theme .feedback-panel,
body.dark-theme .analysis-precision-panel,
body.dark-theme .ml-summary-panel,
body.dark-theme .ml-kpi {
  background: #1D1F1A;
  border-color: var(--border-color);
}

body.dark-theme .feedback-panel select,
body.dark-theme .feedback-panel input,
body.dark-theme .feedback-panel textarea {
  background: #171915;
  color: var(--text-main);
  border-color: var(--border-color);
}

body.dark-theme .ml-summary-header h3,
body.dark-theme .ml-kpi strong {
  color: #F2ECD9;
}

body.dark-theme .property-current,
body.dark-theme .property-menu,
body.dark-theme .property-map,
body.dark-theme .confirm-box,
body.dark-theme .toast {
  background: #1D1F1A;
  color: var(--text-main);
  border-color: var(--border-color);
}

body.dark-theme .property-option {
  color: var(--text-main);
}

body.dark-theme .property-option:hover,
body.dark-theme .property-option.active,
body.dark-theme .confirm-actions #confirmCancel {
  background: #171915;
}

body.dark-theme .sidebar {
  background: #11140F;
  border-right: 1px solid #2D3128;
}

body.dark-theme .menu-item {
  color: #A7AA98;
}

body.dark-theme .menu-icon {
  color: rgba(231, 227, 211, .76);
}

body.dark-theme .menu-item:hover,
body.dark-theme .menu-item.active {
  background: rgba(136, 168, 110, .24);
  color: #F2ECD9;
}

body.dark-theme .menu-item:hover .menu-icon,
body.dark-theme .menu-item.active .menu-icon {
  color: #F2ECD9;
  filter: drop-shadow(0 6px 12px rgba(136, 168, 110, .18));
}

body.dark-theme .sidebar-footer button {
  background: #1D1F1A;
  border-color: #3A4034;
  color: #E7E3D3;
}

body.dark-theme .leaflet-container {
  background: #171915;
}

body.dark-theme .leaflet-control-layers,
body.dark-theme .leaflet-bar a {
  background: #1D1F1A;
  border-color: #3A4034;
  color: #E7E3D3;
}

body.dark-theme .animated-select-trigger,
body.dark-theme .animated-select-menu {
  background: #171915;
  color: var(--text-main);
  border-color: var(--border-color);
}

body.dark-theme .animated-select-option {
  color: var(--text-main);
}

body.dark-theme .animated-select-option:hover,
body.dark-theme .animated-select-option.active {
  background: rgba(136, 168, 110, .20);
  color: #F2ECD9;
}

body.dark-theme .badge-alert {
  background: rgba(248, 113, 113, .16);
  color: #FCA5A5;
}

body.dark-theme .badge-success {
  background: rgba(34, 197, 94, .16);
  color: #86EFAC;
}

body.dark-theme .heat-note {
  background: rgba(2, 6, 23, .82);
}

body.dark-theme .auth-tab {
  background: #171915;
  color: #E7E3D3;
  border-color: var(--border-color);
}

body.dark-theme .auth-tab.active {
  background: #E7E3D3;
  color: #151713;
  border-color: #E7E3D3;
}

body.auth-mode {
  display: block;
  width: calc(100vw / var(--ui-scale));
  height: calc(100vh / var(--ui-scale));
  overflow: hidden;
}

body.app-mode {
  align-items: flex-start;
  overflow-y: auto;
}

body.app-mode .sidebar {
  position: sticky;
  top: 0;
}

body.app-mode .main-content,
body.app-mode .analysis-panel {
  height: auto;
  min-height: calc(100vh / var(--ui-scale));
  overflow: visible;
}

body.auth-mode:not(.auth-unlocking) .sidebar,
body.auth-mode:not(.auth-unlocking) .analysis-panel {
  display: none;
}

body.auth-mode .main-content {
  width: calc(100vw / var(--ui-scale));
  height: calc(100vh / var(--ui-scale));
  min-height: calc(100vh / var(--ui-scale));
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
}

body.auth-unlocking {
  display: flex;
}

body.auth-unlocking .sidebar {
  display: flex;
  animation: slideInLeft 760ms cubic-bezier(.2, .8, .2, 1) both;
}

body.auth-unlocking .analysis-panel {
  display: none;
  animation: slideInRight 760ms cubic-bezier(.2, .8, .2, 1) both;
}

body.auth-unlocking .auth-shell {
  position: fixed;
  inset: 0;
  z-index: 10;
  min-height: calc(100vh / var(--ui-scale));
  pointer-events: none;
}

body.auth-unlocking .auth-panel {
  pointer-events: auto;
}

body.app-locking .sidebar {
  animation: slideOutLeft 620ms cubic-bezier(.4, 0, .2, 1) both;
}

body.app-locking .analysis-panel {
  animation: slideOutRight 620ms cubic-bezier(.4, 0, .2, 1) both;
}

body.app-locking .app-shell {
  animation: fadeOutScale 320ms ease both;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, background-color .16s ease, border-color .16s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 7px 16px rgba(15, 23, 42, .10);
}

button:active:not(:disabled) {
  transform: translateY(1px) scale(.98);
  box-shadow: 0 3px 8px rgba(15, 23, 42, .10);
}

.hidden {
  display: none !important;
}

.sidebar {
  width: 280px;
  height: calc(100vh / var(--ui-scale));
  background-color: var(--azul-tech);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 26px;
  font-weight: 400;
  color: #FFFFFF;
}

.logo.large {
  color: var(--azul-tech);
  font-size: 34px;
}

.logo span.scan {
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(to top, var(--green-dark), var(--green-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.menu-section {
  margin-top: 35px;
}

.menu-title {
  font-size: 11px;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  font-weight: 700;
}

.menu-item {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: #94A3B8;
  margin-bottom: 4px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  text-align: left;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.menu-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(226, 232, 240, .86);
  transition: color 0.2s, transform 0.2s, filter 0.2s;
}

.menu-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-item span:last-child {
  min-width: 0;
  line-height: 1.2;
}

.menu-item:hover, .menu-item.active {
  background-color: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}

.menu-item:hover .menu-icon,
.menu-item.active .menu-icon {
  color: #FFFFFF;
  transform: translateX(2px) scale(1.04);
  filter: drop-shadow(0 6px 12px rgba(74, 222, 128, .16));
}

.sidebar-footer {
  color: #64748B;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-footer button {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #CBD5E1;
  border-radius: 6px;
  padding: 6px 9px;
}

.theme-btn {
  position: relative;
  width: 82px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .98)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    inset 0 8px 18px rgba(0, 0, 0, .22),
    0 10px 24px rgba(0, 0, 0, .18);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.theme-btn::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(15, 23, 42, .08), rgba(255, 255, 255, .08));
}

.theme-icon {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 100%;
  place-items: center;
  display: grid;
  color: #E5E7EB;
  opacity: .9;
  transition: color .25s ease, opacity .25s ease, transform .25s ease;
}

.theme-icon svg,
.theme-thumb svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon path,
.theme-icon circle,
.theme-thumb path,
.theme-thumb circle {
  vector-effect: non-scaling-stroke;
}

.theme-moon {
  padding-left: 5px;
}

.theme-sun {
  padding-right: 5px;
  color: #475569;
}

.theme-thumb {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 45px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #0F172A;
  background: linear-gradient(145deg, #FFFFFF, #DDE3EA);
  box-shadow:
    0 5px 12px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .34s cubic-bezier(.16, .86, .24, 1), color .25s ease, background .25s ease;
}

.theme-thumb .theme-moon-thumb {
  display: none;
}

.theme-thumb .theme-sun-thumb {
  display: block;
}

.theme-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(226, 232, 240, .34);
}

body.dark-theme .theme-btn {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, .98), rgba(8, 13, 24, .98)) !important;
}

body.dark-theme .theme-thumb {
  transform: translateX(-37px);
  color: #F8FAFC;
  background: linear-gradient(145deg, #334155, #111827);
}

body.dark-theme .theme-thumb .theme-sun-thumb {
  display: none;
}

body.dark-theme .theme-thumb .theme-moon-thumb {
  display: block;
}

body.dark-theme .theme-moon {
  color: #F8FAFC;
  opacity: 1;
}

body.dark-theme .theme-sun {
  color: #94A3B8;
  opacity: .62;
}

body:not(.dark-theme) .theme-sun {
  color: #0F172A;
  opacity: .84;
}

body:not(.dark-theme) .theme-moon {
  color: #E2E8F0;
  opacity: .95;
}

.main-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
  height: calc(100vh / var(--ui-scale));
}

.auth-shell {
  width: 100%;
  min-height: calc(100vh / var(--ui-scale));
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
}

.auth-shell.auth-exit .auth-panel {
  animation: fadeOutScale 360ms ease both;
}

.auth-panel {
  width: min(430px, 100%);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

.auth-panel.auth-approved {
  border-color: rgba(22, 101, 52, 0.28);
  box-shadow: 0 16px 42px rgba(22, 101, 52, 0.12);
}

.auth-panel p {
  margin: 8px 0 18px;
  color: var(--text-sub);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}

.auth-tab {
  border: 1px solid var(--border-color);
  background: #F8FAFC;
  border-radius: 6px;
  padding: 10px;
}

.auth-tab.active {
  background: var(--azul-tech);
  color: #FFFFFF;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form input,
.property-form input,
.scan-controls select,
.location-search-row input,
.location-filter-grid select {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--azul-tech);
  background: #FFFFFF;
  min-width: 0;
  height: 44px;
  font-size: 14px;
}

.auth-form button,
.property-form button,
.location-search-row button,
.map-toolbar button,
#analyzeBtn,
#captureBtn {
  background: var(--green-dark);
  color: #FFFFFF;
  border: 0;
  border-radius: 6px;
  padding: 11px 14px;
  font-weight: 700;
  min-height: 44px;
  font-size: 14px;
  white-space: nowrap;
}

.auth-beta-label {
  justify-self: end;
  margin-top: -2px;
  padding: 3px 8px;
  border: 1px solid rgba(21, 128, 61, .22);
  border-radius: 999px;
  background: rgba(240, 253, 244, .86);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.danger-action,
#deletePropertyBtn {
  background: #B91C1C !important;
  color: #FFFFFF;
}

.status-line {
  display: block;
  min-height: 18px;
  margin-top: 12px;
  color: var(--text-sub);
  font-size: 13px;
}

.status-line.success {
  color: #15803D;
  font-weight: 700;
}

.app-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.app-shell.app-enter {
  animation: fadeInUp 430ms ease both;
}

body:not([data-active-view="overview"]) .overview-only {
  display: none !important;
}

.view-panel.view-enter {
  animation: menuPanelIn 340ms cubic-bezier(.2, .8, .2, 1) both;
}

.view-panel.view-exit {
  animation: menuPanelOut 220ms ease both;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-36px);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(36px);
  }
}

@keyframes fadeOutScale {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(.985);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backgroundLineDrift {
  from {
    transform: translate3d(-18px, -12px, 0) scale(1);
  }
  to {
    transform: translate3d(18px, 14px, 0) scale(1.03);
  }
}

@keyframes carouselExitLeft {
  from { opacity: 1; transform: translateX(0) rotateY(0deg) scale(1); filter: brightness(1); }
  to { opacity: 0; transform: translateX(-32%) rotateY(24deg) scale(.90); filter: brightness(.88); }
}

@keyframes carouselExitRight {
  from { opacity: 1; transform: translateX(0) rotateY(0deg) scale(1); filter: brightness(1); }
  to { opacity: 0; transform: translateX(32%) rotateY(-24deg) scale(.90); filter: brightness(.88); }
}

@keyframes carouselEnterLeft {
  from { opacity: 0; transform: translateX(-32%) rotateY(-24deg) scale(.90); filter: brightness(.88); }
  to { opacity: 1; transform: translateX(0) rotateY(0deg) scale(1); filter: brightness(1); }
}

@keyframes carouselEnterRight {
  from { opacity: 0; transform: translateX(32%) rotateY(24deg) scale(.90); filter: brightness(.88); }
  to { opacity: 1; transform: translateX(0) rotateY(0deg) scale(1); filter: brightness(1); }
}

@keyframes menuPanelOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(8px) scale(.992); }
}

@keyframes menuPanelIn {
  from { opacity: 0; transform: translateY(12px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sideCardIn {
  from {
    opacity: 0;
    transform: translateX(18px) translateY(8px) scale(.975);
    filter: blur(2px);
  }
  60% {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes listItemRise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.985);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes fileNamePulse {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-1px) scale(1.018); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes fileNameShine {
  from { transform: translateX(-120%) skewX(-18deg); }
  to { transform: translateX(220%) skewX(-18deg); }
}

.header-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-title h1 {
  font-size: 24px;
  color: var(--azul-tech);
  font-weight: 700;
}

.header-title p {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 2px;
}

.toolbar-band, .grid-container, .placeholder-panel, .location-workbench {
  background-color: #FFFFFF;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.toolbar-band,
.scan-controls,
.analysis-workspace.is-open,
.analysis-workspace.is-open .analysis-workspace-body {
  overflow: visible;
}

.analysis-workspace.is-open {
  position: relative;
  z-index: 80;
}

.scan-controls {
  position: relative;
  z-index: 140;
}

body[data-active-view="analysis"] .grid-container,
body[data-active-view="history"] .grid-container,
body[data-active-view="overview"] .grid-container {
  position: relative;
  overflow: hidden;
  padding-top: 23px;
}

body[data-active-view="analysis"] .grid-container::before,
body[data-active-view="history"] .grid-container::before,
body[data-active-view="overview"] .grid-container::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #15803D, #4ADE80 62%, #BBF7D0);
}

body[data-active-view="analysis"] .grid-container::before {
  background: linear-gradient(90deg, #0E7490, #38BDF8 62%, #BAE6FD);
}

body[data-active-view="history"] .grid-container::before {
  background: linear-gradient(90deg, #4338CA, #818CF8 62%, #C7D2FE);
}

.location-workbench {
  display: grid;
  grid-template-columns: minmax(330px, .78fr) minmax(520px, 1.22fr);
  gap: 14px;
  padding: 16px;
}

.section-heading.compact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #DCFCE7;
  color: #166534;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.location-tools {
  min-width: 0;
}

.location-search-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 96px;
  gap: 8px;
}

.location-search-row button,
.map-toolbar button {
  min-height: 42px;
  padding: 9px 12px;
}

.location-results {
  display: grid;
  gap: 6px;
  min-height: 0;
  margin-top: 8px;
}

.location-result {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: #F8FAFC;
  color: var(--azul-tech);
  padding: 9px 10px;
  text-align: left;
}

.location-result strong,
.location-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-result small {
  color: var(--text-sub);
  font-size: 12px;
  margin-top: 2px;
}

.location-filter-grid {
  display: grid;
  grid-template-columns: .8fr .85fr 1.15fr;
  gap: 8px;
  margin-top: 9px;
}

.location-filter-grid > select,
.scan-controls > select#gridSelect,
.tool-card > select.tool-input,
.setting-line > select {
  display: none;
}

.location-status {
  margin-top: 9px;
  min-height: 36px;
  border: 1px dashed rgba(100, 116, 139, .34);
  border-radius: 7px;
  background: #F8FAFC;
  color: var(--text-sub);
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.35;
}

.map-shell {
  position: relative;
  min-width: 0;
}

.satellite-command-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  min-width: 0;
}

.satellite-command-bar > button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  background: #F8FAFC;
  color: var(--azul-tech);
  font-size: 12px;
  font-weight: 800;
}

.satellite-command-bar > button:hover:not(:disabled) {
  background: var(--azul-tech);
  border-color: var(--azul-tech);
  color: #FFFFFF;
}

.satellite-capture-status {
  margin-top: 7px;
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.35;
}

.map-shell:fullscreen,
.map-shell.map-fullscreen-fallback {
  width: 100vw;
  height: 100vh;
  padding: 14px;
  background: #0F172A;
  display: flex;
  flex-direction: column;
  z-index: 40000;
}

.map-shell:fullscreen .property-map,
.map-shell.map-fullscreen-fallback .property-map {
  flex: 1;
  height: auto;
  min-height: 0;
}

.map-shell:fullscreen .satellite-capture-status,
.map-shell.map-fullscreen-fallback .satellite-capture-status { color: #CBD5E1; }

body.dark-theme .satellite-command-bar > button {
  background: #171915;
  border-color: #34382F;
  color: #F2ECD9;
}

body.dark-theme .satellite-command-bar > button:hover:not(:disabled) {
  background: #607C49;
  border-color: #607C49;
}

@media (max-width: 920px) {
  .satellite-command-bar { flex-wrap: wrap; }
  .satellite-command-bar > button { flex: 1 1 130px; }
}

.property-map {
  width: 100%;
  height: clamp(285px, 30vh, 380px);
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #E2E8F0;
}

.map-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.map-toolbar button {
  background: #F8FAFC;
  color: var(--azul-tech);
  border: 1px solid var(--border-color);
}

.map-toolbar button:first-child {
  background: var(--azul-tech);
  color: #FFFFFF;
  border-color: var(--azul-tech);
}

.map-toolbar button.active {
  background: #F59E0B;
  border-color: #F59E0B;
  color: #111827;
}

.map-toolbar button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.leaflet-container {
  font-family: inherit;
}

.visual-carousel {
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  min-height: 62px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.visual-carousel.visible {
  display: flex;
  animation: visualTabsIn 360ms cubic-bezier(.2, .8, .2, 1) both;
}

.visual-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  gap: 13px;
  min-width: 0;
  height: 62px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  --tab-icon-color: #202832;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  filter: none;
  box-shadow: none;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.visual-tab::before {
  content: none;
}

.visual-tab .tab-icon,
.visual-tabs-band .expand-map-btn .tab-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  color: var(--tab-icon-color, currentColor);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .98;
  transition: color .18s ease, transform .18s ease, opacity .18s ease;
}

.visual-tab:hover .tab-icon,
.visual-tabs-band .expand-map-btn:hover:not(:disabled) .tab-icon {
  transform: translateY(-1px);
}

.visual-tab:hover {
  transform: none;
  filter: none;
  border-color: transparent;
  background: rgba(34, 197, 94, .06);
  box-shadow: none;
}

.visual-tab.active {
  background: transparent;
  border-color: transparent;
  color: #0B1220;
  --tab-icon-color: #16A34A;
  box-shadow: none;
}

.visual-tab.active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 5px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(90deg, #22C55E, #16A34A);
  box-shadow: 0 -2px 10px rgba(34, 197, 94, .30);
}

@keyframes visualTabsIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.map-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.visual-tabs-band {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  margin: 0 0 14px;
  padding: 7px 0;
  border: 0;
  background: transparent;
}

body.image-loaded[data-active-view="overview"] .visual-tabs-band {
  display: flex;
  animation: visualTabsIn 360ms cubic-bezier(.2, .8, .2, 1) both;
}

.visual-tabs-band .map-actions {
  width: min(100%, 1180px);
  min-height: 64px;
  padding: 0 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .80);
  border-radius: 4px;
  background:
    repeating-linear-gradient(155deg, rgba(22, 163, 74, .10) 0 1px, transparent 1px 29px),
    linear-gradient(90deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .86), rgba(255, 255, 255, .96));
  box-shadow: 0 11px 26px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .86);
}

.visual-tabs-band .visual-carousel {
  flex: 1 1 auto;
}

.visual-tabs-band .expand-map-btn {
  min-height: 62px;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 9px;
  border: 0;
  border-left: 1px solid rgba(148, 163, 184, .40);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.field-command-center {
  margin: 0 0 14px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(420px, 1.22fr);
  gap: 16px;
  align-items: stretch;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .92)),
    repeating-linear-gradient(135deg, rgba(21, 128, 61, .05) 0 1px, transparent 1px 24px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .92);
}

.ops-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.ops-eyebrow,
.ops-kpi span,
.ops-action span {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ops-main h2 {
  margin-top: 4px;
  color: var(--azul-tech);
  font-size: 22px;
  line-height: 1.1;
}

.ops-main p {
  margin-top: 6px;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.35;
}

.ops-source-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  border: 1px solid rgba(148, 163, 184, .30);
  background: #F8FAFC;
  color: #334155;
}

.ops-source-badge.source-real {
  border-color: rgba(14, 116, 144, .28);
  background: #ECFEFF;
  color: #0E7490;
}

.ops-source-badge.source-premium {
  border-color: rgba(21, 128, 61, .28);
  background: #DCFCE7;
  color: #166534;
}

.ops-source-badge.source-ready {
  border-color: rgba(37, 99, 235, .25);
  background: #EFF6FF;
  color: #1D4ED8;
}

.ops-source-badge.source-visual {
  border-color: rgba(217, 119, 6, .30);
  background: #FFFBEB;
  color: #B45309;
}

.ops-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ops-kpi,
.ops-action {
  min-width: 0;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(226, 232, 240, .88);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.ops-kpi strong,
.ops-action strong {
  color: var(--azul-tech);
  font-size: 18px;
  line-height: 1.15;
}

.ops-kpi small {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.3;
}

.ops-action {
  border-color: rgba(21, 128, 61, .22);
  background: linear-gradient(135deg, rgba(240, 253, 244, .90), rgba(255, 255, 255, .76));
}

.ops-action strong {
  font-size: 14px;
  line-height: 1.35;
}

.property-form {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(100px, .75fr) minmax(100px, .75fr) minmax(95px, .7fr) 180px;
  gap: 10px;
  margin-bottom: 12px;
  align-items: start;
}

.scan-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(118px, .45fr) minmax(220px, .85fr) minmax(150px, auto);
  gap: 10px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.property-actions {
  display: grid;
  min-width: 180px;
}

.camera-icon-btn {
  display: grid;
  place-items: center;
  line-height: 1;
  width: 74px;
  height: 74px;
  min-height: 74px !important;
  padding: 5px !important;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.62) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.camera-icon {
  width: 58px;
  height: 58px;
  display: block;
}

.camera-icon-btn:hover:not(:disabled) {
  background: #FFFFFF !important;
}

.native-property-select {
  display: none;
}

.animated-select {
  position: relative;
  min-width: 0;
  z-index: 20;
}

.animated-native-select {
  display: none !important;
}

.animated-select.open {
  z-index: 160;
}

.animated-select.selection-flash .animated-select-trigger {
  animation: selectChoiceFlash .5s ease;
}

@keyframes selectChoiceFlash {
  0% { border-color: var(--border-color); box-shadow: none; }
  45% { border-color: var(--verde-medio); box-shadow: 0 0 0 4px rgba(22, 163, 74, .14); transform: translateY(-1px); }
  100% { border-color: var(--border-color); box-shadow: none; transform: translateY(0); }
}

.animated-select-trigger {
  position: relative;
  width: 100%;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--azul-tech);
  padding: 11px 38px 11px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.animated-select-control {
  position: relative;
}

.animated-select-control::after,
.animated-select > button.animated-select-trigger::after {
  content: "⌄";
  position: absolute;
  right: 14px;
  top: 10px;
  color: var(--text-sub);
  font-weight: 900;
  transition: transform .24s ease;
}

.animated-select.open .animated-select-control::after,
.animated-select.open > button.animated-select-trigger::after {
  transform: rotate(180deg);
}

.animated-select-menu {
  position: absolute;
  inset: calc(100% + 6px) 0 auto 0;
  z-index: 180;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
  transform-origin: top center;
}

.animated-select-search {
  padding-right: 38px;
}

.animated-select-search::placeholder { color: var(--text-sub); opacity: .58; }

.animated-select-search:focus {
  border-color: var(--verde-medio);
  outline: 2px solid rgba(22, 163, 74, .16);
}

.animated-select-empty {
  padding: 10px;
  color: var(--text-sub);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.animated-select.open .animated-select-menu {
  display: grid;
  gap: 4px;
  animation: propertyMenuIn .6s cubic-bezier(.16, .86, .24, 1) both;
}

.animated-select.closing .animated-select-menu {
  display: grid;
  gap: 4px;
  animation: propertyMenuOut .22s ease both;
}

.animated-select-option {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--azul-tech);
  padding: 9px 10px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  white-space: normal;
  display: grid;
  gap: 3px;
}

.animated-select-option strong,
.animated-select-option small {
  display: block;
}

.animated-select-option small {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.animated-select-option:hover,
.animated-select-option.active {
  background: #F1F5F9;
}

#analyzeBtn.analysis-ready-pulse {
  animation: analysisReadyPulse .5s ease-in-out 4;
}

@keyframes analysisReadyPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); }
  50% { transform: scale(1.035); box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); }
}

body.dark-theme .animated-select-search {
  color: #F2ECD9;
}

.tool-select,
.setting-select {
  width: 100%;
}

.setting-line .animated-select-trigger {
  min-width: 150px;
}

.tool-file-name {
  display: block;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #F8FAFC;
  color: var(--text-sub);
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tool-file-name:hover {
  transform: translateY(-1px);
  border-color: rgba(21, 128, 61, .35);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.pest-preview {
  display: grid;
  gap: 9px;
  margin-top: 2px;
}

.pest-preview img {
  width: 100%;
  height: clamp(240px, 32vw, 380px);
  display: block;
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(236, 253, 245, .68)),
    #F8FAFC;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
}

.pest-preview-status {
  display: block;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

body.dark-theme .pest-preview img {
  background: #171915;
  border-color: #34382F;
}

.property-dropdown {
  position: relative;
  display: block;
  min-width: 220px;
  width: 100%;
  z-index: 180;
}

.property-dropdown.open {
  z-index: 900;
}

.property-current {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--azul-tech);
  padding: 11px 38px 11px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-current::after {
  content: "⌄";
  position: absolute;
  right: 14px;
  top: 10px;
  color: var(--text-sub);
  font-weight: 800;
}

.property-menu {
  position: absolute;
  inset: calc(100% + 6px) 0 auto 0;
  z-index: 901;
  display: none;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
  transform-origin: top center;
}

.property-dropdown.open .property-menu {
  display: grid;
  gap: 4px;
  animation: propertyMenuIn .6s cubic-bezier(.16, .86, .24, 1) both;
}

.property-option {
  display: grid;
  grid-template-columns: 1fr 32px;
  gap: 6px;
  align-items: center;
  border-radius: 6px;
  padding: 8px 7px 8px 10px;
  color: var(--azul-tech);
  cursor: pointer;
}

.property-option:hover,
.property-option.active {
  background: #F1F5F9;
}

.property-option strong,
.property-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-option small {
  color: var(--text-sub);
  font-size: 12px;
}

.property-trash {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(185, 28, 28, .10);
  color: #B91C1C;
  font-size: 15px;
}

@keyframes propertyMenuIn {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(.975);
    filter: blur(2px);
  }
  55% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes propertyMenuOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(.985);
    filter: blur(2px);
  }
}

.file-control input {
  display: none;
}

.file-control button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: inherit;
}

.file-control button:hover:not(:disabled),
.file-control button:active:not(:disabled) {
  transform: none;
  box-shadow: none;
  filter: none;
}

.file-control span {
  display: block;
  background: #F1F5F9;
  border: 1px solid var(--border-color);
  color: var(--azul-tech);
  border-radius: 6px;
  padding: 11px 14px;
  height: 44px;
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

#analyzeBtn {
  width: 100%;
  min-width: 150px;
}

.file-control span::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.52), transparent);
  opacity: 0;
  pointer-events: none;
}

.file-control:hover span {
  border-color: rgba(22, 101, 52, .34);
  box-shadow: 0 9px 22px rgba(15, 23, 42, .10);
  transform: translateY(-1px);
}

.file-control:active span {
  transform: translateY(1px) scale(.985);
}

.file-control.has-file span {
  background: linear-gradient(135deg, rgba(22,101,52,.12), #F8FAFC 55%, rgba(74,222,128,.18));
  border-color: rgba(22, 101, 52, .30);
  color: #14532D;
}

.file-control.has-file:hover span::after {
  animation: fileNameShine .9s ease;
  opacity: 1;
}

.file-control span.file-picked {
  animation: fileNamePulse .34s ease;
}

.section-heading h2, .placeholder-panel h2 {
  font-size: 16px;
  color: var(--azul-tech);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.expand-map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid var(--border-color);
  background: #F8FAFC;
  color: var(--azul-tech);
  border-radius: 6px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  min-height: 34px;
  white-space: nowrap;
}

.visual-tabs-band .expand-map-btn {
  color: #111827;
  --tab-icon-color: #202832;
  font-size: 20px;
  font-weight: 700;
  justify-content: center;
  text-align: center;
}

.visual-tabs-band .expand-map-btn::before {
  content: none;
}

.visual-tabs-band .expand-map-btn:hover:not(:disabled) {
  transform: none;
  filter: none;
  background: rgba(34, 197, 94, .06);
  box-shadow: none;
}

.expand-map-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.section-heading p, .placeholder-panel p {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 2px;
}

.grid-canvas {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: clamp(450px, calc((100vh / var(--ui-scale)) - 455px), 650px);
  min-height: 0;
  overflow: hidden;
  background: #F8FAFC;
  border-radius: 8px;
  padding: 6px;
  border: 1px solid var(--border-color);
  position: relative;
}

.grid-canvas.is-animating {
  pointer-events: none;
}

.grid-canvas.carousel-active {
  perspective: 1100px;
  transform-style: preserve-3d;
}

.grid-canvas.empty {
  display: grid;
  place-items: center;
  background-image: var(--empty-canvas-bg) !important;
  background-size: cover;
  background-position: center top;
}

.empty-state {
  background: rgba(15, 23, 42, 0.72);
  color: #FFFFFF;
  border-radius: 8px;
  padding: 16px 18px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .25);
  backdrop-filter: blur(3px);
}

.grid-map {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: var(--image-ratio, 1.45);
  background-image: var(--map-image);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
}


.visual-exit-left {
  animation: carouselExitLeft 520ms cubic-bezier(.2, .78, .2, 1) both;
  transform-origin: center;
}

.visual-exit-right {
  animation: carouselExitRight 520ms cubic-bezier(.2, .78, .2, 1) both;
  transform-origin: center;
}

.visual-enter-left {
  animation: carouselEnterLeft 520ms cubic-bezier(.2, .78, .2, 1) both;
  transform-origin: center;
}

.visual-enter-right {
  animation: carouselEnterRight 520ms cubic-bezier(.2, .78, .2, 1) both;
  transform-origin: center;
}

.carousel-ghost {
  position: absolute;
  inset: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.carousel-ghost > .grid-map,
.carousel-ghost > .heat-layout,
.carousel-ghost > .compare-layout {
  max-width: 100%;
  max-height: 100%;
}

.single-image-map {
  position: relative;
}

.heat-compare {
  cursor: ew-resize;
}

.heat-layout {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(132px, 1fr) minmax(220px, auto) minmax(132px, 1fr);
  gap: 12px;
  align-items: center;
}

.heat-side {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.heat-side small {
  display: block;
  color: var(--text-sub);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.heat-side.right {
  align-items: flex-end;
  text-align: right;
}

.heat-swatch {
  width: min(100%, 116px);
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
}

.heat-swatch.low {
  background: linear-gradient(90deg, #1D4ED8, #67E8F9);
}

.heat-swatch.built {
  background: linear-gradient(90deg, #94A3B8, #E5E7EB);
}

.heat-swatch.mid {
  background: linear-gradient(90deg, #F97316, #FACC15, #A3E635);
}

.heat-swatch.high {
  background: linear-gradient(90deg, #37d15f, #15803d);
}

.heat-swatch.water {
  background: linear-gradient(90deg, #EF4444, #B91C1C);
}

.heat-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: .96;
  background-image: var(--heat-image);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  clip-path: inset(0 calc(100% - var(--clip, 50%)) 0 0);
  border-right: 2px solid rgba(255,255,255,.92);
  box-shadow: 4px 0 10px rgba(15, 23, 42, .20);
}

.heat-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--clip, 50%);
  width: 0;
  border-left: 2px solid #FFFFFF;
  filter: drop-shadow(0 0 4px rgba(15,23,42,.45));
  pointer-events: none;
}

.heat-legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0,0,0,.75);
}

.heat-note {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: min(430px, calc(100% - 20px));
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(15, 23, 42, .78);
  color: #FFFFFF;
  font-size: 11px;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.heat-bar {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1D4ED8, #94A3B8, #7D1C5C, #EF4444, #F97316, #FACC15, #A3E635, #15803D, #0F6B46);
  border: 1px solid rgba(255,255,255,.65);
}

.heat-layout.rgb-cover .heat-bar {
  background: linear-gradient(90deg, #A3A39A, #E1BE2D, #BEDC2D, #69CD46, #23A546, #0F6969);
}

.heat-swatch.ndvi-scale {
  background: linear-gradient(90deg, #EF4444, #F97316, #FACC15, #A3E635, #15803D);
}

.heat-scale {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  pointer-events: none;
}

.heat-scale span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .70);
  color: #FFFFFF;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.heat-scale i {
  width: 13px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,.55);
}

.scale-water { background: linear-gradient(90deg, #1D4ED8, #67E8F9); }
.scale-built { background: linear-gradient(90deg, #94A3B8, #E5E7EB); }
.scale-low { background: linear-gradient(90deg, #7D1C5C, #EF4444, #F97316); }
.scale-mid { background: linear-gradient(90deg, #F97316, #FACC15); }
.scale-high { background: linear-gradient(90deg, #A3E635, #15803D); }

.fullscreen-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, .94);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fullscreen-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #FFFFFF;
}

.fullscreen-toolbar button {
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #FFFFFF;
  border-radius: 6px;
  padding: 9px 12px;
  font-weight: 800;
  position: relative;
  z-index: 2;
}

.fullscreen-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.fullscreen-stage.zoomed {
  overflow: auto;
  align-items: flex-start;
}

.fullscreen-stage .grid-map {
  width: auto;
  height: min(100%, calc(100vw / var(--image-ratio, 1.45)));
  max-width: 100%;
  max-height: 100%;
}

body.fullscreen-active .analysis-panel,
body.fullscreen-active .sidebar {
  visibility: hidden;
}

body.fullscreen-active .main-content {
  z-index: 20000;
}

body.fullscreen-active .fullscreen-viewer {
  visibility: visible;
  z-index: 20001;
}

body:has(.fullscreen-viewer:not(.hidden)) .analysis-panel,
body:has(.fullscreen-viewer:not(.hidden)) .sidebar {
  visibility: hidden;
}

body:has(.fullscreen-viewer:not(.hidden)) .main-content {
  z-index: 20000;
}

body:has(.fullscreen-viewer:not(.hidden)) .fullscreen-viewer {
  visibility: visible;
  z-index: 20001;
}

.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, .76);
}

.camera-box {
  width: min(760px, 96vw);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, .32);
}

.camera-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 6px;
  object-fit: cover;
}

.camera-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 800;
}

.camera-toolbar button {
  border: 1px solid rgba(31, 77, 43, .22);
  border-radius: 999px;
  background: #ECFDF3;
  color: var(--verde-campo);
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 900;
}

.camera-toolbar button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.camera-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.camera-actions #closeCameraBtn {
  border: 1px solid var(--border-color);
  background: #F8FAFC;
  color: var(--azul-tech);
  border-radius: 6px;
  padding: 11px 14px;
  font-weight: 800;
}

.image-source-modal {
  position: fixed;
  inset: 0;
  z-index: 30001;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(6px);
}

body.image-modal-active .sidebar,
body.image-modal-active .analysis-panel,
body.camera-modal-active .sidebar,
body.camera-modal-active .analysis-panel,
body.pdf-modal-active .sidebar,
body.pdf-modal-active .analysis-panel {
  filter: blur(7px);
  opacity: .62;
  pointer-events: none;
  transition: filter .18s ease, opacity .18s ease;
}

body.image-modal-active .main-content,
body.camera-modal-active .main-content,
body.pdf-modal-active .main-content {
  z-index: 30000;
}

body.image-modal-active .image-source-modal,
body.camera-modal-active .camera-modal,
body.pdf-modal-active .confirm-modal {
  visibility: visible;
  z-index: 30001;
}

.image-source-box {
  width: min(360px, 96vw);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #FFFFFF;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  animation: fadeInUp 220ms ease both;
}

.offline-note-field {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 900;
}

.offline-note-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 78px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  font-weight: 600;
  color: var(--text-main);
  background: #F8FAFC;
}

.capture-guide {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.4;
}

body.dark-theme .offline-note-field textarea {
  border-color: #34382F;
  background: #171915;
  color: #F2ECD9;
}

.image-source-box h3 {
  color: var(--azul-tech);
  font-size: 17px;
}

.image-source-box p {
  margin-top: 5px;
  color: var(--text-sub);
  font-size: 13px;
}

.image-source-actions {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.image-source-actions button {
  min-height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #F8FAFC;
  color: var(--azul-tech);
  font-weight: 800;
}

.image-source-actions button:first-child {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #FFFFFF;
}

.image-source-actions button:nth-child(2) {
  background: var(--azul-tech);
  border-color: var(--azul-tech);
  color: #FFFFFF;
}

body.dark-theme .image-source-box {
  background: #1D1F1A;
  border-color: var(--border-color);
}

body.dark-theme .image-source-box h3 {
  color: #F8FAFC;
}

body.dark-theme .image-source-actions button {
  background: #171915;
  color: var(--text-main);
  border-color: var(--border-color);
}

body.dark-theme .image-source-actions button:first-child {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #FFFFFF;
}

body.dark-theme .image-source-actions button:nth-child(2) {
  background: #11140F;
  border-color: #3A4034;
  color: #F2ECD9;
}

.compare-layout {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(210px, .42fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.compare-controls {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(248, 250, 252, .88);
}

.compare-controls label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.compare-controls select {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  background: #FFFFFF;
  color: var(--azul-tech);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.compare-stage {
  min-height: 280px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #0F172A;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .10);
}

.compare-after-layer,
.compare-before-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.compare-after-layer {
  background-image: var(--after-image);
}

.compare-before-layer {
  background-image: var(--before-image);
  clip-path: inset(0 calc(100% - var(--clip, 50%)) 0 0);
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--clip, 50%);
  width: 2px;
  background: rgba(255,255,255,.92);
  border-right: 2px solid rgba(255,255,255,.86);
  box-shadow: 0 0 0 1px rgba(15,23,42,.15);
}

.compare-label {
  position: absolute;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(15, 23, 42, .72);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}

.compare-label.before {
  left: 10px;
}

.compare-label.after {
  right: 10px;
}

.toast-host {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 50000;
  width: min(460px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  justify-items: stretch;
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(22, 101, 52, .22);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .96);
  color: var(--azul-tech);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24), inset 0 1px 0 rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  animation: toastIn .28s cubic-bezier(.2, .8, .2, 1) both;
}

.toast.error {
  border-color: rgba(185, 28, 28, .28);
}

.toast.info {
  border-color: rgba(14, 116, 144, .28);
}

.toast-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #15803D, #4ADE80);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(21, 128, 61, .22);
}

.toast.error .toast-icon {
  background: linear-gradient(135deg, #991B1B, #EF4444);
  box-shadow: 0 10px 22px rgba(185, 28, 28, .22);
}

.toast.info .toast-icon {
  background: linear-gradient(135deg, #0E7490, #38BDF8);
  box-shadow: 0 10px 22px rgba(14, 116, 144, .22);
}

.toast strong {
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}

.toast span {
  display: block;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.4;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 30001;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .68);
  backdrop-filter: blur(7px);
}

.confirm-box {
  width: min(430px, 96vw);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px;
  background: #FFFFFF;
  color: var(--azul-tech);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
  animation: modalIn .2s ease both;
}

.confirm-box h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.confirm-box p {
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.confirm-actions button {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 9px 12px;
  font-weight: 800;
}

.confirm-actions #confirmCancel {
  background: #F8FAFC;
  color: var(--azul-tech);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 4), 1fr);
  grid-template-rows: repeat(var(--grid-rows, 4), 1fr);
  gap: 4px;
  padding: 4px;
}

.grid-cell {
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  color: #FFFFFF;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  font-size: 12px;
  transition: all 0.2s;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background-color: color-mix(in srgb, var(--cell-color, #22C55E) 40%, transparent);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--cell-color, #22C55E) 43%, transparent),
      color-mix(in srgb, var(--cell-color, #22C55E) 35%, transparent));
  box-shadow:
    inset 0 0 0 999px color-mix(in srgb, var(--cell-color, #22C55E) 10%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, .20);
  backdrop-filter: saturate(1.28) contrast(1.04);
}

.grid-cell:hover, .grid-cell.selected {
  border: 2px solid #FFFFFF;
  transform: scale(1.01);
}

.grid-cell small {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  opacity: 0.92;
}

.grid-overlay.grid-dense,
.grid-overlay.grid-ultra-dense {
  gap: 2px;
  padding: 2px;
}

.grid-overlay.grid-dense .grid-cell,
.grid-overlay.grid-ultra-dense .grid-cell {
  justify-content: center;
  align-items: center;
  padding: 2px;
  font-size: 8px;
}

.grid-overlay.grid-dense .grid-cell strong,
.grid-overlay.grid-dense .grid-cell small,
.grid-overlay.grid-ultra-dense .grid-cell strong,
.grid-overlay.grid-ultra-dense .grid-cell small {
  display: none;
}

.grid-overlay.grid-ultra-dense .grid-cell {
  font-size: 7px;
}

.grid-overlay.grid-dense .grid-cell:hover,
.grid-overlay.grid-dense .grid-cell.selected,
.grid-overlay.grid-ultra-dense .grid-cell:hover,
.grid-overlay.grid-ultra-dense .grid-cell.selected {
  z-index: 3;
  transform: scale(1.08);
}

.grid-overlay.grid-single .grid-cell {
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 18px;
  text-align: center;
}

.cell-low { --cell-color: #22C55E; }
.cell-mid { --cell-color: #EAB308; }
.cell-high { --cell-color: #EF4444; }

.table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.analysis-precision-panel {
  margin-top: 14px;
  min-height: 142px;
  display: grid;
  grid-template-columns: minmax(150px, .34fr) minmax(260px, 1fr) minmax(220px, .65fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid rgba(203, 213, 225, .92);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #FFFFFF, #F8FAFC);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.analysis-precision-panel.empty {
  min-height: 92px;
}

.precision-empty {
  grid-column: 1 / -1;
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px dashed rgba(100, 116, 139, .28);
  border-radius: 7px;
  padding: 14px;
  color: var(--text-sub);
  background: rgba(248, 250, 252, .82);
}

.precision-empty strong {
  color: var(--azul-tech);
  font-size: 14px;
}

.precision-empty span {
  font-size: 12px;
  line-height: 1.4;
}

.precision-thumb {
  min-height: 114px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 7px;
  background: linear-gradient(135deg, #ECFDF5, #E2E8F0);
  position: relative;
}

.precision-thumb img {
  width: 100%;
  height: 100%;
  min-height: 114px;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.04);
}

.precision-thumb-grid {
  height: 100%;
  min-height: 114px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 9px;
  transform: rotate(-11deg) scale(.9);
}

.precision-thumb-grid span {
  border-radius: 2px;
}

.precision-thumb-grid .high { background: #15803D; }
.precision-thumb-grid .mid { background: #86EFAC; }
.precision-thumb-grid .low { background: #DCFCE7; }

.precision-chart {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
}

.precision-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.precision-chart-head strong,
.precision-chart-head span {
  display: block;
}

.precision-chart-head strong {
  color: #0F172A;
  font-size: 14px;
}

.precision-chart-head span {
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.3;
  text-align: right;
}

.precision-bars {
  min-height: 88px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
  align-items: end;
  gap: 7px;
  padding: 8px 6px 0;
  border-left: 1px solid rgba(148, 163, 184, .38);
  border-bottom: 1px solid rgba(148, 163, 184, .38);
}

.precision-bar {
  height: 100%;
  min-height: 82px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 5px;
}

.precision-bar span {
  width: 100%;
  min-height: 8px;
  height: var(--bar-height, 50%);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #22C55E, #15803D);
  box-shadow: 0 5px 10px rgba(21, 128, 61, .16);
}

.precision-bar.risk-mid span {
  background: linear-gradient(180deg, #FBBF24, #D97706);
  box-shadow: 0 5px 10px rgba(217, 119, 6, .16);
}

.precision-bar.risk-high span {
  background: linear-gradient(180deg, #F87171, #DC2626);
  box-shadow: 0 5px 10px rgba(220, 38, 38, .16);
}

.precision-bar small {
  color: #64748B;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.precision-stats {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: center;
  border-left: 1px solid rgba(203, 213, 225, .82);
  padding-left: 14px;
}

.precision-stat {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 7px;
  padding: 8px;
  background: rgba(255, 255, 255, .72);
}

.precision-stat span,
.precision-stat strong {
  display: block;
}

.precision-stat span {
  color: #64748B;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.precision-stat strong {
  margin-top: 3px;
  color: #0F172A;
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.feedback-panel,
.ml-summary-panel {
  margin-top: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  background: #FBFDFF;
  position: relative;
  overflow: hidden;
  padding-top: 19px;
}

.feedback-panel {
  overflow: visible;
}

.feedback-panel::before,
.ml-summary-panel::before,
.history-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #0F766E, #2DD4BF);
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
}

.feedback-grid .animated-select,
.planting-select-line .animated-select {
  width: 100%;
}

.feedback-panel .animated-select.open,
.planting-search-card .animated-select.open {
  z-index: 260;
}

.feedback-panel .animated-select-trigger,
.planting-select-line .animated-select-trigger {
  height: 42px;
  font-size: 13px;
}

.feedback-panel .animated-select-menu,
.planting-select-line .animated-select-menu {
  max-height: 230px;
}

.feedback-panel select,
.feedback-panel input,
.feedback-panel textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--azul-tech);
  padding: 10px 11px;
  font-size: 13px;
}

.feedback-panel textarea {
  min-height: 70px;
  margin-top: 8px;
  resize: vertical;
}

.feedback-panel > #feedbackSubmit {
  margin-top: 8px;
  border: 0;
  border-radius: 6px;
  background: var(--green-dark);
  color: #FFFFFF;
  padding: 10px 13px;
  font-weight: 800;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  overflow: visible;
}

.tool-hero,
.tool-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.tool-hero {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
}

.tool-card {
  padding: 16px;
  display: grid;
  gap: 11px;
  align-self: start;
  position: relative;
  overflow: hidden;
  padding-top: 22px;
}

.tool-card:has(.animated-select.open),
.tool-card.select-open-host {
  overflow: visible;
  z-index: 120;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #15803D, #4ADE80);
}

.tool-grid .tool-card:nth-of-type(2)::before {
  background: linear-gradient(90deg, #0E7490, #38BDF8);
}

.tool-grid .tool-card:nth-of-type(3)::before {
  background: linear-gradient(90deg, #7F1D1D, #F87171);
}

.tool-grid .tool-card:nth-of-type(4)::before {
  background: linear-gradient(90deg, #A16207, #FACC15);
}

.tool-grid .tool-card:nth-of-type(5)::before {
  background: linear-gradient(90deg, #374151, #94A3B8);
}

.tool-card-wide {
  grid-column: 1 / -1;
  align-self: stretch;
}

.pest-dashboard,
.climate-dashboard,
.planting-dashboard {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.pest-dashboard > .tool-hero,
.climate-dashboard > .tool-hero,
.planting-dashboard > .tool-hero,
.pest-dashboard > .tool-card-wide,
.climate-dashboard > .tool-card-wide,
.planting-dashboard > .tool-card-wide {
  grid-column: 1 / -1;
}

.pest-dashboard .tool-card,
.climate-dashboard .tool-card,
.planting-dashboard .tool-card {
  border-color: rgba(203, 213, 225, .86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.pest-stage-card {
  padding-top: 16px;
}

.pest-diagnostic-card {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 100% 0, rgba(248, 113, 113, .10), transparent 0 34%),
    #FFFFFF;
}

.pest-diagnostic-card .card-header {
  justify-content: space-between;
}

.pest-diagnostic-card h3,
.pest-diagnostic-card h4 {
  text-align: left;
}

.pest-diagnostic-card p {
  color: var(--text-sub);
  line-height: 1.5;
}

.pest-stage-card .tool-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  position: relative;
}

.pest-stage-card .tool-steps::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 15px;
  height: 2px;
  background: linear-gradient(90deg, #166534 0 50%, #CBD5E1 50%);
}

.pest-stage-card .tool-steps span {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.pest-stage-card .tool-steps span::before {
  content: attr(data-step);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  background: #FFFFFF;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.pest-stage-card .tool-steps span:nth-child(1)::before,
.pest-stage-card .tool-steps span:nth-child(2)::before {
  border-color: #166534;
  background: #166534;
  color: #FFFFFF;
}

.pest-stage-card .tool-steps span:nth-child(1)::before { content: "1"; }
.pest-stage-card .tool-steps span:nth-child(2)::before { content: "2"; }
.pest-stage-card .tool-steps span:nth-child(3)::before { content: "3"; }
.pest-stage-card .tool-steps span:nth-child(4)::before { content: "4"; }

.pest-input-card,
.pest-symptom-card {
  grid-column: span 6;
}

.pest-result-card,
.pest-learning-card {
  grid-column: 1 / -1;
}

.tool-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-field-line {
  display: grid;
  gap: 7px;
}

.tool-field-line span {
  color: var(--azul-tech);
  font-size: 13px;
  font-weight: 800;
}

.pest-dropzone {
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 7px;
  border: 1px dashed rgba(100, 116, 139, .42);
  border-radius: 8px;
  background: #F8FAFC;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}

.pest-dropzone:hover:not(:disabled) {
  transform: none;
  filter: none;
  background: #F0FDF4;
  border-color: rgba(21, 128, 61, .36);
  box-shadow: inset 0 0 0 1px rgba(21, 128, 61, .08);
}

.upload-glyph {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(21, 128, 61, .24);
  border-radius: 999px;
  background: #FFFFFF;
  color: #166534;
  font-family: "Segoe UI Symbol", "Segoe UI Emoji", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
}

.upload-glyph::before,
.upload-glyph::after {
  content: none;
}

.pest-symptom-card .check-grid label {
  min-height: 50px;
  justify-content: flex-start;
  gap: 10px;
  background: #FBFDF8;
}

.pest-symptom-card .check-grid label:has(input:checked) {
  border-color: rgba(21, 128, 61, .32);
  background: #F0FDF4;
  box-shadow: inset 0 0 0 1px rgba(21, 128, 61, .07);
}

.pest-symptom-card .check-grid input {
  width: 14px;
  height: 14px;
  accent-color: #166534;
}

.symptom-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(51, 65, 85, .16);
  border-radius: 8px;
  background: #FFFFFF;
  color: #334155;
  font-family: "Segoe UI Symbol", "Segoe UI Emoji", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 28px;
  box-shadow: 0 5px 12px rgba(15, 23, 42, .06);
}

.symptom-icon.leaf {
  background: #ECFDF3;
  border-color: rgba(21, 128, 61, .22);
  color: #166534;
}

.symptom-icon.sun::before,
.symptom-icon.sun::after {
  content: none;
}

.symptom-icon.sun {
  background: #FFFBEB;
  border-color: rgba(180, 83, 9, .22);
  color: #B45309;
}

.symptom-icon.holes::before,
.symptom-icon.holes::after {
  content: none;
}

.symptom-icon.holes {
  background: #EEF6FF;
  border-color: rgba(37, 99, 235, .18);
  color: #1D4ED8;
}

.symptom-icon.wilt {
  background: #F8FAFC;
  border-color: rgba(71, 85, 105, .18);
  color: #475569;
}

.pest-result-card p {
  border: 1px solid rgba(21, 128, 61, .18);
  border-radius: 8px;
  background: rgba(220, 252, 231, .58);
  padding: 12px;
  color: #14532D;
  font-weight: 700;
}

.pest-learning-card {
  align-content: center;
}

.badge-warn {
  background: #FEF9C3;
  color: #854D0E;
  border-color: rgba(217, 119, 6, .24);
}

.climate-metrics-card {
  grid-column: 1 / -1;
}

.climate-dashboard .metric-grid > .climate-metric {
  min-height: 88px;
  display: grid;
  align-content: center;
  padding-left: 84px;
  position: relative;
  overflow: hidden;
}

.climate-dashboard .metric-grid > .climate-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 64px;
  background: var(--metric-accent, #38BDF8);
}

.climate-dashboard .metric-grid > .climate-metric::after {
  content: none;
  position: absolute;
  left: 20px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  border: 3px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
}

.climate-dashboard .metric-grid > .climate-metric:nth-child(1) { --metric-accent: #3B82F6; background: #DBEAFE; }
.climate-dashboard .metric-grid > .climate-metric:nth-child(2) { --metric-accent: #38BDF8; background: #E0F2FE; }
.climate-dashboard .metric-grid > .climate-metric:nth-child(3) { --metric-accent: #22C55E; background: #DCFCE7; }
.climate-dashboard .metric-grid > .climate-metric:nth-child(4) { --metric-accent: #8B5CF6; background: #F3E8FF; }

.climate-scenario-card {
  grid-column: span 3;
}

.climate-risk-card,
.climate-operation-card {
  grid-column: span 4;
}

.climate-days-card {
  grid-column: span 5;
}

.climate-balance-card,
.climate-windows-card {
  grid-column: span 6;
}

.climate-alerts-card,
.climate-check-card {
  grid-column: span 6;
}

.climate-field-preview {
  min-height: 170px;
  display: grid;
  align-content: end;
  gap: 3px;
  border-radius: 8px;
  padding: 12px;
  color: #FFFFFF;
  background:
    linear-gradient(135deg, rgba(21, 128, 61, .18), rgba(15, 23, 42, .10)),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255, 255, 255, .34) 23px 24px),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255, 255, 255, .34) 23px 24px),
    linear-gradient(135deg, #6B8E3E, #8A6A3C 48%, #315C37);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32);
}

.climate-field-preview span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.climate-field-preview strong {
  font-size: 13px;
}

.climate-days {
  grid-template-columns: repeat(5, minmax(72px, 1fr));
}

.climate-day {
  text-align: center;
}

.climate-day::before {
  content: "";
  width: 28px;
  height: 28px;
  display: block;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FACC15, #F97316);
  box-shadow: 16px 10px 0 -7px rgba(56, 189, 248, .85);
}

.climate-balance {
  min-height: 170px;
  align-content: end;
  padding-top: 34px;
  background:
    linear-gradient(180deg, transparent 0 32%, rgba(59, 130, 246, .18) 33% 53%, rgba(34, 197, 94, .18) 54%),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, .20) 0 1px, transparent 1px 34px);
  border-radius: 8px;
}

.climate-window {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.climate-window span {
  grid-column: 1 / -1;
}

.climate-window::after {
  content: "Apto";
  align-self: start;
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(34, 197, 94, .16);
  color: #166534;
  font-size: 11px;
  font-weight: 900;
}

.climate-window[data-risk="moderado"]::after {
  content: "Recomendado";
  background: rgba(250, 204, 21, .20);
  color: #854D0E;
}

.climate-window[data-risk="alto"]::after {
  content: "Risco";
  background: rgba(248, 113, 113, .20);
  color: #991B1B;
}

body[data-active-view="weather"] .climate-dashboard {
  gap: 12px;
}

body[data-active-view="weather"] .climate-dashboard .tool-hero {
  min-height: 74px;
  padding: 14px 16px;
  border-radius: 8px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .88)),
    repeating-linear-gradient(135deg, rgba(21, 128, 61, .045) 0 1px, transparent 1px 20px);
}

body[data-active-view="weather"] .climate-dashboard .tool-hero h2 {
  font-size: 22px;
  line-height: 1.05;
}

body[data-active-view="weather"] .climate-dashboard .tool-hero p {
  max-width: 760px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

body[data-active-view="weather"] .climate-dashboard .tool-card {
  padding: 13px;
  border-radius: 8px;
  gap: 9px;
}

body[data-active-view="weather"] .climate-dashboard .tool-card h3 {
  font-size: 13px;
  line-height: 1.15;
}

.climate-metrics-card {
  padding: 12px !important;
}

.climate-metrics-card h3 {
  margin-bottom: 2px;
}

.climate-dashboard .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.climate-dashboard .metric-grid > .climate-metric {
  min-height: 88px;
  border: 1px solid rgba(203, 213, 225, .88);
  border-radius: 8px;
  padding: 12px 14px 11px 82px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

.climate-dashboard .metric-grid > .climate-metric::before {
  width: 68px;
  border-radius: 8px 0 0 8px;
}

.climate-metric-icon {
  position: absolute;
  z-index: 1;
  left: 7px;
  top: 50%;
  width: 54px;
  height: 54px;
  object-fit: contain;
  transform: translateY(-50%);
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, .20));
}

.climate-metric-temperature .climate-metric-icon { width: 57px; height: 57px; left: 5px; }
.climate-metric-operation .climate-metric-icon { width: 52px; height: 52px; left: 8px; }

.climate-dashboard .metric-grid .climate-metric-label {
  display: block;
  margin: 0 0 3px;
  color: #172033;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.climate-dashboard .metric-grid strong {
  color: #071223;
  font-size: 25px;
  line-height: 1;
}

.climate-dashboard .metric-grid .climate-metric-detail {
  margin-top: 5px;
  color: #475569;
  font-size: 11px;
  line-height: 1.3;
}

.climate-scenario-card {
  grid-column: span 3;
}

.climate-operation-card {
  grid-column: span 5;
}

.climate-risk-card {
  grid-column: span 4;
}

.climate-days-card {
  grid-column: span 4;
}

.climate-balance-card,
.climate-windows-card {
  grid-column: span 4;
}

.climate-alerts-card,
.climate-check-card {
  grid-column: span 6;
}

.climate-field-preview {
  min-height: 178px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .95) 0 3px, rgba(255, 255, 255, .35) 4px 12px, transparent 13px),
    linear-gradient(135deg, rgba(15, 23, 42, .08), rgba(15, 23, 42, .32)),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255, 255, 255, .30) 23px 24px),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255, 255, 255, .24) 23px 24px),
    linear-gradient(135deg, #7C8F4A 0 28%, #9B7A48 29% 53%, #47673A 54% 78%, #2F5E42 79%);
}

.climate-property-grid {
  gap: 6px;
  margin-bottom: 8px;
}

.climate-property-item {
  padding: 8px 9px;
}

.climate-property-item strong,
.climate-window strong,
.climate-alert strong,
.climate-check strong,
.climate-balance-row strong {
  font-size: 12px;
}

.climate-property-item span,
.climate-window span,
.climate-alert span,
.climate-check span,
.climate-balance-row span {
  font-size: 11px;
}

.climate-days {
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  gap: 7px;
}

.climate-day {
  min-height: 134px;
  padding: 10px 8px;
  background: #F8FAFC;
}

.climate-day::before {
  width: 30px;
  height: 30px;
  margin-bottom: 7px;
}

.climate-day[data-weather="rain"]::before {
  border-radius: 10px;
  background:
    radial-gradient(circle at 38% 35%, #FFFFFF 0 12%, transparent 13%),
    linear-gradient(180deg, #60A5FA 0 55%, #1D4ED8 56%);
  box-shadow: 0 8px 0 -5px #38BDF8, 10px 12px 0 -7px #38BDF8, -9px 12px 0 -7px #38BDF8;
}

.climate-day[data-weather="cloud"]::before {
  border-radius: 999px;
  background: linear-gradient(135deg, #E0F2FE, #93C5FD);
  box-shadow: 15px 8px 0 -6px #38BDF8;
}

.climate-day[data-weather="sun"]::before,
.climate-day[data-weather="clear"]::before {
  background: linear-gradient(135deg, #FDE047, #F97316);
  box-shadow: 0 0 0 5px rgba(250, 204, 21, .18);
}

.climate-day b {
  display: block;
  margin-top: 3px;
  color: var(--azul-tech);
  font-size: 16px;
  line-height: 1;
}

.climate-day small {
  display: block;
  margin: 4px 0 7px;
  color: var(--text-sub);
  font-size: 10px;
  font-weight: 900;
}

.climate-day em {
  display: inline-flex;
  justify-content: center;
  margin-top: 7px;
  border-radius: 999px;
  background: rgba(21, 128, 61, .12);
  color: #166534;
  padding: 4px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.climate-day[data-risk="moderado"] em {
  background: rgba(250, 204, 21, .22);
  color: #854D0E;
}

.climate-day[data-risk="alto"] em {
  background: rgba(248, 113, 113, .18);
  color: #991B1B;
}

.climate-balance {
  min-height: 0;
  gap: 7px;
  padding: 0;
  background: transparent;
}

.climate-balance-chart {
  min-height: 104px;
  display: grid;
  align-content: end;
  gap: 8px;
  border: 1px solid rgba(203, 213, 225, .9);
  border-radius: 8px;
  padding: 11px;
  background:
    repeating-linear-gradient(0deg, rgba(148, 163, 184, .20) 0 1px, transparent 1px 25px),
    linear-gradient(180deg, #FFFFFF, #F8FAFC);
}

.climate-balance-chart div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.climate-balance-chart strong {
  color: var(--azul-tech);
  font-size: 12px;
}

.climate-balance-chart span {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 900;
}

.climate-balance-chart i {
  display: block;
  height: 36px;
  width: var(--balance-fill, 50%);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #60A5FA, #22C55E);
  box-shadow: 0 10px 20px rgba(37, 99, 235, .18);
}

.climate-balance-chart.deficit i {
  justify-self: end;
  background: linear-gradient(180deg, #F97316, #EF4444);
  box-shadow: 0 10px 20px rgba(239, 68, 68, .16);
}

.climate-balance-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px 9px;
}

.climate-window,
.climate-alert,
.climate-check {
  padding: 9px 10px 9px 15px;
}

.climate-window {
  grid-template-columns: minmax(0, 1fr) auto;
}

.climate-window::after {
  min-width: 86px;
  text-align: center;
}

body.dark-theme[data-active-view="weather"] .climate-dashboard .tool-hero,
body.dark-theme .climate-balance-chart {
  background:
    linear-gradient(135deg, rgba(21, 24, 18, .96), rgba(17, 20, 15, .88)),
    repeating-linear-gradient(135deg, rgba(74, 222, 128, .06) 0 1px, transparent 1px 20px);
}

body.dark-theme .climate-dashboard .metric-grid strong,
body.dark-theme .climate-day b,
body.dark-theme .climate-balance-chart strong {
  color: #F2ECD9;
}

body.dark-theme .climate-dashboard .metric-grid span,
body.dark-theme .climate-day small,
body.dark-theme .climate-balance-chart span {
  color: #B7C5B3;
}

@media (min-width: 1171px) {
  .climate-scenario-card {
    grid-column: 1 / 4;
    grid-row: 3 / span 2;
  }

  .climate-risk-card {
    grid-column: 4 / 8;
    grid-row: 3;
  }

  .climate-operation-card {
    grid-column: 8 / 13;
    grid-row: 3;
  }

  .climate-days-card {
    grid-column: 4 / 13;
    grid-row: 4;
  }

  .climate-balance-card {
    grid-column: 1 / 5;
    grid-row: 5;
  }

  .climate-windows-card {
    grid-column: 5 / 13;
    grid-row: 5;
  }

  .climate-alerts-card {
    grid-column: 1 / 7;
    grid-row: 6;
  }

  .climate-check-card {
    grid-column: 7 / 13;
    grid-row: 6;
  }

  .climate-window-list,
  .climate-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.planting-search-card {
  grid-column: 1 / -1;
}

.planting-window-card,
.planting-terrain-card,
.planting-climate-card,
.planting-harvest-card {
  grid-column: span 6;
  min-height: 190px;
}

.planting-window-card { border-top: 4px solid #EF4444; }
.planting-terrain-card { border-top: 4px solid #FACC15; }
.planting-climate-card { border-top: 4px solid #6366F1; }
.planting-harvest-card { border-top: 4px solid #22C55E; }

.planting-window-visual {
  display: grid;
  grid-template-columns: repeat(3, 58px);
  justify-content: end;
  align-items: center;
  gap: 26px;
  position: relative;
  margin: 12px 0 8px;
}

.planting-window-visual::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(21, 128, 61, .26), rgba(239, 68, 68, .26), rgba(34, 197, 94, .30));
}

.planting-window-visual span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid rgba(148, 163, 184, .38);
  color: #0F172A;
  font-family: "Segoe UI Emoji", "Segoe UI Symbol", system-ui, sans-serif;
  font-size: 28px;
  line-height: 1;
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .10);
}

.planting-window-visual .sprout {
  background: #ECFDF3;
  border-color: rgba(21, 128, 61, .22);
}

.planting-window-visual .fruit {
  background: #FFF1F2;
  border-color: rgba(239, 68, 68, .22);
}

.planting-window-visual .tree {
  background: #F0FDF4;
  border-color: rgba(34, 197, 94, .24);
}

.planting-terrain-preview {
  min-height: 104px;
  width: min(180px, 45%);
  justify-self: end;
  border-radius: 8px;
  background:
    linear-gradient(145deg, transparent 0 42%, rgba(255,255,255,.45) 43% 46%, transparent 47%),
    linear-gradient(32deg, #A3E635 0 29%, #FACC15 30% 43%, #86EFAC 44% 72%, #4ADE80 73%);
  transform: rotate(-8deg);
  box-shadow: 0 14px 26px rgba(15, 23, 42, .13);
}

.planting-climate-icons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  min-height: 64px;
}

.planting-climate-icons span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .30);
  font-family: "Segoe UI Emoji", "Segoe UI Symbol", system-ui, sans-serif;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(15, 23, 42, .08);
}

.planting-climate-icons .sun {
  background: #FEF9C3;
  border-color: rgba(202, 138, 4, .22);
  color: #CA8A04;
}

.planting-climate-icons .cloud {
  background: #EFF6FF;
  border-color: rgba(37, 99, 235, .18);
  color: #2563EB;
}

.planting-climate-icons .drop {
  background: #ECFEFF;
  border-color: rgba(8, 145, 178, .18);
  color: #0891B2;
}

.harvest-callout {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #166534;
  font-size: 20px;
}

.harvest-callout span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #DCFCE7;
  color: #15803D;
  font-size: 18px;
  line-height: 1;
}

.planting-steps-card,
.planting-description-card {
  grid-column: 1 / -1;
}

.planting-steps-card .climate-checklist {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.planting-steps-card .climate-check {
  min-height: 70px;
  padding-left: 44px;
}

.planting-steps-card .climate-check::before {
  left: 12px;
  top: 16px;
  bottom: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0F172A;
  opacity: 1;
}

.tool-hero h2,
.tool-card h3 {
  color: var(--azul-tech);
}

.tool-hero h2 {
  font-size: 18px;
}

.tool-card h3 {
  font-size: 15px;
}

.tool-hero p,
.tool-card p {
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.5;
}

.tool-steps,
.metric-grid,
.check-grid {
  display: grid;
  gap: 10px;
}

.tool-steps,
.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-steps > span,
.metric-grid > div {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #F8FAFC;
  padding: 12px;
  color: var(--azul-tech);
  font-size: 13px;
  font-weight: 800;
}

.metric-grid span {
  display: block;
  margin-top: 5px;
  color: var(--text-sub);
  font-weight: 600;
  line-height: 1.35;
}

.planting-input-grid {
  grid-template-columns: minmax(190px, 1fr) minmax(230px, 1fr) minmax(170px, .8fr) minmax(190px, 1fr);
}

.planting-select-line {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 92px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #F8FAFC;
  padding: 12px;
}

.planting-select-line .animated-select-trigger {
  background: #FFFFFF;
}

.planting-dashboard.planting-refresh .planting-window-card,
.planting-dashboard.planting-refresh .planting-terrain-card,
.planting-dashboard.planting-refresh .planting-climate-card,
.planting-dashboard.planting-refresh .planting-harvest-card,
.planting-dashboard.planting-refresh .planting-steps-card,
.planting-dashboard.planting-refresh .planting-description-card {
  animation: plantingPanelRefresh .56s cubic-bezier(.16, .86, .24, 1) both;
}

.planting-dashboard.planting-refresh .planting-terrain-card { animation-delay: 45ms; }
.planting-dashboard.planting-refresh .planting-climate-card { animation-delay: 90ms; }
.planting-dashboard.planting-refresh .planting-harvest-card { animation-delay: 135ms; }
.planting-dashboard.planting-refresh .planting-steps-card { animation-delay: 180ms; }
.planting-dashboard.planting-refresh .planting-description-card { animation-delay: 225ms; }

@keyframes plantingPanelRefresh {
  from { opacity: .18; transform: translateY(10px); filter: saturate(.72); }
  to { opacity: 1; transform: translateY(0); filter: saturate(1); }
}

.planting-select-line strong {
  color: var(--azul-tech);
  font-size: 13px;
}

body.dark-theme .planting-select-line strong {
  color: #F2ECD9;
}

body.dark-theme .planting-select-line {
  background: #171915;
}

.climate-property-grid,
.climate-days,
.climate-window-list,
.climate-alert-list,
.climate-checklist,
.climate-balance {
  display: grid;
  gap: 10px;
}

.climate-property-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.climate-property-title {
  margin: 2px 0 2px;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.climate-property-item,
.climate-day,
.climate-window,
.climate-alert,
.climate-check,
.climate-balance-row {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #F8FAFC;
  padding: 11px 12px;
}

.climate-property-item strong,
.climate-day strong,
.climate-window strong,
.climate-alert strong,
.climate-check strong,
.climate-balance-row strong {
  display: block;
  color: var(--azul-tech);
  font-size: 13px;
  line-height: 1.25;
}

.climate-property-item span,
.climate-day span,
.climate-window span,
.climate-alert span,
.climate-check span,
.climate-balance-row span {
  display: block;
  margin-top: 5px;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.climate-days {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.climate-day {
  min-height: 116px;
}

.climate-day[data-risk="alto"],
.climate-alert[data-risk="alto"] {
  border-color: rgba(185, 28, 28, .18);
  background: rgba(254, 226, 226, .34);
}

.climate-day[data-risk="moderado"],
.climate-alert[data-risk="moderado"] {
  border-color: rgba(217, 119, 6, .18);
  background: rgba(254, 243, 199, .34);
}

.climate-day[data-risk="baixo"],
.climate-alert[data-risk="baixo"] {
  border-color: rgba(21, 128, 61, .16);
  background: rgba(220, 252, 231, .26);
}

.climate-balance-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.climate-window,
.climate-alert,
.climate-check {
  position: relative;
  padding-left: 16px;
}

.climate-window::before,
.climate-alert::before,
.climate-check::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: var(--green-dark);
  opacity: .38;
}

.check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-grid label,
.setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #F8FAFC;
  padding: 10px 12px;
  color: var(--azul-tech);
  font-size: 13px;
  font-weight: 700;
}

.tool-input,
.setting-line select {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--azul-tech);
  padding: 10px 11px;
  font-weight: 700;
}

.setting-line select {
  max-width: 170px;
}

.tool-action {
  border: 0;
  border-radius: 6px;
  background: var(--green-dark);
  color: #FFFFFF;
  padding: 11px 13px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(21, 128, 61, .14);
}

.tool-action:hover:not(:disabled) {
  background: #166534;
  box-shadow: 0 14px 26px rgba(21, 128, 61, .20);
}

.tool-action:disabled {
  opacity: .48;
  cursor: not-allowed;
  box-shadow: none;
}

.pest-analyze-action {
  background: #0F766E;
}

.pest-result {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.pest-result img {
  width: 100%;
  height: clamp(320px, 48vw, 620px);
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, .96), rgba(236, 253, 245, .72)),
    #F8FAFC;
  cursor: zoom-in;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
}

.pest-result-image-note {
  margin-top: -4px;
  color: var(--text-sub);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.pest-fullscreen-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #07110A;
}

.pest-result ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.45;
}

.pest-result strong {
  color: var(--azul-tech);
}

body.dark-theme .tool-hero,
body.dark-theme .tool-card {
  background: #1D1F1A;
  border-color: #34382F;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
}

body.dark-theme .tool-card::before,
body.dark-theme .grid-container::before,
body.dark-theme .feedback-panel::before,
body.dark-theme .ml-summary-panel::before,
body.dark-theme .history-item::before,
body.dark-theme .card::before {
  height: 3px;
  opacity: .42;
  filter: saturate(.75) brightness(.88);
}

body.dark-theme .tool-hero h2,
body.dark-theme .tool-card h3,
body.dark-theme .tool-steps span,
body.dark-theme .metric-grid > div,
body.dark-theme .check-grid label,
body.dark-theme .setting-line {
  color: #F2ECD9;
}

body.dark-theme .tool-steps span,
body.dark-theme .metric-grid > div,
body.dark-theme .check-grid label,
body.dark-theme .setting-line,
body.dark-theme .tool-input,
body.dark-theme .setting-line select {
  background: #171915;
  border-color: #34382F;
}

body.dark-theme .pest-stage-card .tool-steps span,
body.dark-theme .pest-dropzone,
body.dark-theme .pest-symptom-card .check-grid label,
body.dark-theme .pest-result-card p,
body.dark-theme .climate-dashboard .metric-grid div,
body.dark-theme .planting-window-visual span {
  background: #171915;
  border-color: #34382F;
  color: #F2ECD9;
}

body.dark-theme .pest-stage-card .tool-steps span::before {
  background: #1D1F1A;
  border-color: #576052;
  color: #CBD5E1;
}

body.dark-theme .pest-stage-card .tool-steps span:nth-child(1)::before,
body.dark-theme .pest-stage-card .tool-steps span:nth-child(2)::before {
  background: #47633A;
  border-color: #8BA870;
  color: #F8FAFC;
}

body.dark-theme .tool-field-line span,
body.dark-theme .harvest-callout {
  color: #F2ECD9;
}

body.dark-theme .planting-window-visual::before {
  background: linear-gradient(90deg, rgba(134, 239, 172, .22), rgba(248, 113, 113, .20), rgba(74, 222, 128, .24));
}

body.dark-theme .planting-window-visual .sprout {
  background: rgba(34, 197, 94, .13);
  border-color: rgba(134, 239, 172, .24);
}

body.dark-theme .planting-window-visual .fruit {
  background: rgba(248, 113, 113, .13);
  border-color: rgba(252, 165, 165, .24);
}

body.dark-theme .planting-window-visual .tree {
  background: rgba(74, 222, 128, .13);
  border-color: rgba(134, 239, 172, .24);
}

body.dark-theme .planting-climate-icons span,
body.dark-theme .harvest-callout span {
  box-shadow: none;
}

body.dark-theme .planting-climate-icons .sun {
  background: rgba(250, 204, 21, .14);
  border-color: rgba(250, 204, 21, .24);
  color: #FACC15;
}

body.dark-theme .planting-climate-icons .cloud {
  background: rgba(96, 165, 250, .13);
  border-color: rgba(147, 197, 253, .24);
  color: #93C5FD;
}

body.dark-theme .planting-climate-icons .drop {
  background: rgba(34, 211, 238, .13);
  border-color: rgba(103, 232, 249, .24);
  color: #67E8F9;
}

body.dark-theme .harvest-callout span {
  background: rgba(34, 197, 94, .13);
  color: #86EFAC;
}

body.dark-theme .symptom-icon {
  background: #1F251B;
  border-color: #46513D;
  color: #CBD5E1;
  box-shadow: none;
}

body.dark-theme .symptom-icon.leaf {
  background: rgba(34, 197, 94, .13);
  border-color: rgba(134, 239, 172, .24);
  color: #86EFAC;
}

body.dark-theme .symptom-icon.sun {
  background: rgba(245, 158, 11, .14);
  border-color: rgba(251, 191, 36, .24);
  color: #FBBF24;
}

body.dark-theme .symptom-icon.holes {
  background: rgba(96, 165, 250, .13);
  border-color: rgba(147, 197, 253, .24);
  color: #93C5FD;
}

body.dark-theme .symptom-icon.wilt {
  background: rgba(148, 163, 184, .12);
  border-color: rgba(203, 213, 225, .2);
  color: #CBD5E1;
}

body.dark-theme .climate-balance {
  background:
    linear-gradient(180deg, transparent 0 32%, rgba(59, 130, 246, .12) 33% 53%, rgba(34, 197, 94, .12) 54%),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, .12) 0 1px, transparent 1px 34px);
}

body.dark-theme .climate-property-item,
body.dark-theme .climate-day,
body.dark-theme .climate-window,
body.dark-theme .climate-alert,
body.dark-theme .climate-check,
body.dark-theme .climate-balance-row {
  background: #171915;
  border-color: #34382F;
}

body.dark-theme .climate-property-item strong,
body.dark-theme .climate-day strong,
body.dark-theme .climate-window strong,
body.dark-theme .climate-alert strong,
body.dark-theme .climate-check strong,
body.dark-theme .climate-balance-row strong {
  color: #F2ECD9;
}

body.dark-theme .climate-day[data-risk="alto"],
body.dark-theme .climate-alert[data-risk="alto"] {
  background: rgba(127, 29, 29, .10);
  border-color: rgba(248, 113, 113, .16);
}

body.dark-theme .climate-day[data-risk="moderado"],
body.dark-theme .climate-alert[data-risk="moderado"] {
  background: rgba(120, 53, 15, .10);
  border-color: rgba(251, 191, 36, .16);
}

body.dark-theme .climate-day[data-risk="baixo"],
body.dark-theme .climate-alert[data-risk="baixo"] {
  background: rgba(20, 83, 45, .10);
  border-color: rgba(74, 222, 128, .15);
}

body[data-active-view="weather"] .tool-card::before {
  height: 3px;
  opacity: .26;
  filter: saturate(.62);
}

body.dark-theme[data-active-view="weather"] .tool-card::before {
  opacity: .22;
  filter: saturate(.48) brightness(.82);
}

body.dark-theme .tool-input,
body.dark-theme .setting-line select {
  color: var(--text-main);
}

body.dark-theme .tool-file-name {
  background: #171915;
  border-color: #34382F;
  color: #AAB8CB;
}

body.dark-theme .tool-action {
  background: #607C49;
  color: #F2ECD9;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .26);
}

body.dark-theme .pest-analyze-action {
  background: #4F8D83;
}

body.dark-theme .pest-diagnostic-card {
  background:
    radial-gradient(circle at 100% 0, rgba(248, 113, 113, .08), transparent 0 34%),
    #1D1F1A;
}

body.dark-theme .pest-result img {
  background: #171915;
  border-color: #34382F;
}

body.dark-theme .pest-result strong {
  color: #F2ECD9;
}

body.dark-theme .grid-canvas.empty {
  background-image: var(--empty-canvas-bg) !important;
}

body.dark-theme .empty-state {
  background: rgba(17, 20, 15, .78);
  color: #F2ECD9;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .35);
}

.ml-summary-panel {
  display: grid;
  gap: 10px;
}

.ml-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ml-summary-header h3 {
  color: var(--azul-tech);
  font-size: 15px;
}

.ml-score {
  min-width: 78px;
  text-align: center;
  border-radius: 999px;
  background: #DCFCE7;
  color: #166534;
  padding: 6px 10px;
  font-weight: 900;
}

.ml-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ml-kpi {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #FFFFFF;
  padding: 9px;
}

.ml-kpi span {
  display: block;
  color: var(--text-sub);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 800;
}

.ml-kpi strong {
  display: block;
  margin-top: 3px;
  color: var(--azul-tech);
  font-size: 18px;
}

.ml-summary-panel ul {
  margin-left: 18px;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.45;
}

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

th, td {
  padding: 11px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--azul-tech);
  background: #F8FAFC;
  font-size: 12px;
}

.history-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  background: #FBFDFF;
  font-size: 13px;
  position: relative;
  overflow: hidden;
  padding-top: 16px;
}

.history-item::before {
  background: linear-gradient(90deg, #4338CA, #818CF8);
}

.history-item button {
  background: var(--azul-tech);
  color: #FFFFFF;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
}

.history-item .danger-action {
  background: #B91C1C;
}

body.dark-theme .history-item .danger-action {
  background: #7F1D1D;
  color: #FECACA;
}

.history-analytics-card,
.history-table-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
  padding: 16px;
}

.history-analytics-card {
  display: grid;
  gap: 12px;
}

.history-card-head,
.history-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.history-card-head h3,
.history-toolbar h3 {
  color: var(--azul-tech);
  font-size: 16px;
}

.history-card-head p,
.history-toolbar p {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.history-count-badge {
  border-radius: 999px;
  background: #DCFCE7;
  color: #166534;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.history-chart {
  min-height: 250px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: linear-gradient(180deg, #FFFFFF, #F8FAFC);
  padding: 8px 12px 12px;
  overflow: hidden;
}

.history-chart-svg {
  width: 100%;
  height: 230px;
  display: block;
}

.history-grid-line line {
  stroke: #DDE7EE;
  stroke-width: 1;
}

.history-axis text {
  fill: #64748B;
  font-size: 11px;
  font-weight: 800;
}

.history-area {
  fill: url(#historyAreaGradient);
}

.history-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.history-line-ndvi {
  stroke: #164E63;
}

.history-line-score {
  stroke: #16A34A;
  opacity: .82;
}

.history-dot {
  fill: #D97706;
  stroke: #FFFFFF;
  stroke-width: 2;
}

.history-current-ring {
  fill: #F59E0B;
  stroke: #7C2D12;
  stroke-width: 2.5;
}

.history-chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--azul-tech);
  font-size: 12px;
  font-weight: 900;
}

.history-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-line {
  width: 28px;
  height: 3px;
  border-radius: 999px;
  display: inline-block;
}

.legend-line.predicted {
  background: #164E63;
}

.legend-line.current {
  background: #16A34A;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #F59E0B;
  display: inline-block;
}

.history-table-card {
  margin-top: 12px;
}

.history-controls {
  display: grid;
  grid-template-columns: 160px 150px minmax(190px, 240px);
  gap: 8px;
}

.history-controls select,
.history-controls input {
  height: 38px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--azul-tech);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
  outline: none;
}

.history-controls input:focus,
.history-controls select:focus {
  border-color: var(--verde-medio);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

.history-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #FFFFFF;
}

.history-table {
  min-width: 920px;
}

.history-table th {
  white-space: nowrap;
}

.history-table td {
  color: var(--text-main);
  font-weight: 800;
}

.history-table td small {
  display: block;
  margin-top: 4px;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
}

.history-percent {
  color: #15803D;
  font-weight: 950;
}

.history-risk {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.risk-alto {
  background: #FEE2E2;
  color: #991B1B;
}

.risk-medio {
  background: #FEF3C7;
  color: #92400E;
}

.risk-baixo {
  background: #DCFCE7;
  color: #166534;
}

.history-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.history-actions button,
.history-pagination button {
  border: 0;
  border-radius: 6px;
  background: var(--azul-tech);
  color: #FFFFFF;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 900;
}

.history-actions .danger-action {
  background: #B91C1C;
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 12px;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 800;
}

.history-pagination div {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.history-pagination button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  background: #F8FAFC;
  color: var(--azul-tech);
  border: 1px solid var(--border-color);
}

.history-pagination button.active {
  background: var(--azul-tech);
  color: #FFFFFF;
}

.history-pagination button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.history-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  background: #F8FAFC;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  padding: 20px;
}

body.dark-theme .history-analytics-card,
body.dark-theme .history-table-card,
body.dark-theme .history-chart,
body.dark-theme .history-table-wrap,
body.dark-theme .history-controls select,
body.dark-theme .history-controls input {
  background: rgba(21, 24, 18, .94);
}

body.dark-theme .history-table td {
  color: #F2ECD9;
}

body.dark-theme .history-pagination button {
  background: #171915;
  color: #F2ECD9;
}

.analysis-panel {
  width: 360px;
  height: calc(100vh / var(--ui-scale));
  background-color: transparent;
  border-left: 0;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  flex-shrink: 0;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .10);
  position: relative;
  overflow: visible;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 12px 12px 0 0;
  background: var(--card-accent, #94A3B8);
}

.card-pest {
  --card-accent: linear-gradient(90deg, #7F1D1D, #DC2626 60%, #FCA5A5);
}

.card-summary {
  --card-accent: linear-gradient(90deg, #0E7490, #38BDF8 65%, #BAE6FD);
}

.card-weather {
  --card-accent: linear-gradient(90deg, #166534, #22C55E 64%, #BBF7D0);
}

.card-ibge {
  --card-accent: linear-gradient(90deg, #475569, #94A3B8 65%, #E2E8F0);
}

.card-ml {
  --card-accent: linear-gradient(90deg, #374151, #64748B 60%, #CBD5E1);
}

.card-planting {
  --card-accent: linear-gradient(90deg, #166534, #22C55E 64%, #BBF7D0);
}

.card-terrain {
  --card-accent: linear-gradient(90deg, #92400E, #F59E0B 64%, #FDE68A);
}

.card-prevention {
  --card-accent: linear-gradient(90deg, #0E7490, #14B8A6 64%, #99F6E4);
}

.card-history {
  --card-accent: linear-gradient(90deg, #4338CA, #818CF8 64%, #C7D2FE);
}

.card-pest-lab {
  --card-accent: linear-gradient(90deg, #7F1D1D, #DC2626 60%, #FCA5A5);
}

.card-climate {
  --card-accent: linear-gradient(90deg, #0369A1, #38BDF8 64%, #BAE6FD);
}

.card-settings {
  --card-accent: linear-gradient(90deg, #334155, #64748B 64%, #CBD5E1);
}

.tool-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ndvi-readiness-panel {
  display: grid;
  gap: 12px;
}

.ndvi-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ndvi-status-head strong,
.ndvi-status-head span {
  display: block;
}

.ndvi-status-head span {
  margin-top: 5px;
  color: #64748B;
  font-size: 13px;
  line-height: 1.45;
}

.ndvi-status-provider {
  flex: 0 0 auto;
  border: 1px solid rgba(21, 128, 61, .22);
  border-radius: 8px;
  padding: 8px 10px;
  color: #14532D;
  background: rgba(240, 253, 244, .86);
  font-size: 12px;
  font-weight: 900;
}

.ndvi-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ndvi-kpi-grid div {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  padding: 9px;
  background: rgba(248, 250, 252, .92);
}

.ndvi-kpi-grid span,
.ndvi-kpi-grid strong {
  display: block;
}

.ndvi-kpi-grid span {
  color: #64748B;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ndvi-kpi-grid strong {
  margin-top: 4px;
  color: #0F172A;
  font-size: 14px;
}

.ndvi-readiness-block {
  border-left: 3px solid #15803D;
  padding-left: 10px;
}

.ndvi-readiness-block.alert {
  border-left-color: #B45309;
}

.ndvi-readiness-block strong {
  display: block;
  margin-bottom: 5px;
}

.ndvi-readiness-block ul {
  margin: 0;
  padding-left: 17px;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

body.dark-theme .ndvi-status-head span,
body.dark-theme .ndvi-readiness-block ul,
body.dark-theme .ndvi-kpi-grid span {
  color: #CBD5E1;
}

body.dark-theme .ndvi-kpi-grid div,
body.dark-theme .ndvi-status-provider {
  border-color: rgba(148, 163, 184, .22);
  background: rgba(15, 23, 42, .62);
  color: #E2E8F0;
}

body.dark-theme .ndvi-kpi-grid strong {
  color: #F8FAFC;
}

body.dark-theme .analysis-precision-panel {
  background: linear-gradient(135deg, #1D1F1A, #171915);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

body.dark-theme .precision-empty,
body.dark-theme .precision-stat {
  border-color: rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .28);
}

body.dark-theme .precision-empty strong,
body.dark-theme .precision-chart-head strong,
body.dark-theme .precision-stat strong,
body.dark-theme .evidence-card-title strong {
  color: #F8FAFC;
}

body.dark-theme .precision-empty span,
body.dark-theme .precision-chart-head span,
body.dark-theme .precision-bar small,
body.dark-theme .precision-stat span {
  color: #CBD5E1;
}

body.dark-theme .precision-thumb,
body.dark-theme .precision-bars,
body.dark-theme .precision-stats,
body.dark-theme .evidence-card-body {
  border-color: rgba(148, 163, 184, .20);
}

.card-group-title {
  display: none;
  color: var(--azul-tech);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 9px 11px;
  border: 1px solid rgba(21, 128, 61, .22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(220, 252, 231, .92), rgba(248, 250, 252, .96));
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  text-align: center;
}

.analysis-panel .card h3,
.analysis-panel .card h4,
.analysis-panel .card-header h4 {
  text-align: center;
}

.analysis-panel .card-header {
  justify-content: center;
}

body.dark-theme .card-group-title {
  color: #F2ECD9;
  border-color: rgba(136, 168, 110, .24);
  background: linear-gradient(135deg, rgba(96, 124, 73, .26), rgba(23, 25, 21, .94));
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.card-header h4 {
  padding-top: 2px;
}

.card-icon {
  width: 30px;
  height: 30px;
  max-width: 30px;
  max-height: 30px;
  object-fit: contain;
  flex: 0 0 30px;
  margin-left: 8px;
  opacity: .94;
  filter: drop-shadow(0 5px 9px rgba(15, 23, 42, .12));
  pointer-events: none;
}

.settings-inline-icon {
  width: 26px;
  height: 26px;
  max-width: 26px;
  max-height: 26px;
  flex-basis: 26px;
  margin-left: 0;
}

body.dark-theme .card-icon {
  opacity: .9;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, .32));
}

.analysis-panel .card.side-card-enter,
.analysis-panel .btn-pdf.side-card-enter {
  animation: sideCardIn 520ms cubic-bezier(.18, .82, .24, 1) both;
  animation-delay: var(--side-card-delay, 0ms);
}

.card:last-of-type {
  border-bottom: 1px solid rgba(226, 232, 240, .95);
}

.evidence-expandable {
  padding: 17px 16px 16px;
  gap: 0;
  overflow: hidden;
}

.evidence-card-head {
  width: 100%;
  display: block;
  padding: 0;
  color: inherit;
  text-align: left;
}

.evidence-card-title {
  min-width: 0;
}

.evidence-card-title span,
.evidence-card-title strong {
  display: block;
}

.evidence-card-title span {
  color: var(--azul-tech);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.25;
  text-transform: uppercase;
}

.evidence-card-title strong {
  margin-top: 4px;
  color: var(--azul-tech);
  font-size: 15px;
  line-height: 1.25;
}

.evidence-card-body {
  display: grid;
  gap: 10px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid rgba(226, 232, 240, .88);
}

.card h3 {
  font-size: 15px;
  color: var(--azul-tech);
  font-weight: 700;
}

.card h4 {
  font-size: 12px;
  color: var(--azul-tech);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 800;
}

body.dark-theme .card h4 {
  color: #F2ECD9;
}

.card p {
  font-size: 14px;
  color: #536A8A;
  line-height: 1.5;
  margin-top: 4px;
}

.evidence-summary,
.evidence-line,
.evidence-action {
  display: block;
}

.evidence-line {
  margin-top: 5px;
  padding-left: 9px;
  border-left: 2px solid rgba(21, 128, 61, .28);
  font-size: 12px;
  line-height: 1.35;
}

.evidence-action {
  margin-top: 8px;
  color: var(--azul-tech);
  font-size: 12px;
  font-weight: 700;
}

body.dark-theme .evidence-action {
  color: #F8FAFC;
}

.analysis-card,
.history-card,
.generic-menu-card {
  display: none;
}

body[data-active-view="overview"] .analysis-card,
body[data-active-view="overview"] .history-card,
body[data-active-view="overview"] .generic-menu-card {
  display: none;
}

body[data-active-view="overview"] .overview-card {
  display: flex;
}

body:not([data-active-view="overview"]) .overview-card {
  display: none;
}

body[data-active-view="analysis"] .analysis-card,
body[data-active-view="history"] .history-card,
body[data-active-view="pests"] .pests-card,
body[data-active-view="weather"] .weather-card,
body[data-active-view="planting"] .planting-card,
body[data-active-view="settings"] .settings-card {
  display: flex;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
  width: fit-content;
}

.tool-card .badge {
  align-self: start;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 0;
}

.badge-alert { background-color: #FEE2E2; color: #991B1B; }
.badge-success { background-color: #DCFCE7; color: #166534; }

.badge-muted {
  background: transparent;
  border: 1px solid rgba(21, 128, 61, .28);
  color: var(--green-dark);
}

body.dark-theme .badge-muted {
  background: transparent;
  border-color: rgba(136, 168, 110, .34);
  color: #B9D7A1;
}

.btn-pdf {
  background:
    linear-gradient(135deg, #16A34A, #15803D 52%, #0F766E);
  color: white;
  border: 1px solid rgba(220, 252, 231, .72);
  padding: 13px 18px;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  width: auto;
  font-size: 14px;
  min-height: 46px;
  white-space: nowrap;
  box-shadow: 0 14px 30px rgba(21, 128, 61, .30), inset 0 1px 0 rgba(255,255,255,.22);
  text-transform: uppercase;
  letter-spacing: .02em;
  animation: pdfPulse 2.8s ease-in-out infinite;
}

.btn-pdf:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(21, 128, 61, .38), inset 0 1px 0 rgba(255,255,255,.28);
}

.btn-pdf:disabled {
  opacity: .56;
  cursor: not-allowed;
  animation: none;
  filter: grayscale(.25);
}

@keyframes pdfPulse {
  0%, 100% { box-shadow: 0 14px 30px rgba(21, 128, 61, .30), 0 0 0 0 rgba(34, 197, 94, .18); }
  50% { box-shadow: 0 18px 36px rgba(21, 128, 61, .38), 0 0 0 5px rgba(34, 197, 94, .08); }
}

.pdf-choice-box {
  width: min(620px, 96vw);
}

.pdf-choice-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.pdf-choice-actions button {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #F8FAFC;
  color: var(--azul-tech);
  padding: 13px 14px;
  text-align: left;
}

.pdf-choice-actions button strong {
  font-size: 14px;
}

.pdf-choice-actions button span {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.35;
}

body.dark-theme .pdf-choice-actions button {
  background: #171915;
  color: var(--text-main);
  border-color: var(--border-color);
}

@media (max-width: 1170px) {
  .main-content {
    padding: 24px;
  }

  .toolbar-band {
    padding: 16px;
  }

  .location-workbench {
    grid-template-columns: 1fr;
  }

  .property-map {
    height: 280px;
  }

  .field-command-center {
    grid-template-columns: 1fr;
  }

  .ops-main {
    flex-direction: row;
    align-items: flex-start;
  }

  .ops-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .property-form {
    grid-template-columns: repeat(3, minmax(150px, 1fr)) 180px;
  }

  .scan-controls {
    grid-template-columns: minmax(240px, 1.2fr) minmax(118px, .45fr) minmax(220px, 1fr) 150px;
  }

  .visual-tabs-band .map-actions {
    width: 100%;
    padding: 0 12px;
  }

  .visual-tab,
  .visual-tabs-band .expand-map-btn {
    font-size: 18px;
  }

  .analysis-precision-panel {
    grid-template-columns: minmax(132px, .35fr) minmax(240px, 1fr);
  }

  .precision-stats {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid rgba(203, 213, 225, .82);
    padding: 12px 0 0;
  }

  .tool-steps,
  .metric-grid,
  .climate-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-card-head,
  .history-toolbar {
    flex-direction: column;
  }

  .history-controls {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1020px) {
  .sidebar {
    width: 240px;
    padding: 22px;
  }

  .analysis-panel {
    width: 320px;
    padding: 26px 20px;
  }

  .header-title h1 {
    font-size: 22px;
  }

  .property-form {
    grid-template-columns: repeat(2, minmax(150px, 1fr)) 180px;
  }

  .scan-controls {
    grid-template-columns: minmax(240px, 1fr) minmax(118px, .45fr);
  }

  .ops-main {
    flex-direction: column;
  }

  .file-control,
  #analyzeBtn {
    min-width: 0;
  }

  .visual-tabs-band .map-actions {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .visual-tabs-band .visual-carousel {
    flex: 0 0 auto;
  }

  .visual-tab {
    flex: 0 0 185px;
    min-width: 185px;
  }

  .visual-tabs-band .expand-map-btn {
    flex: 0 0 150px;
  }

  .analysis-precision-panel {
    grid-template-columns: 130px minmax(220px, 1fr);
    gap: 12px;
  }
}

@media (max-width: 885px) {
  :root {
    --ui-scale: .9;
  }

  html {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body {
    display: block;
    width: calc(100vw / var(--ui-scale));
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    zoom: 1;
  }

  body.app-mode {
    padding-top: 64px;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  .mobile-app-bar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 55;
    height: 64px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .96);
    box-shadow: 0 8px 28px rgba(15, 23, 42, .18);
    backdrop-filter: blur(14px);
    align-items: center;
    gap: 12px;
  }

  body.app-mode .mobile-app-bar {
    display: flex;
  }

  .mobile-menu-btn,
  .mobile-menu-close {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 11px;
    background: rgba(255, 255, 255, .07);
    color: #F8FAFC;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .mobile-menu-close {
    display: inline-flex;
  }

  .mobile-menu-btn svg,
  .mobile-menu-close svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .mobile-brand {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .mobile-brand .logo {
    font-size: 20px;
    line-height: 1;
  }

  .mobile-brand > span {
    overflow: hidden;
    color: #94A3B8;
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    pointer-events: none;
    opacity: 0;
    background: rgba(2, 6, 23, .58);
    backdrop-filter: blur(2px);
  }

  .mobile-menu-backdrop.is-open {
    pointer-events: auto;
    opacity: 1;
  }

  body.app-mode .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(86vw, 340px);
    height: 100dvh;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateX(-105%);
    box-shadow: 24px 0 60px rgba(2, 6, 23, .34);
  }

  body.app-mode .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar .menu-section {
    margin-top: 26px;
  }

  .sidebar .menu-item {
    min-height: 50px;
    border-radius: 10px;
  }

  .sidebar-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, .14);
  }

  .main-content,
  .analysis-panel {
    width: 100%;
  }

  body.app-mode .main-content,
  body.app-mode .analysis-panel {
    min-height: 0;
  }

  .main-content {
    height: auto;
    overflow: visible;
  }

  .property-form, .scan-controls {
    grid-template-columns: 1fr 1fr;
  }

  .ops-kpi-grid {
    grid-template-columns: 1fr;
  }

  .location-filter-grid,
  .map-toolbar {
    grid-template-columns: 1fr;
  }

  .property-actions {
    min-width: 0;
  }

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

  .history-controls {
    grid-template-columns: 1fr;
  }

  .history-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .precision-thumb,
  .precision-thumb img,
  .precision-thumb-grid {
    min-height: 150px;
  }

  .precision-chart-head span {
    text-align: left;
  }
}

@media (max-width: 510px) {
  .main-content, .analysis-panel {
    padding: 18px;
  }

  body.app-mode .sidebar {
    width: min(90vw, 330px);
    padding: 18px;
  }
  .property-form, .scan-controls, .history-item, .location-search-row {
    grid-template-columns: 1fr;
  }

  .field-command-center {
    padding: 13px;
  }

  .tool-grid,
  .check-grid,
  .tool-steps,
  .metric-grid,
  .climate-property-grid,
  .climate-days {
    grid-template-columns: 1fr;
  }

  .tool-hero {
    flex-direction: column;
  }

  .grid-canvas {
    min-height: 360px;
    max-height: none;
  }

  .visual-tabs-band {
    min-height: 68px;
    padding: 5px 0;
  }

  .visual-tabs-band .map-actions {
    min-height: 58px;
    padding: 0 9px;
  }

  .visual-carousel,
  .visual-tab,
  .visual-tabs-band .expand-map-btn {
    min-height: 56px;
    height: 56px;
  }

  .visual-tab {
    flex-basis: 165px;
    min-width: 165px;
    gap: 9px;
    padding: 0 12px;
    font-size: 16px;
  }

  .visual-tab .tab-icon,
  .visual-tabs-band .expand-map-btn .tab-icon {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }

  .visual-tabs-band .expand-map-btn {
    flex-basis: 132px;
    font-size: 16px;
  }

  .analysis-precision-panel {
    padding: 12px;
  }

  .precision-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .precision-bars {
    gap: 5px;
    overflow-x: auto;
  }

  .precision-bar {
    min-width: 18px;
  }

  .grid-map {
    width: 100%;
    max-height: none;
  }
}

/* Phase 8: agronomic validation and pilot programs. */
.validation-dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.validation-hero,
.validation-kpis,
.validation-protocol-card { grid-column: 1 / -1; }
.validation-form-card,
.pilot-form-card { grid-column: span 5; }
.validation-records-card,
.pilot-list-card { grid-column: span 7; }

.validation-filter { display: grid; gap: 5px; min-width: 220px; }

.validation-hero {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: var(--card-shadow);
}
.validation-filter label { color: var(--text-sub); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.validation-filter select,
.validation-form-grid select,
.validation-form-grid input,
.validation-card textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: #F8FAFC;
  color: var(--text-main);
  padding: 9px 11px;
  font: inherit;
  font-size: 12px;
}

.validation-card textarea { min-height: 88px; resize: vertical; margin-top: 10px; }
.validation-card {
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #FFFFFF;
  padding: 16px;
  box-shadow: var(--card-shadow);
}

.validation-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.validation-card-head h3 { margin: 3px 0 0; font-size: 16px; }
.validation-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.validation-kpis > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #FFFFFF;
  padding: 13px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}
.validation-kpis span { color: var(--text-sub); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.validation-kpis strong { color: #166534; font-size: 24px; line-height: 1; }
.validation-kpis small { color: var(--text-sub); font-size: 10px; }
.validation-protocol-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: validation-step; }
.validation-protocol-list li { counter-increment: validation-step; border: 1px solid rgba(22, 101, 52, .16); border-radius: 10px; background: #F0FDF4; padding: 10px; color: #365143; font-size: 11px; line-height: 1.45; }
.validation-protocol-list li::before { content: counter(validation-step); display: grid; place-items: center; width: 23px; height: 23px; margin-bottom: 7px; border-radius: 50%; background: #166534; color: white; font-weight: 900; }
.validation-language { margin-top: 11px; border-left: 3px solid #D97706; border-radius: 7px; background: #FFFBEB; padding: 10px 12px; color: #78350F; font-size: 11px; font-weight: 700; }
.validation-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.validation-form-card .tool-action,
.pilot-form-card .tool-action { margin-top: 11px; }
.validation-form-actions { display: flex; gap: 8px; align-items: center; }
.validation-form-actions button { min-height: 38px; }
.validation-record-list,
.pilot-list { display: grid; gap: 8px; max-height: 540px; overflow: auto; }
.validation-record,
.pilot-item { border: 1px solid var(--border-color); border-radius: 10px; background: #FFFFFF; padding: 11px; }

body[data-active-view="validation"] .validation-kpis > div,
body[data-active-view="validation"] .validation-protocol-list li,
body[data-active-view="validation"] .validation-card,
body[data-active-view="validation"] .validation-record,
body[data-active-view="validation"] .pilot-item,
body[data-active-view="structure"] .structure-kpis article,
body[data-active-view="structure"] .structure-context-card,
body[data-active-view="structure"] .structure-profile-card,
body[data-active-view="structure"] .structure-manager-card,
body[data-active-view="structure"] .structure-item,
body[data-active-view="structure"] .structure-comparison-card,
body[data-active-view="structure"] .structure-comparison-row,
body[data-active-view="decisions"] .plan-kpis article,
body[data-active-view="decisions"] .plan-context-card,
body[data-active-view="decisions"] .plan-form-card,
body[data-active-view="decisions"] .plan-board-card,
body[data-active-view="decisions"] .task-card {
  animation: listItemRise 460ms cubic-bezier(.18, .82, .24, 1) both;
}

.structure-refresh .structure-kpis article,
.structure-refresh .structure-context-card,
.structure-refresh .structure-profile-card,
.structure-refresh .structure-manager-card,
.structure-refresh .structure-list,
.structure-refresh .structure-item,
.structure-refresh .structure-comparison-card,
.structure-refresh .structure-comparison-head,
.structure-refresh .structure-comparison-row,
.plan-refresh .plan-kpis article,
.plan-refresh .plan-context-card,
.plan-refresh .plan-form-card,
.plan-refresh .plan-form > *,
.plan-refresh .plan-board-card,
.plan-refresh .plan-filters select,
.plan-refresh .task-list,
.plan-refresh .task-card,
.plan-refresh .plan-impact-card,
.plan-refresh .plan-impact-head,
.plan-refresh .plan-impact-row,
.validation-refresh .validation-hero,
.validation-refresh .validation-kpis > div,
.validation-refresh .validation-protocol-list li,
.validation-refresh .validation-card,
.validation-refresh .validation-form-grid > *,
.validation-refresh .validation-record-list,
.validation-refresh .validation-record,
.validation-refresh .pilot-list,
.validation-refresh .pilot-item {
  animation: listItemRise 520ms cubic-bezier(.18, .82, .24, 1) both;
}

.structure-refresh .structure-kpis article:nth-child(2),
.plan-refresh .plan-kpis article:nth-child(2),
.validation-refresh .validation-kpis > div:nth-child(2),
.validation-refresh .validation-protocol-list li:nth-child(2),
.structure-refresh .structure-item:nth-child(2),
.structure-refresh .structure-comparison-row:nth-child(2),
.plan-refresh .task-card:nth-child(2),
.plan-refresh .plan-impact-row:nth-child(2),
.validation-refresh .validation-record:nth-child(2),
.validation-refresh .validation-form-grid > *:nth-child(2),
.validation-refresh .pilot-item:nth-child(2) { animation-delay: 55ms; }

.structure-refresh .structure-kpis article:nth-child(3),
.plan-refresh .plan-kpis article:nth-child(3),
.validation-refresh .validation-kpis > div:nth-child(3),
.validation-refresh .validation-protocol-list li:nth-child(3),
.structure-refresh .structure-item:nth-child(3),
.structure-refresh .structure-comparison-row:nth-child(3),
.plan-refresh .task-card:nth-child(3),
.plan-refresh .plan-impact-row:nth-child(3),
.validation-refresh .validation-record:nth-child(3),
.validation-refresh .validation-form-grid > *:nth-child(3),
.validation-refresh .pilot-item:nth-child(3) { animation-delay: 110ms; }

.structure-refresh .structure-kpis article:nth-child(4),
.plan-refresh .plan-kpis article:nth-child(4),
.validation-refresh .validation-kpis > div:nth-child(4),
.validation-refresh .validation-protocol-list li:nth-child(4),
.structure-refresh .structure-item:nth-child(4),
.structure-refresh .structure-comparison-row:nth-child(4),
.plan-refresh .task-card:nth-child(4),
.plan-refresh .plan-impact-row:nth-child(4),
.validation-refresh .validation-record:nth-child(4),
.validation-refresh .validation-form-grid > *:nth-child(4),
.validation-refresh .pilot-item:nth-child(4) { animation-delay: 165ms; }

body[data-active-view="validation"] .validation-kpis > div:nth-child(2),
body[data-active-view="validation"] .validation-protocol-list li:nth-child(2),
body[data-active-view="structure"] .structure-item:nth-child(2),
body[data-active-view="decisions"] .task-card:nth-child(2),
body[data-active-view="validation"] .validation-record:nth-child(2),
body[data-active-view="validation"] .pilot-item:nth-child(2) { animation-delay: 55ms; }

body[data-active-view="validation"] .validation-kpis > div:nth-child(3),
body[data-active-view="validation"] .validation-protocol-list li:nth-child(3),
body[data-active-view="structure"] .structure-item:nth-child(3),
body[data-active-view="decisions"] .task-card:nth-child(3),
body[data-active-view="validation"] .validation-record:nth-child(3),
body[data-active-view="validation"] .pilot-item:nth-child(3) { animation-delay: 110ms; }

body[data-active-view="validation"] .validation-kpis > div:nth-child(4),
body[data-active-view="validation"] .validation-protocol-list li:nth-child(4),
body[data-active-view="structure"] .structure-item:nth-child(4),
body[data-active-view="decisions"] .task-card:nth-child(4),
body[data-active-view="validation"] .validation-record:nth-child(4),
body[data-active-view="validation"] .pilot-item:nth-child(4) { animation-delay: 165ms; }

body[data-active-view="validation"] .validation-protocol-list li:nth-child(5),
body[data-active-view="structure"] .structure-item:nth-child(n+5),
body[data-active-view="decisions"] .task-card:nth-child(n+5),
body[data-active-view="validation"] .validation-record:nth-child(n+5),
body[data-active-view="validation"] .pilot-item:nth-child(n+5) { animation-delay: 220ms; }
.validation-record-head,
.pilot-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.validation-record strong,
.pilot-item strong { font-size: 12px; }
.validation-record p,
.pilot-item p { margin: 5px 0 0; color: var(--text-sub); font-size: 10px; line-height: 1.45; }
.validation-record-meta,
.pilot-metrics { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.validation-record-meta span,
.pilot-metrics span { border-radius: 999px; background: #E2E8F0; padding: 4px 7px; color: #475569; font-size: 9px; font-weight: 800; }
.validation-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.validation-item-actions button { min-height: 28px; border: 1px solid var(--border-color); border-radius: 7px; background: white; padding: 4px 8px; color: var(--text-main); font-size: 9px; font-weight: 800; }
.validation-item-actions .danger-action { color: #B91C1C; }
.validation-empty { border: 1px dashed var(--border-color); border-radius: 10px; padding: 18px; color: var(--text-sub); text-align: center; font-size: 11px; }

body.dark-theme .validation-filter select,
body.dark-theme .validation-form-grid select,
body.dark-theme .validation-form-grid input,
body.dark-theme .validation-card textarea,
body.dark-theme .validation-record,
body.dark-theme .pilot-item { background: #171915; color: #F2ECD9; border-color: #34382F; }
body.dark-theme .validation-dashboard,
body.dark-theme .validation-card,
body.dark-theme .validation-hero,
body.dark-theme .validation-kpis > div {
  background: #1D1F1A;
  border-color: #34382F;
}
body.dark-theme .validation-protocol-list li { background: rgba(22, 101, 52, .15); color: #CFE4D4; border-color: rgba(74, 222, 128, .18); }
body.dark-theme .validation-language { background: rgba(120, 53, 15, .22); color: #FCD34D; }
body.dark-theme .validation-kpis strong { color: #86EFAC; }
body.dark-theme .validation-record-meta span,
body.dark-theme .pilot-metrics span { background: #2B3028; color: #C8C2B2; }
body.dark-theme .validation-item-actions button { background: #1D1F1A; color: #F2ECD9; border-color: #34382F; }

@media (max-width: 1050px) {
  .validation-form-card,
  .pilot-form-card,
  .validation-records-card,
  .pilot-list-card { grid-column: 1 / -1; }
  .validation-protocol-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .validation-dashboard { grid-template-columns: 1fr; padding: 12px; }
  .validation-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .validation-protocol-list,
  .validation-form-grid { grid-template-columns: 1fr; }
  .validation-card-head,
  .validation-record-head,
  .pilot-item-head { display: grid; }
  .validation-filter { width: 100%; min-width: 0; }
}

@media (max-width: 430px) {
  .validation-kpis { grid-template-columns: 1fr; }
  .validation-item-actions { width: 100%; }
  .validation-item-actions button { flex: 1; }
}

/* Phase 3: agronomic structure by property, field and crop season. */
body[data-active-view="structure"] .structure-card {
  display: flex;
}

.analysis-context-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, .55fr) minmax(180px, .7fr);
  align-items: end;
  gap: 10px;
  margin-bottom: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(14, 116, 144, .16);
  border-radius: 8px;
  background: #F0F9FF;
}

.analysis-context-bar > div > span,
.analysis-context-bar > div > small,
.analysis-context-bar label > span {
  display: block;
}

.analysis-context-bar > div > span {
  color: #0C4A6E;
  font-size: 12px;
  font-weight: 800;
}

.analysis-context-bar > div > small {
  margin-top: 3px;
  color: #64748B;
  font-size: 10px;
  line-height: 1.35;
}

.analysis-context-bar label > span {
  margin-bottom: 4px;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.analysis-context-bar select,
.structure-context-card select,
.structure-profile-card select,
.structure-form input,
.structure-form select,
.structure-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: #FFFFFF;
  color: var(--azul-tech);
  padding: 9px 11px;
  font: inherit;
}

.agronomic-structure {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.agronomic-structure > *,
.structure-columns,
.structure-columns > *,
.structure-kpis,
.structure-kpis > *,
.structure-list,
.structure-item,
.structure-comparison-card,
.structure-comparison {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.structure-hero {
  min-height: 118px;
}

.structure-context-card,
.structure-profile-card,
.structure-manager-card,
.structure-comparison-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
}

.structure-context-card,
.structure-profile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .5fr);
  align-items: center;
  gap: 18px;
  padding: 17px 18px;
}

.structure-context-card strong,
.structure-context-card small,
.structure-kicker {
  display: block;
}

.structure-kicker {
  margin-bottom: 5px;
  color: #15803D;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.structure-context-card strong {
  color: var(--azul-tech);
  font-size: 19px;
}

.structure-context-card small,
.structure-profile-card p {
  margin-top: 4px;
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.45;
}

.structure-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.structure-kpis article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: linear-gradient(145deg, #FFFFFF, #F8FAFC);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.structure-kpis span,
.structure-kpis strong,
.structure-kpis small {
  display: block;
}

.structure-kpis span {
  color: #64748B;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.structure-kpis strong {
  margin-top: 9px;
  color: var(--azul-tech);
  font-size: 23px;
}

.structure-kpis small {
  margin-top: 3px;
  color: var(--text-sub);
  font-size: 10px;
}

.structure-profile-card h3 {
  color: var(--azul-tech);
  font-size: 16px;
}

.structure-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.structure-manager-card,
.structure-comparison-card {
  padding: 17px;
}

.structure-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.structure-card-head h3 {
  color: var(--azul-tech);
  font-size: 17px;
}

.structure-card-head > button,
.structure-form-actions button,
.structure-item-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: #F8FAFC;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.structure-card-head > button {
  border-color: #166534;
  background: #166534;
  color: #FFFFFF;
}

.structure-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #BBF7D0;
  border-radius: 9px;
  background: #F0FDF4;
}

.structure-form label > span {
  display: block;
  margin-bottom: 4px;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
}

.structure-form textarea,
.structure-form-actions {
  grid-column: 1 / -1;
}

.structure-form textarea {
  min-height: 74px;
  resize: vertical;
}

.structure-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.structure-form-actions button:last-child {
  border-color: #15803D;
  background: #15803D;
  color: #FFFFFF;
}

.structure-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.structure-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #E2E8F0;
  border-radius: 9px;
  background: #F8FAFC;
}

.structure-item-main {
  min-width: 0;
}

.structure-item h4 {
  margin-top: 6px;
  overflow: hidden;
  color: var(--azul-tech);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.structure-item p {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-sub);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.structure-status {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  background: #DCFCE7;
  color: #166534;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.structure-status.status-resting,
.structure-status.status-planned { background: #FEF3C7; color: #92400E; }
.structure-status.status-inactive,
.structure-status.status-cancelled { background: #FEE2E2; color: #991B1B; }
.structure-status.status-harvested,
.structure-status.status-closed { background: #DBEAFE; color: #1D4ED8; }

.structure-item-metrics {
  text-align: center;
}

.structure-item-metrics span,
.structure-item-metrics strong,
.structure-item-metrics small {
  display: block;
}

.structure-item-metrics span,
.structure-item-metrics small {
  color: #64748B;
  font-size: 8px;
}

.structure-item-metrics strong {
  margin: 2px 0;
  color: var(--azul-tech);
  font-size: 18px;
}

.structure-item-actions {
  display: grid;
  gap: 5px;
}

.structure-item-actions button:last-child {
  color: #B91C1C;
}

.structure-empty {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 18px;
  border: 1px dashed #CBD5E1;
  border-radius: 9px;
  color: var(--text-sub);
  text-align: center;
}

.structure-empty strong,
.structure-empty span {
  display: block;
}

.structure-empty strong {
  color: var(--azul-tech);
  font-size: 13px;
}

.structure-empty span {
  max-width: 460px;
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.45;
}

.structure-comparison {
  display: grid;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  border-radius: 9px;
}

.structure-comparison-head,
.structure-comparison-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(80px, .3fr));
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.structure-comparison-head {
  background: #0F172A;
  color: #CBD5E1;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.structure-comparison-row {
  border-top: 1px solid #E2E8F0;
  background: #FFFFFF;
}

.structure-comparison-row:first-of-type {
  border-top: 0;
}

.structure-comparison-row > div small,
.structure-comparison-row > div strong,
.structure-comparison-row > div span {
  display: block;
}

.structure-comparison-row > div small {
  color: #15803D;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.structure-comparison-row > div strong {
  margin-top: 2px;
  color: var(--azul-tech);
  font-size: 12px;
}

.structure-comparison-row > div span {
  margin-top: 2px;
  color: var(--text-sub);
  font-size: 9px;
}

.structure-comparison-row > b {
  color: #334155;
  font-size: 13px;
  text-align: center;
}

body.dark-theme .analysis-context-bar,
body.dark-theme .structure-form {
  border-color: #34382F;
  background: #171915;
}

body.dark-theme .structure-context-card,
body.dark-theme .structure-profile-card,
body.dark-theme .structure-manager-card,
body.dark-theme .structure-comparison-card,
body.dark-theme .structure-kpis article,
body.dark-theme .structure-comparison-row {
  border-color: #34382F;
  background: #1D1F1A;
}

body.dark-theme .analysis-context-bar select,
body.dark-theme .structure-context-card select,
body.dark-theme .structure-profile-card select,
body.dark-theme .structure-form input,
body.dark-theme .structure-form select,
body.dark-theme .structure-form textarea,
body.dark-theme .structure-item {
  border-color: #34382F;
  background: #171915;
  color: #F2ECD9;
}

body.dark-theme .structure-context-card strong,
body.dark-theme .structure-profile-card h3,
body.dark-theme .structure-kpis strong,
body.dark-theme .structure-card-head h3,
body.dark-theme .structure-item h4,
body.dark-theme .structure-item-metrics strong,
body.dark-theme .structure-empty strong,
body.dark-theme .structure-comparison-row > div strong,
body.dark-theme .structure-comparison-row > b {
  color: #F2ECD9;
}

body.dark-theme .structure-comparison,
body.dark-theme .structure-comparison-row {
  border-color: #34382F;
}

@media (max-width: 1180px) {
  .structure-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 885px) {
  .analysis-context-bar,
  .structure-context-card,
  .structure-profile-card {
    grid-template-columns: 1fr;
  }

  .structure-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .structure-comparison {
    overflow-x: auto;
  }

  .structure-comparison-head,
  .structure-comparison-row {
    min-width: 620px;
  }
}

@media (max-width: 510px) {
  .structure-kpis,
  .structure-form {
    grid-template-columns: 1fr;
  }

  .structure-form > *,
  .structure-form textarea,
  .structure-form-actions {
    grid-column: 1;
  }

  .structure-item {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .structure-item-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phase 4: decision center and field execution plan. */
body[data-active-view="decisions"] .decisions-card {
  display: flex;
}

.field-plan {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.field-plan > *,
.plan-kpis,
.plan-kpis > *,
.plan-form,
.plan-board-card,
.task-list,
.task-card,
.plan-impact {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.plan-hero {
  min-height: 118px;
}

.plan-context-card,
.plan-form-card,
.plan-board-card,
.plan-impact-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
}

.plan-context-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .45fr);
  align-items: center;
  gap: 18px;
  padding: 17px 18px;
}

.plan-kicker,
.plan-context-card strong,
.plan-context-card small {
  display: block;
}

.plan-kicker {
  margin-bottom: 5px;
  color: #15803D;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.plan-context-card strong {
  color: var(--azul-tech);
  font-size: 19px;
}

.plan-context-card small,
.plan-board-card p {
  margin-top: 4px;
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.45;
}

.plan-context-card select,
.plan-filters select,
.plan-form input,
.plan-form select,
.plan-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: #FFFFFF;
  color: var(--azul-tech);
  padding: 9px 11px;
  font: inherit;
}

.plan-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.plan-kpis article {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: linear-gradient(145deg, #FFFFFF, #F8FAFC);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.plan-kpis span,
.plan-kpis strong,
.plan-kpis small {
  display: block;
}

.plan-kpis span {
  color: #64748B;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-kpis strong {
  margin-top: 9px;
  color: var(--azul-tech);
  font-size: 22px;
}

.plan-kpis small {
  margin-top: 3px;
  color: var(--text-sub);
  font-size: 10px;
}

.plan-form-card,
.plan-board-card,
.plan-impact-card {
  padding: 17px;
}

.plan-card-head,
.plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-card-head h3,
.plan-toolbar h3 {
  color: var(--azul-tech);
  font-size: 17px;
}

.plan-card-head > button,
.plan-form-actions button,
.task-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: #F8FAFC;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.plan-card-head > button {
  border-color: #166534;
  background: #166534;
  color: #FFFFFF;
}

.plan-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #BBF7D0;
  border-radius: 9px;
  background: #F0FDF4;
}

.plan-form label > span,
.plan-photo-input > span {
  display: block;
  margin-bottom: 4px;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
}

.plan-form textarea {
  min-height: 76px;
  resize: vertical;
}

.plan-form textarea,
.plan-photo-grid,
.plan-form-actions {
  grid-column: 1 / -1;
}

.plan-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px)) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.plan-photo-input {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px dashed #86EFAC;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.plan-photo-input small {
  color: var(--text-sub);
  font-size: 10px;
}

.plan-photo-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 86px;
  padding: 9px;
  border: 1px solid #DCFCE7;
  border-radius: 8px;
  background: #FFFFFF;
}

.plan-photo-preview span {
  grid-column: 1 / -1;
  align-self: center;
  color: var(--text-sub);
  font-size: 10px;
  text-align: center;
}

.plan-photo-preview figure {
  overflow: hidden;
  border-radius: 7px;
  background: #0F172A;
}

.plan-photo-preview img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
}

.plan-photo-preview figcaption {
  padding: 4px 6px;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 800;
}

.plan-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.plan-form-actions button:last-child {
  border-color: #15803D;
  background: #15803D;
  color: #FFFFFF;
}

.plan-toolbar {
  align-items: flex-start;
}

.plan-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
}

.task-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(148px, .32fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid #E2E8F0;
  border-left: 5px solid #22C55E;
  border-radius: 10px;
  background: #F8FAFC;
}

.task-card.priority-high { border-left-color: #F59E0B; }
.task-card.priority-critical { border-left-color: #DC2626; }
.task-card.priority-low { border-left-color: #60A5FA; }
.task-card.status-done { opacity: .82; border-left-color: #2563EB; }
.task-card.is-overdue { box-shadow: 0 0 0 2px rgba(220, 38, 38, .15); }
.task-card.is-due-soon { box-shadow: 0 0 0 2px rgba(245, 158, 11, .12); }

.task-card-main {
  min-width: 0;
}

.task-card-top,
.task-meta,
.task-photo-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-priority,
.task-status,
.task-photo-badges span {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  background: #DCFCE7;
  color: #166534;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.task-priority {
  background: #FEF3C7;
  color: #92400E;
}

.task-card h4 {
  margin-top: 8px;
  overflow: hidden;
  color: var(--azul-tech);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card p {
  margin-top: 4px;
  color: var(--text-sub);
  font-size: 10px;
  line-height: 1.45;
}

.task-meta {
  margin-top: 8px;
}

.task-meta span {
  color: #64748B;
  font-size: 9px;
  font-weight: 700;
}

.task-card-metrics {
  display: grid;
  gap: 4px;
  color: #64748B;
  font-size: 9px;
}

.task-card-metrics strong {
  color: var(--azul-tech);
  font-size: 18px;
}

.task-actions {
  display: grid;
  gap: 5px;
}

.task-actions .danger-action {
  color: #B91C1C;
}

.plan-empty {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 18px;
  border: 1px dashed #CBD5E1;
  border-radius: 9px;
  color: var(--text-sub);
  text-align: center;
}

.plan-empty strong,
.plan-empty span {
  display: block;
}

.plan-empty strong {
  color: var(--azul-tech);
  font-size: 13px;
}

.plan-empty span {
  max-width: 470px;
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.45;
}

.plan-impact {
  display: grid;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  border-radius: 9px;
}

.plan-impact-head,
.plan-impact-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(4, minmax(80px, .35fr));
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.plan-impact-head {
  background: #0F172A;
  color: #CBD5E1;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-impact-row {
  border-top: 1px solid #E2E8F0;
  background: #FFFFFF;
}

.plan-impact-row strong {
  color: var(--azul-tech);
  font-size: 12px;
}

.plan-impact-row b,
.plan-impact-row span {
  color: #334155;
  font-size: 12px;
  text-align: center;
}

body.dark-theme .plan-context-card,
body.dark-theme .plan-form-card,
body.dark-theme .plan-board-card,
body.dark-theme .plan-impact-card,
body.dark-theme .plan-kpis article,
body.dark-theme .plan-form,
body.dark-theme .task-card,
body.dark-theme .plan-impact-row,
body.dark-theme .plan-photo-preview {
  border-color: #34382F;
  background: #1D1F1A;
}

body.dark-theme .plan-context-card select,
body.dark-theme .plan-filters select,
body.dark-theme .plan-form input,
body.dark-theme .plan-form select,
body.dark-theme .plan-form textarea,
body.dark-theme .plan-photo-input {
  border-color: #34382F;
  background: #171915;
  color: #F2ECD9;
}

body.dark-theme .plan-context-card strong,
body.dark-theme .plan-kpis strong,
body.dark-theme .plan-card-head h3,
body.dark-theme .plan-toolbar h3,
body.dark-theme .task-card h4,
body.dark-theme .task-card-metrics strong,
body.dark-theme .plan-empty strong,
body.dark-theme .plan-impact-row strong {
  color: #F2ECD9;
}

@media (max-width: 1040px) {
  .task-card {
    grid-template-columns: 1fr;
  }

  .task-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 885px) {
  .plan-context-card,
  .plan-toolbar {
    grid-template-columns: 1fr;
  }

  .plan-card-head,
  .plan-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .plan-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-form {
    grid-template-columns: 1fr;
  }

  .plan-form > *,
  .plan-form textarea,
  .plan-photo-grid,
  .plan-form-actions {
    grid-column: 1;
  }

  .plan-photo-grid {
    grid-template-columns: 1fr;
  }

  .plan-impact {
    overflow-x: auto;
  }

  .plan-impact-head,
  .plan-impact-row {
    min-width: 620px;
  }
}

@media (max-width: 510px) {
  .plan-kpis,
  .plan-filters,
  .task-actions {
    grid-template-columns: 1fr;
  }
}

/* Phase 5: persistent and functional settings. */
.settings-card-live,
.settings-privacy-card {
  position: relative;
  overflow: hidden;
}

.settings-card-live::before,
.settings-privacy-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #22C55E, #0EA5E9);
}

.settings-helper {
  margin: 8px 0 12px;
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.45;
}

.settings-data-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.settings-data-actions button {
  min-height: 38px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #F8FAFC;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.settings-data-actions .danger-action {
  border-color: rgba(185, 28, 28, .25);
  background: #B91C1C;
  color: #FFFFFF;
}

body.dark-theme .settings-data-actions button {
  border-color: #34382F;
  background: #171915;
  color: #F2ECD9;
}

body.dark-theme .settings-data-actions .danger-action {
  border-color: rgba(248, 113, 113, .28);
  background: rgba(127, 29, 29, .24);
  color: #FCA5A5;
}

.offline-capture-card,
.mobile-app-card,
.security-card,
.official-integrations-card,
.premium-commercial-card,
.predictive-readiness-card {
  border-color: rgba(14, 165, 233, .22);
}

.offline-capture-actions,
.security-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.offline-capture-actions button,
.security-actions button {
  min-height: 38px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #EFF6FF;
  color: #1D4ED8;
  font-size: 11px;
  font-weight: 900;
}

.offline-capture-actions .danger-action {
  border-color: rgba(185, 28, 28, .25);
  background: #B91C1C;
  color: #FFFFFF;
}

.settings-data-actions .danger-action:disabled,
.offline-capture-actions .danger-action:disabled {
  color: #FFFFFF;
  opacity: .58;
}

.audit-preview {
  margin-top: 10px;
  max-height: 122px;
  overflow: auto;
  border: 1px dashed rgba(100, 116, 139, .35);
  border-radius: 8px;
  padding: 9px;
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.45;
  background: rgba(248, 250, 252, .72);
}

body.dark-theme .camera-toolbar button,
body.dark-theme .offline-capture-actions button,
body.dark-theme .security-actions button {
  border-color: #34382F;
  background: #171915;
  color: #F2ECD9;
}

body.dark-theme .offline-capture-actions .danger-action {
  border-color: rgba(248, 113, 113, .28);
  background: rgba(127, 29, 29, .24);
  color: #FCA5A5;
}

body.dark-theme .audit-preview {
  border-color: #34382F;
  background: rgba(23, 25, 21, .72);
  color: #B8B09E;
}

.mobile-readiness-list { display: grid; gap: 7px; margin-top: 11px; }
.mobile-readiness-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 10px; background: rgba(248,250,252,.72); font-size: 10px; }
.mobile-readiness-item strong { color: var(--text-main); font-size: 10px; }
.mobile-readiness-state { border-radius: 999px; padding: 3px 7px; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.mobile-readiness-state.ready { background: #DCFCE7; color: #166534; }
.mobile-readiness-state.pending { background: #FEF3C7; color: #92400E; }
.mobile-readiness-state.blocked { background: #FEE2E2; color: #B91C1C; }
.mobile-app-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 11px; }
.mobile-app-actions button { min-height: 38px; border: 1px solid var(--border-color); border-radius: 8px; background: #EFF6FF; color: #1D4ED8; font-size: 10px; font-weight: 900; }
.mobile-app-actions button:disabled { opacity: .48; cursor: not-allowed; }
.mobile-app-links { display: flex; gap: 12px; margin-top: 10px; font-size: 10px; font-weight: 800; }
.mobile-app-links a { color: #166534; }
body.dark-theme .mobile-readiness-item { background: rgba(23,25,21,.72); border-color: #34382F; }
body.dark-theme .mobile-app-actions button { border-color: #34382F; background: #171915; color: #93C5FD; }
body.dark-theme .mobile-app-links a { color: #86EFAC; }

.official-provider-list,
.official-source-list,
.commercial-integration-list,
.commercial-plan-list,
.predictive-module-list,
.predictive-guardrail-list {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.official-provider-item,
.official-source-item,
.commercial-integration-item,
.commercial-plan-item,
.predictive-module-item,
.predictive-guardrail-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: rgba(248, 250, 252, .72);
  padding: 9px 10px;
  font-size: 10px;
}

.official-provider-head,
.official-source-head,
.commercial-integration-head,
.commercial-plan-head,
.predictive-module-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.official-provider-item strong,
.official-source-item strong,
.commercial-integration-item strong,
.commercial-plan-item strong,
.predictive-module-item strong,
.predictive-guardrail-item strong {
  color: var(--text-main);
  font-size: 11px;
}

.official-provider-item p,
.official-source-item p,
.commercial-integration-item p,
.commercial-plan-item p,
.predictive-module-item p,
.predictive-guardrail-item p {
  margin: 0;
  color: var(--text-sub);
  line-height: 1.4;
}

.official-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.official-status.active,
.official-status.available,
.official-status.ready,
.official-status.stable,
.official-status.prepared { background: #DCFCE7; color: #166534; }
.official-status.calibration,
.official-status.candidate,
.official-status.heuristic,
.official-status.guarded,
.official-status.needs_token,
.official-status.insufficient_history,
.official-status.pending { background: #FEF3C7; color: #92400E; }
.official-status.blocked,
.official-status.drop_detected,
.official-status.degraded { background: #FEE2E2; color: #B91C1C; }
.official-status.recovery_signal { background: #DBEAFE; color: #1D4ED8; }

.commercial-kpi-grid,
.predictive-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}

.commercial-kpi-grid > div,
.predictive-kpi-grid > div {
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: #F8FAFC;
  padding: 9px;
}

.commercial-kpi-grid span,
.predictive-kpi-grid span {
  display: block;
  color: var(--text-sub);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.commercial-kpi-grid strong,
.predictive-kpi-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text-main);
  font-size: 15px;
}

.official-actions,
.commercial-actions,
.predictive-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.official-actions button,
.official-actions a,
.commercial-actions button,
.commercial-actions a,
.predictive-actions button,
.predictive-actions a {
  min-height: 38px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #EFF6FF;
  color: #1D4ED8;
  padding: 10px;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

body.dark-theme .official-provider-item,
body.dark-theme .official-source-item,
body.dark-theme .commercial-integration-item,
body.dark-theme .commercial-plan-item,
body.dark-theme .commercial-kpi-grid > div,
body.dark-theme .predictive-module-item,
body.dark-theme .predictive-guardrail-item,
body.dark-theme .predictive-kpi-grid > div {
  background: rgba(23, 25, 21, .72);
  border-color: #34382F;
}

body.dark-theme .official-actions button,
body.dark-theme .official-actions a,
body.dark-theme .commercial-actions button,
body.dark-theme .commercial-actions a,
body.dark-theme .predictive-actions button,
body.dark-theme .predictive-actions a {
  border-color: #34382F;
  background: #171915;
  color: #93C5FD;
}

@media (max-width: 510px) {
  .settings-data-actions,
  .offline-capture-actions,
  .security-actions {
    grid-template-columns: 1fr;
  }

  .mobile-app-actions { grid-template-columns: 1fr; }
  .official-actions { grid-template-columns: 1fr; }
  .commercial-actions,
  .commercial-kpi-grid,
  .predictive-actions,
  .predictive-kpi-grid { grid-template-columns: 1fr; }

  .camera-toolbar,
  .camera-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Refined NDVI legend, diagnostic flow and compact agronomic tools. */
.heat-layout {
  height: auto;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: center;
  gap: 14px;
  padding: 10px;
}

.heat-layout .heat-compare {
  width: min(100%, 920px);
  min-height: 360px;
}

.heat-key {
  width: min(100%, 1120px);
  display: grid;
  gap: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #FFFFFF;
  padding: 12px;
}

.heat-key-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.heat-key-heading strong { color: var(--azul-tech); font-size: 13px; }
.heat-key-heading span,
.heat-key > p { color: var(--text-sub); font-size: 11px; line-height: 1.4; }
.heat-key > p { margin: 0; }

.heat-key-items {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 7px;
}

.heat-key-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 7px;
  min-height: 54px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: #F8FAFC;
  padding: 7px 8px;
}

.heat-key-item > i {
  grid-row: 1 / span 2;
  width: 12px;
  height: 34px;
  border-radius: 999px;
}

.heat-key-item b { color: var(--azul-tech); font-size: 11px; }
.heat-key-item small { color: var(--text-sub); font-size: 9px; line-height: 1.25; }
.heat-key-item .ndvi-nonveg { background: #64748B; }
.heat-key-item .ndvi-very-low { background: #B91C1C; }
.heat-key-item .ndvi-low { background: #F97316; }
.heat-key-item .ndvi-mid { background: #FACC15; }
.heat-key-item .ndvi-high { background: #84CC16; }
.heat-key-item .ndvi-very-high { background: #15803D; }
.heat-key-item .rgb-nonveg { background: #A3A39A; }
.heat-key-item .rgb-yellow { background: #E1BE2D; }
.heat-key-item .rgb-low { background: #BEDC2D; }
.heat-key-item .rgb-mid { background: #69CD46; }
.heat-key-item .rgb-high { background: linear-gradient(90deg, #23A546, #0F6969); }
.heat-key-item .rgb-water { background: linear-gradient(180deg, #2391D7 0 50%, #425E82 50%); }
.heat-key-item .land-water-clear { background: #06B6D4; }
.heat-key-item .land-water-turbid { background: #2563EB; }
.heat-key-item .land-bare { background: #B7793F; }
.heat-key-item .land-dry { background: #E3B52D; }
.heat-key-item .land-vegetation { background: #65A30D; }
.heat-key-item .land-dense { background: #166534; }

.heat-layout.land-cover .heat-bar {
  background: linear-gradient(90deg, #06B6D4, #2563EB, #B7793F, #E3B52D, #65A30D, #166534);
}

body.dark-theme .heat-key,
body.dark-theme .heat-key-item {
  background: #171915;
  border-color: #34382F;
}

body.dark-theme .heat-key-heading strong,
body.dark-theme .heat-key-item b { color: #F2ECD9; }

/* Phase 2: clearer navigation, executive overview and guided analysis flow. */
.menu-section {
  margin-top: 22px;
}

.menu-section-system {
  margin-top: 16px;
}

.menu-item .menu-label {
  min-width: 0;
  flex: 1;
  line-height: 1.2;
}

.menu-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid rgba(251, 191, 36, .28);
  border-radius: 999px;
  background: rgba(245, 158, 11, .14);
  color: #FCD34D;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body.app-mode[data-active-view="overview"] .analysis-panel {
  display: none !important;
}

.overview-hub {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 14px;
}

.overview-focus-card,
.overview-brief,
.overview-onboarding,
.analysis-workspace {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

.overview-focus-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 24px;
  background:
    radial-gradient(circle at 100% 0, rgba(74, 222, 128, .17), transparent 0 42%),
    linear-gradient(145deg, #0F172A, #16263A 64%, #173A2D);
  color: #FFFFFF;
}

.overview-focus-card::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -72px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(134, 239, 172, .18);
  border-radius: 50%;
}

.overview-focus-head,
.overview-actions,
.overview-onboarding > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overview-eyebrow,
.overview-brief > span {
  color: #64748B;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.overview-focus-card .overview-eyebrow {
  color: #86EFAC;
}

.overview-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(254, 240, 138, .24);
  border-radius: 999px;
  background: rgba(245, 158, 11, .16);
  color: #FDE68A;
  font-size: 10px;
  font-weight: 800;
}

.overview-status-badge.is-ready {
  border-color: rgba(134, 239, 172, .28);
  background: rgba(34, 197, 94, .17);
  color: #BBF7D0;
}

.overview-status-badge.needs-attention {
  border-color: rgba(254, 202, 202, .28);
  background: rgba(220, 38, 38, .18);
  color: #FECACA;
}

.overview-status-badge.in-progress {
  border-color: rgba(186, 230, 253, .28);
  background: rgba(14, 165, 233, .16);
  color: #BAE6FD;
}

.overview-focus-card h2 {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin-top: 26px;
  color: #FFFFFF;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.08;
}

.overview-focus-card p {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin-top: 10px;
  color: #CBD5E1;
  font-size: 13px;
  line-height: 1.55;
}

.overview-actions {
  position: relative;
  z-index: 1;
  justify-content: flex-start;
  margin-top: 22px;
}

.overview-actions button {
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 800;
}

.overview-primary-action {
  border: 1px solid #4ADE80;
  background: #22C55E;
  color: #052E16;
}

.overview-primary-action:disabled {
  border-color: rgba(203, 213, 225, .38);
  background: rgba(148, 163, 184, .18);
  color: #CBD5E1;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

.overview-secondary-action {
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .07);
  color: #F8FAFC;
}

.overview-brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.overview-brief {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
}

.overview-brief-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.overview-brief-head > span {
  color: #64748B;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.overview-brief-icon {
  width: 34px !important;
  height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  object-fit: contain;
  flex: 0 0 34px;
  opacity: .94;
  filter: drop-shadow(0 5px 9px rgba(15, 23, 42, .12));
}

.overview-brief-head img {
  display: block;
  min-width: 0;
  min-height: 0;
  inline-size: 34px !important;
  block-size: 34px !important;
}

.overview-brief::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #94A3B8;
}

.overview-brief-alert::before { background: #F59E0B; }
.overview-brief-action::before { background: #22C55E; }
.overview-brief-summary::before { background: linear-gradient(90deg, #0E7490, #38BDF8); }
.overview-brief-weather::before { background: linear-gradient(90deg, #166534, #22C55E); }
.overview-brief-territory::before { background: linear-gradient(90deg, #475569, #94A3B8); }

.overview-brief strong {
  margin-top: 18px;
  color: var(--azul-tech);
  font-size: 17px;
  line-height: 1.25;
}

.overview-brief small {
  margin-top: auto;
  padding-top: 12px;
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.45;
}

.overview-brief .badge {
  margin-top: 12px;
}

.overview-brief-notes {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(226, 232, 240, .88);
}

.overview-brief-notes > div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(226, 232, 240, .88);
  border-radius: 8px;
  background: #F8FAFC;
}

.overview-brief-notes span {
  color: #64748B;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.overview-brief-notes b {
  color: var(--azul-tech);
  font-size: 12px;
  line-height: 1.25;
}

.overview-brief-notes small {
  margin: 0;
  padding: 0;
  font-size: 10px;
}

.overview-onboarding {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(0, 2.2fr);
  align-items: center;
  gap: 20px;
  padding: 16px 18px;
}

.overview-onboarding > div:first-child {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.overview-onboarding > div strong {
  color: var(--azul-tech);
  font-size: 14px;
}

.overview-onboarding ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.overview-onboarding li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #F8FAFC;
}

.overview-onboarding li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #E2E8F0;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.overview-onboarding li strong,
.overview-onboarding li small {
  display: block;
}

.overview-onboarding li strong {
  color: #334155;
  font-size: 11px;
}

.overview-onboarding li small {
  margin-top: 2px;
  color: #64748B;
  font-size: 9px;
}

.overview-onboarding li.is-complete {
  border-color: #BBF7D0;
  background: #F0FDF4;
}

.overview-onboarding li.is-complete > span {
  background: #22C55E;
  color: transparent;
}

.overview-onboarding li.is-complete > span::after {
  content: "✓";
  color: #052E16;
}

.overview-onboarding.is-complete {
  display: none;
}

.analysis-workspace {
  overflow: hidden;
}

.analysis-workspace-toggle {
  width: 100%;
  min-height: 70px;
  padding: 14px 18px;
  border: 0;
  background: #FFFFFF;
  color: var(--azul-tech);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.analysis-workspace-toggle > span:first-child,
.analysis-workspace-toggle strong,
.analysis-workspace-toggle small {
  display: block;
}

.analysis-workspace-toggle strong {
  font-size: 15px;
}

.analysis-workspace-toggle small {
  margin-top: 3px;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 500;
}

.analysis-workspace-chevron {
  font-size: 22px;
  transition: transform .2s ease;
}

.analysis-workspace.is-open .analysis-workspace-chevron {
  transform: rotate(180deg);
}

.analysis-workspace-body {
  display: none;
  gap: 14px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--border-color);
  background: #F8FAFC;
}

.analysis-workspace.is-open .analysis-workspace-body {
  display: grid;
}

.analysis-workspace-body .location-workbench {
  margin-top: 14px;
}

.field-command-center:not(.has-analysis),
body[data-active-view="overview"]:not(.image-loaded) .visual-tabs-band,
body[data-active-view="overview"]:not(.image-loaded) .view-panel[data-panel="overview"] {
  display: none;
}

body.overview-tools-open[data-active-view="overview"]:not(.image-loaded) .view-panel[data-panel="overview"] {
  display: block;
}

body.dark-theme .overview-focus-card {
  border-color: rgba(136, 168, 110, .24);
}

body.dark-theme .overview-brief,
body.dark-theme .overview-onboarding,
body.dark-theme .analysis-workspace,
body.dark-theme .analysis-workspace-toggle {
  border-color: #34382F;
  background: #1D1F1A;
}

body.dark-theme .overview-brief-head > span,
body.dark-theme .overview-brief-notes span {
  color: #A7AA98;
}

body.dark-theme .overview-brief-notes {
  border-color: #34382F;
}

body.dark-theme .overview-brief-notes > div {
  border-color: #34382F;
  background: #171915;
}

body.dark-theme .overview-brief-notes b {
  color: #F2ECD9;
}

body.dark-theme .overview-brief strong,
body.dark-theme .overview-onboarding > div strong,
body.dark-theme .analysis-workspace-toggle {
  color: #F2ECD9;
}

body.dark-theme .overview-onboarding li {
  border-color: #34382F;
  background: #171915;
}

body.dark-theme .overview-onboarding li strong { color: #E7E3D3; }
body.dark-theme .overview-onboarding li small { color: #A7AA98; }
body.dark-theme .overview-onboarding li.is-complete { border-color: #47633A; background: rgba(71, 99, 58, .22); }
body.dark-theme .analysis-workspace-body { border-color: #34382F; background: #151713; }

@media (max-width: 1180px) {
  .overview-hub {
    grid-template-columns: 1fr;
  }

  .overview-brief-grid {
    min-height: 160px;
  }
}

@media (max-width: 885px) {
  .overview-hub,
  .overview-onboarding {
    grid-template-columns: 1fr;
  }

  .overview-focus-card {
    min-height: 0;
    padding: 20px;
  }

  .overview-focus-card h2 {
    margin-top: 20px;
    font-size: 27px;
  }

  .overview-brief-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .overview-brief {
    min-height: 138px;
  }

  .overview-onboarding ol {
    grid-template-columns: 1fr;
  }

  .analysis-workspace-body {
    padding: 0 10px 10px;
  }

  .analysis-workspace-body .location-workbench {
    margin-top: 10px;
  }
}

@media (max-width: 510px) {
  .overview-focus-head,
  .overview-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-actions button {
    width: 100%;
  }

  .analysis-workspace-toggle {
    min-height: 76px;
    padding: 13px 14px;
  }
}

.feedback-panel .animated-select-option {
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--azul-tech);
  padding: 9px 10px;
  box-shadow: none;
}

.feedback-panel .animated-select-option:hover,
.feedback-panel .animated-select-option.active {
  background: #F1F5F9;
  color: var(--azul-tech);
}

body.dark-theme .feedback-panel .animated-select-option {
  background: transparent;
  color: #F2ECD9;
}

body.dark-theme .feedback-panel .animated-select-option:hover,
body.dark-theme .feedback-panel .animated-select-option.active { background: #292D26; }

.pest-stage-card .pest-flow::before { display: none; }

.pest-stage-card .pest-flow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pest-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #F8FAFC;
  color: var(--azul-tech);
  padding: 9px;
  text-align: left;
  transition: border-color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.pest-step:hover { transform: translateY(-2px); border-color: rgba(14, 116, 144, .35); }
.pest-step-number {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 12px;
  font-weight: 900;
  padding: 0;
  transition: inherit;
}

.pest-stage-card .pest-flow .pest-step .pest-step-number::before { content: none; display: none; }

.pest-step strong { font-size: 11px; line-height: 1.2; }
.pest-step small { color: var(--text-sub); font-size: 9px; line-height: 1.2; }
.pest-step.complete { border-color: rgba(21, 128, 61, .24); background: #F0FDF4; }
.pest-step.complete .pest-step-number { border-color: #15803D; background: #15803D; color: #FFFFFF; }
.pest-step.active { border-color: rgba(14, 116, 144, .55); background: #ECFEFF; box-shadow: 0 8px 20px rgba(14, 116, 144, .10); }
.pest-step.active .pest-step-number { border-color: #0E7490; background: #0E7490; color: #FFFFFF; animation: pestStepPulse 1.6s ease-in-out infinite; }

.pest-flow-status { display: grid; gap: 7px; color: var(--text-sub); font-size: 11px; font-weight: 700; }
.pest-flow-progress { height: 5px; overflow: hidden; border-radius: 999px; background: #E2E8F0; }
.pest-flow-progress i { display: block; width: var(--pest-progress, 25%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0E7490, #22C55E); transition: width .45s cubic-bezier(.2, .8, .2, 1); }

@keyframes pestStepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 116, 144, .22); }
  50% { box-shadow: 0 0 0 6px rgba(14, 116, 144, 0); }
}

.symptom-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.symptom-icon svg .symptom-fill { fill: currentColor; opacity: .24; }

body.dark-theme .pest-step { background: #171915; border-color: #34382F; color: #F2ECD9; }
body.dark-theme .pest-step-number { background: #1D1F1A; border-color: #576052; }
body.dark-theme .pest-step.complete { background: rgba(34, 197, 94, .08); }
body.dark-theme .pest-step.active { background: rgba(14, 116, 144, .13); }
body.dark-theme .pest-flow-progress { background: #34382F; }

.planting-select-line {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.planting-select-line .animated-select-trigger { background: #F8FAFC; min-height: 46px; }
body.dark-theme .planting-select-line { background: transparent; }
body.dark-theme .planting-select-line .animated-select-trigger { background: #171915; }

.typing-text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: .95em;
  margin-left: 3px;
  background: currentColor;
  vertical-align: -.08em;
  animation: typingCaret .62s steps(1) infinite;
}

@keyframes typingCaret { 50% { opacity: 0; } }

@media (min-width: 1171px) {
  .climate-scenario-card {
    grid-column: 1 / -1;
    grid-row: auto;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(250px, 320px);
    grid-template-rows: auto auto 1fr;
    align-items: start;
    column-gap: 12px;
  }

  .climate-scenario-card > h3 { grid-column: 1 / -1; }
  .climate-field-preview { grid-column: 1; grid-row: 2 / span 2; min-height: 144px; }
  .climate-property-title { grid-column: 2; grid-row: 2; }
  .climate-property-grid { grid-column: 2; grid-row: 3; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
  .climate-scenario-card > .animated-select { grid-column: 3; grid-row: 2; }
  .climate-scenario-card > #climateScenarioText { grid-column: 3; grid-row: 3; margin: 0; }
  .climate-risk-card { grid-column: 1 / 6; grid-row: auto; }
  .climate-operation-card { grid-column: 6 / 13; grid-row: auto; }
  .climate-days-card { grid-column: 1 / -1; grid-row: auto; }
  .climate-balance-card { grid-column: 1 / 5; grid-row: auto; }
  .climate-windows-card { grid-column: 5 / 13; grid-row: auto; }
  .climate-alerts-card { grid-column: 1 / 7; grid-row: auto; }
  .climate-check-card { grid-column: 7 / 13; grid-row: auto; }
}

@media (max-width: 1170px) {
  .climate-scenario-card,
  .climate-days-card { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .heat-key-items { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
  .heat-layout .heat-compare { min-height: 300px; }
  .pest-stage-card .pest-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .heat-key-heading { display: grid; }
  .heat-key-items { grid-template-columns: 1fr; }
  .heat-layout .heat-compare { min-height: 240px; }
  .pest-stage-card .pest-flow { grid-template-columns: 1fr; }
}

@media (max-width: 1170px) {
  .pest-dashboard,
  .climate-dashboard,
  .planting-dashboard {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .pest-input-card,
  .pest-symptom-card,
  .pest-result-card,
  .pest-learning-card,
  .climate-scenario-card,
  .climate-risk-card,
  .climate-operation-card,
  .climate-days-card,
  .climate-balance-card,
  .climate-windows-card,
  .climate-alerts-card,
  .climate-check-card,
  .planting-window-card,
  .planting-terrain-card,
  .planting-climate-card,
  .planting-harvest-card {
    grid-column: span 4;
  }

  .climate-days {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .climate-dashboard .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planting-steps-card .climate-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 885px) {
  .pest-dashboard,
  .climate-dashboard,
  .planting-dashboard {
    grid-template-columns: 1fr;
  }

  .pest-dashboard > *,
  .climate-dashboard > *,
  .planting-dashboard > *,
  .pest-input-card,
  .pest-symptom-card,
  .pest-result-card,
  .pest-learning-card,
  .climate-scenario-card,
  .climate-risk-card,
  .climate-operation-card,
  .climate-days-card,
  .climate-balance-card,
  .climate-windows-card,
  .climate-alerts-card,
  .climate-check-card,
  .planting-window-card,
  .planting-terrain-card,
  .planting-climate-card,
  .planting-harvest-card {
    grid-column: 1 / -1;
  }

  .pest-stage-card .tool-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }

  .pest-stage-card .tool-steps::before {
    display: none;
  }

  .climate-dashboard .metric-grid,
  .climate-days {
    grid-template-columns: 1fr;
  }

  .climate-days,
  .planting-steps-card .climate-checklist {
    grid-template-columns: 1fr;
  }

  .climate-dashboard .metric-grid div {
    padding-left: 74px;
  }
}

@media (max-width: 510px) {
  .tool-card-head {
    display: grid;
  }

  .pest-symptom-card .check-grid,
  .planting-input-grid,
  .climate-property-grid {
    grid-template-columns: 1fr;
  }

  .planting-window-visual {
    justify-content: start;
    grid-template-columns: repeat(3, 46px);
    gap: 18px;
  }

  .planting-window-visual span {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 23px;
  }

  .planting-terrain-preview {
    width: 100%;
    justify-self: stretch;
  }
}
