/* Correcciones acotadas a Estructura de finca y al diálogo Agregar/Editar planta.
   El archivo también puede instalarse sobre el paquete web ya publicado. */
html.dark-theme .farm-structure-page {
  --structure-green: #a3e635;
  --structure-ink: #edf4eb;
  --structure-muted: #bac8b9;
  --structure-border: #3b493e;
  --structure-surface: #1b231d;
  --structure-surface-alt: #202b22;
  --structure-context: linear-gradient(105deg, #1d2d1e, #1b231d 80%);
  --structure-icon-bg: #293b29;
  --structure-soft-line: #37463a;
  --structure-tree-line: #47584a;
  --structure-hover-bg: #304631;
  --structure-meta: #b6c6b7;
  --structure-legend: #d0dbcf;
  --structure-hint: #afc0b1;
  color: var(--structure-ink);
}
html.dark-theme .farm-structure-page .structure-heading h1,
html.dark-theme .farm-structure-page .tree-title h2,
html.dark-theme .farm-structure-page .structure-empty h2 {
  color: var(--structure-ink);
}
html.dark-theme .farm-structure-page .farm-context,
html.dark-theme .farm-structure-page .metric-card,
html.dark-theme .farm-structure-page .structure-board,
html.dark-theme .farm-structure-page .node-card {
  background: var(--structure-surface);
  border-color: var(--structure-border);
  color: var(--structure-ink);
  box-shadow: 0 8px 28px rgb(0 0 0 / 16%);
}
html.dark-theme .farm-structure-page .farm-context {
  background: var(--structure-context);
}
html.dark-theme .farm-structure-page .node-card.is-zone,
html.dark-theme .farm-structure-page .node-card.is-sublot {
  background: var(--structure-surface-alt);
}
html.dark-theme .farm-structure-page .context-icon,
html.dark-theme .farm-structure-page .tree-title-mark,
html.dark-theme .farm-structure-page .node-kind-icon,
html.dark-theme .farm-structure-page .empty-mark {
  background: var(--structure-icon-bg);
  color: #a3e635;
}
html.dark-theme .farm-structure-page .metric-green { background: #2a4228; color: #a3e635; }
html.dark-theme .farm-structure-page .metric-blue { background: #26394a; color: #8cc9f0; }
html.dark-theme .farm-structure-page .metric-amber { background: #46371e; color: #f5c16c; }
html.dark-theme .farm-structure-page .is-sublot .node-kind-icon { background: #413729; color: #e2bd82; }
html.dark-theme .farm-structure-page .tree-toolbar { border-color: var(--structure-soft-line); }
html.dark-theme .farm-structure-page .tree-node > .tree-level { border-color: var(--structure-tree-line); }
html.dark-theme .farm-structure-page .tree-search {
  background: var(--structure-surface);
  border-color: var(--structure-border);
  color: var(--structure-muted);
}
html.dark-theme .farm-structure-page .tree-search input { color: var(--structure-ink); }
html.dark-theme .farm-structure-page .tree-search input::placeholder { color: var(--structure-muted); opacity: 1; }
html.dark-theme .farm-structure-page .tree-legend { color: var(--structure-legend); }
html.dark-theme .farm-structure-page .legend-hint { color: var(--structure-hint); }
html.dark-theme .farm-structure-page .node-toggle,
html.dark-theme .farm-structure-page .node-open { color: var(--structure-muted); }
html.dark-theme .farm-structure-page .node-toggle:hover { background: var(--structure-hover-bg); color: #a3e635; }
html.dark-theme .farm-structure-page .node-open:hover { color: #a3e635; }
html.dark-theme .farm-structure-page .node-status.is-active { background: #264122; color: #b8ed79; }
html.dark-theme .farm-structure-page .node-status.is-paused { background: #46371e; color: #f5c16c; }
html.dark-theme .farm-structure-page .node-status.is-inactive { background: #343d35; color: #c4cfc3; }
html.dark-theme .farm-structure-page .node-status.is-planned { background: #26394a; color: #8cc9f0; }

html.dark-theme app-sigatoka-plant-grades-dialog {
  --sp-ink: #f2f5ef;
  --sp-muted: #b5c1b3;
  --sp-line: #404b40;
  --sp-paper: #151b17;
  --sp-card: #222a23;
  --sp-accent: #a3e635;
  --sp-warn: #fbbf24;
  --sp-danger: #ff9b87;
  color: var(--sp-ink);
}
html.dark-theme app-sigatoka-plant-grades-dialog .sp-shell,
html.dark-theme app-sigatoka-plant-grades-dialog .sp-content {
  background: var(--sp-paper);
  color: var(--sp-ink);
}
html.dark-theme app-sigatoka-plant-grades-dialog .sp-panel,
html.dark-theme app-sigatoka-plant-grades-dialog .sp-seq-input,
html.dark-theme app-sigatoka-plant-grades-dialog .grade-chip,
html.dark-theme app-sigatoka-plant-grades-dialog .index-tile.has-value,
html.dark-theme app-sigatoka-plant-grades-dialog .photo-card,
html.dark-theme app-sigatoka-plant-grades-dialog .stage-chip {
  background: var(--sp-card);
  border-color: var(--sp-line);
  color: var(--sp-ink);
}
html.dark-theme app-sigatoka-plant-grades-dialog .index-tile,
html.dark-theme app-sigatoka-plant-grades-dialog .geo-badge {
  background: var(--sp-paper);
  border-color: var(--sp-line);
  color: var(--sp-muted);
}
html.dark-theme app-sigatoka-plant-grades-dialog .sp-ige.is-hot,
html.dark-theme app-sigatoka-plant-grades-dialog .geo-badge.is-miss,
html.dark-theme app-sigatoka-plant-grades-dialog .stage-badge {
  background: #3c2b1e;
  border-color: #9d6636;
  color: #ffd18a;
}
html.dark-theme app-sigatoka-plant-grades-dialog .plant-type-chip.is-selected {
  color: #18220d;
}
html.dark-theme app-sigatoka-plant-grades-dialog .grade-chip.tone-1.is-selected { color: #10200b; }
html.dark-theme app-sigatoka-plant-grades-dialog .grade-chip.tone-2.is-selected,
html.dark-theme app-sigatoka-plant-grades-dialog .grade-chip.tone-3.is-selected { color: #211000; }
html.dark-theme app-sigatoka-plant-grades-dialog .index-input,
html.dark-theme app-sigatoka-plant-grades-dialog .sp-seq-input { color: var(--sp-ink); }
html.dark-theme app-sigatoka-plant-grades-dialog .index-input::placeholder { color: var(--sp-muted); opacity: 1; }
html.dark-theme app-sigatoka-plant-grades-dialog .mat-mdc-text-field-wrapper {
  background: var(--sp-card);
  border-radius: 12px;
}
html.dark-theme app-sigatoka-plant-grades-dialog .mdc-text-field__input,
html.dark-theme app-sigatoka-plant-grades-dialog .mdc-floating-label {
  color: var(--sp-ink);
}
html.dark-theme app-sigatoka-plant-grades-dialog .mat-mdc-form-field-hint,
html.dark-theme app-sigatoka-plant-grades-dialog .mat-mdc-form-field-label { color: var(--sp-muted); }
