/**
 * Estilos corporativos: Vademécum oficial de fitosanitarios y plazos de seguridad (MAPA)
 * Conforme a estándares de Fijate Tools y diseño responsivo.
 */

:root {
  --fito-font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fito-font-heading: 'Outfit', sans-serif;
  --fito-font-mono: 'JetBrains Mono', monospace;

  /* Colores tema claro */
  --fito-bg: #f8fafc;
  --fito-card-bg: #ffffff;
  --fito-card-border: #e2e8f0;
  --fito-text-main: #0f172a;
  --fito-text-muted: #64748b;
  --fito-primary: #15803d; /* Verde clorofila */
  --fito-primary-hover: #166534;
  --fito-primary-light: #dcfce7;
  --fito-accent: #22c55e;
  --fito-amber: #d97706;
  --fito-orange: #ea580c;
  --fito-red: #dc2626;
  --fito-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --fito-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --fito-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);

  /* Semáforo de plazos de seguridad */
  --ps-cero-bg: #dcfce7;
  --ps-cero-text: #166534;
  --ps-muy-bajo-bg: #ecfdf5;
  --ps-muy-bajo-text: #065f46;
  --ps-moderado-bg: #fef3c7;
  --ps-moderado-text: #92400e;
  --ps-medio-bg: #ffedd5;
  --ps-medio-text: #9a3412;
  --ps-largo-bg: #fee2e2;
  --ps-largo-text: #991b1b;
}

[data-theme="dark"] {
  --fito-bg: #09120c;
  --fito-card-bg: #101d14;
  --fito-card-border: #1e3324;
  --fito-text-main: #f0fdf4;
  --fito-text-muted: #86efac;
  --fito-primary: #4ade80;
  --fito-primary-hover: #22c55e;
  --fito-primary-light: rgba(74, 222, 128, 0.12);
  --fito-accent: #4ade80;
  --fito-amber: #fbbf24;
  --fito-orange: #fb923c;
  --fito-red: #f87171;
  --fito-shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --fito-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.6);
  --fito-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.7);

  --ps-cero-bg: rgba(22, 163, 74, 0.25);
  --ps-cero-text: #86efac;
  --ps-muy-bajo-bg: rgba(5, 150, 105, 0.25);
  --ps-muy-bajo-text: #a7f3d0;
  --ps-moderado-bg: rgba(217, 119, 6, 0.25);
  --ps-moderado-text: #fde68a;
  --ps-medio-bg: rgba(234, 88, 12, 0.25);
  --ps-medio-text: #fed7aa;
  --ps-largo-bg: rgba(220, 38, 38, 0.25);
  --ps-largo-text: #fca5a5;
}

/* Reset y base */
body {
  font-family: var(--fito-font-main);
  background-color: var(--fito-bg);
  color: var(--fito-text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* --- Hero Card --- */
.fito-hero-card {
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.08) 0%, rgba(22, 101, 52, 0.02) 100%);
  border: 1px solid var(--fito-card-border);
  border-radius: 1rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  background-color: var(--fito-card-bg);
  box-shadow: var(--fito-shadow-sm);
}

.fito-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 9999px;
  background-color: var(--fito-primary-light);
  color: var(--fito-primary);
  margin-bottom: 0.875rem;
}

.fito-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--fito-primary);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
  animation: fito-pulse-anim 2s infinite;
}

@keyframes fito-pulse-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.fito-hero-title {
  font-family: var(--fito-font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--fito-text-main);
  margin: 0 0 0.75rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.fito-hero-desc {
  font-size: 0.9375rem;
  color: var(--fito-text-muted);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  max-width: 900px;
}

.fito-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.fito-kpi-card {
  background-color: var(--fito-bg);
  border: 1px solid var(--fito-card-border);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.fito-kpi-card:hover {
  transform: translateY(-2px);
}

.fito-kpi-num {
  display: block;
  font-family: var(--fito-font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fito-primary);
  line-height: 1.2;
}

.fito-kpi-label {
  display: block;
  font-size: 0.75rem;
  color: var(--fito-text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* --- MÓDULO 1: Selector de Cultivo y Plaga --- */
.fito-selector-card {
  background-color: var(--fito-card-bg);
  border: 1px solid var(--fito-card-border);
  border-radius: 1rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--fito-shadow-sm);
}

.selector-header {
  margin-bottom: 1rem;
}

.selector-title {
  font-family: var(--fito-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.selector-subtitle {
  font-size: 0.875rem;
  color: var(--fito-text-muted);
}

.crops-selector-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.crop-btn {
  background-color: var(--fito-bg);
  border: 1.5px solid var(--fito-card-border);
  border-radius: 0.75rem;
  padding: 0.875rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.crop-btn:hover {
  border-color: var(--fito-primary);
  transform: translateY(-2px);
}

.crop-btn.active {
  background-color: var(--fito-primary-light);
  border-color: var(--fito-primary);
  box-shadow: 0 0 0 2px var(--fito-primary);
}

.crop-emoji {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

.crop-btn-name {
  font-family: var(--fito-font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--fito-text-main);
  line-height: 1.2;
}

.crop-btn-sub {
  font-size: 0.6875rem;
  color: var(--fito-text-muted);
  margin-top: 0.15rem;
}

.fito-filters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fito-text-muted);
}

.filter-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 40px 0 0.875rem;
  font-family: var(--fito-font-main);
  font-size: 0.875rem;
  color: var(--fito-text-main);
  background-color: var(--fito-bg);
  border: 1px solid var(--fito-card-border);
  border-radius: 0.5rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  transition: border-color 0.2s;
}

.filter-select:focus {
  border-color: var(--fito-primary);
}

.filter-select option {
  background-color: var(--fito-card-bg);
  color: var(--fito-text-main);
}

.fito-text-input {
  width: 100%;
  height: 42px;
  padding: 0 0.875rem;
  font-family: var(--fito-font-main);
  font-size: 0.875rem;
  color: var(--fito-text-main);
  background-color: var(--fito-bg);
  border: 1px solid var(--fito-card-border);
  border-radius: 0.5rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.fito-text-input:focus {
  border-color: var(--fito-primary);
}

/* Conmutadores rápidos */
.toggles-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--fito-card-border);
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  width: 38px;
  height: 22px;
  border-radius: 9999px;
  background-color: var(--fito-card-border);
  position: relative;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #ffffff;
  transition: transform 0.2s;
}

.toggle-input:checked + .toggle-track {
  background-color: var(--fito-primary);
}

.toggle-input:checked + .toggle-track::after {
  transform: translateX(16px);
}

.toggle-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fito-text-main);
}

/* --- MÓDULO 2: Calculadora de Cosecha Segura --- */
.harvest-calculator-card {
  background-color: var(--fito-card-bg);
  border: 2px solid var(--fito-card-border);
  border-radius: 1rem;
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--fito-shadow-md);
  position: relative;
  overflow: hidden;
}

.harvest-calculator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #15803d, #eab308, #22c55e);
}

.calc-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.calc-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  background-color: var(--fito-primary-light);
  color: var(--fito-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.calc-title {
  font-family: var(--fito-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.calc-crop-highlight {
  color: var(--fito-primary);
  font-weight: 800;
  border-bottom: 2px solid var(--fito-primary);
  padding-bottom: 1px;
}

.calc-desc {
  font-size: 0.875rem;
  color: var(--fito-text-muted);
  margin: 0;
}

.calc-inputs-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(260px, 2fr) minmax(140px, 1fr) auto;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.calc-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fito-text-muted);
}

.calc-date-input {
  width: 100%;
  height: 44px;
  padding: 0 0.875rem;
  font-family: var(--fito-font-main);
  font-size: 0.9375rem;
  color: var(--fito-text-main);
  background-color: var(--fito-bg);
  border: 1.5px solid var(--fito-card-border);
  border-radius: 0.5rem;
  outline: none;
  box-sizing: border-box;
}

.ps-stepper {
  display: flex;
  align-items: center;
  height: 44px;
}

.btn-step {
  width: 40px;
  height: 44px;
  background-color: var(--fito-bg);
  border: 1.5px solid var(--fito-card-border);
  font-family: var(--fito-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fito-text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-step:first-child {
  border-radius: 0.5rem 0 0 0.5rem;
  border-right: none;
}

.btn-step:last-child {
  border-radius: 0 0.5rem 0.5rem 0;
  border-left: none;
}

.calc-number-input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 44px;
  border: 1.5px solid var(--fito-card-border);
  text-align: center;
  font-family: var(--fito-font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--fito-text-main);
  background-color: var(--fito-card-bg);
  outline: none;
}

.btn-calc-action {
  height: 44px;
  padding: 0 1.5rem;
  background-color: var(--fito-primary);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-family: var(--fito-font-main);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.btn-calc-action:hover {
  background-color: var(--fito-primary-hover);
}

/* Panel resultado de cosecha */
.calc-result-panel {
  background-color: var(--fito-bg);
  border: 1px solid var(--fito-card-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.calc-verdict-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.verdict-icon-status {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-safe {
  background-color: var(--ps-cero-bg);
  color: var(--ps-cero-text);
}

.status-waiting {
  background-color: var(--ps-moderado-bg);
  color: var(--ps-moderado-text);
}

.calc-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.badge-safe {
  background-color: var(--ps-cero-bg);
  color: var(--ps-cero-text);
}

.badge-warning {
  background-color: var(--ps-moderado-bg);
  color: var(--ps-moderado-text);
}

.calc-date-headline {
  font-family: var(--fito-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--fito-text-main);
}

.progress-bar-wrapper {
  margin-top: 0.75rem;
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background-color: var(--fito-card-border);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #15803d, #22c55e);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.progress-labels-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--fito-text-muted);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* --- Listado de Productos Fitosanitarios --- */
.products-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: var(--fito-text-muted);
}

.products-count-text strong {
  color: var(--fito-primary);
}

.btn-text-link {
  background: transparent;
  border: none;
  color: var(--fito-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.product-card {
  background-color: var(--fito-card-bg);
  border: 1px solid var(--fito-card-border);
  border-radius: 0.875rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: var(--fito-shadow-sm);
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--fito-primary);
  box-shadow: var(--fito-shadow-md);
}

.product-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.product-name {
  font-family: var(--fito-font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--fito-text-main);
  margin: 0;
}

.product-registro {
  display: inline-block;
  font-family: var(--fito-font-mono);
  font-size: 0.75rem;
  color: var(--fito-text-muted);
  margin-top: 0.2rem;
}

/* Plazo de seguridad tag */
.ps-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.ps-cero { background-color: var(--ps-cero-bg); color: var(--ps-cero-text); }
.ps-muy-bajo { background-color: var(--ps-muy-bajo-bg); color: var(--ps-muy-bajo-text); }
.ps-moderado { background-color: var(--ps-moderado-bg); color: var(--ps-moderado-text); }
.ps-medio { background-color: var(--ps-medio-bg); color: var(--ps-medio-text); }
.ps-largo { background-color: var(--ps-largo-bg); color: var(--ps-largo-text); }

.product-active-substance {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fito-text-main);
  margin-bottom: 0.5rem;
}

.product-tags-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.eco-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background-color: var(--fito-primary-light);
  color: var(--fito-primary);
}

.jed-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background-color: #e0f2fe;
  color: #0369a1;
}

.product-pest-box {
  background-color: var(--fito-bg);
  border: 1px solid var(--fito-card-border);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.pest-label {
  color: var(--fito-text-muted);
  font-size: 0.6875rem;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
}

.pest-target-name {
  font-weight: 600;
  color: var(--fito-text-main);
}

.product-dose-box {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  color: var(--fito-text-muted);
}

.dose-val {
  font-family: var(--fito-font-mono);
  font-weight: 700;
  color: var(--fito-text-main);
}

.btn-view-fito-dossier {
  width: 100%;
  height: 40px;
  background-color: var(--fito-primary);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-family: var(--fito-font-main);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
  margin-top: auto;
}

.btn-view-fito-dossier:hover {
  background-color: var(--fito-primary-hover);
}

/* Fila de acciones en tarjeta de producto */
.product-actions-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-card-calc {
  height: 40px;
  padding: 0 0.75rem;
  background-color: var(--fito-primary);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-family: var(--fito-font-main);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-card-calc:hover {
  background-color: var(--fito-primary-hover);
  transform: translateY(-1px);
}

.btn-card-dossier {
  height: 40px;
  padding: 0 0.75rem;
  background-color: var(--fito-bg);
  border: 1px solid var(--fito-card-border);
  color: var(--fito-text-main);
  border-radius: 0.5rem;
  font-family: var(--fito-font-main);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-card-dossier:hover {
  border-color: var(--fito-primary);
  color: var(--fito-primary);
}

/* Efecto de enfoque y pulso en la calculadora */
@keyframes fito-card-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    border-color: var(--fito-primary);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.25);
    border-color: var(--fito-primary);
  }
  100% {
    box-shadow: var(--fito-shadow-md);
    border-color: var(--fito-card-border);
  }
}

.harvest-calculator-card.pulse-active {
  animation: fito-card-pulse 0.7s ease-out;
}

/* Guía didáctica */
.fito-guide-card {
  background-color: var(--fito-card-bg);
  border: 1px solid var(--fito-card-border);
  border-radius: 1rem;
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--fito-shadow-sm);
}

.guide-heading {
  font-family: var(--fito-font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
}

.guide-accordion-item {
  border-bottom: 1px solid var(--fito-card-border);
  padding: 1.25rem 0;
}

.guide-accordion-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.guide-item-title {
  font-family: var(--fito-font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.guide-item-text {
  font-size: 0.9375rem;
  color: var(--fito-text-muted);
  line-height: 1.6;
  margin: 0;
}

.guide-list {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
  color: var(--fito-text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Modal */
.fito-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.fito-modal-card {
  background-color: var(--fito-card-bg);
  border: 1px solid var(--fito-card-border);
  border-radius: 1rem;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--fito-shadow-lg);
  overflow: hidden;
  animation: modal-enter 0.2s ease-out;
}

.fito-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  border-bottom: 1px solid var(--fito-card-border);
  gap: 1rem;
}

.modal-badges-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.modal-fito-name {
  font-family: var(--fito-font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0;
}

.modal-fito-subtitle {
  font-family: var(--fito-font-mono);
  font-size: 0.8125rem;
  color: var(--fito-text-muted);
  display: block;
  margin-top: 0.25rem;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--fito-text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fito-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.dossier-section-title {
  font-family: var(--fito-font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fito-primary);
  margin: 1.25rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--fito-card-border);
}

.dossier-section-title:first-child {
  margin-top: 0;
}

.dossier-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.dossier-row {
  display: flex;
  flex-direction: column;
  background-color: var(--fito-bg);
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid var(--fito-card-border);
}

.dossier-key {
  font-size: 0.6875rem;
  color: var(--fito-text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.dossier-val {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fito-text-main);
  word-break: break-word;
}

.dossier-val.text-mono {
  font-family: var(--fito-font-mono);
}

.dossier-desc-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fito-text-muted);
  background-color: var(--fito-bg);
  padding: 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid var(--fito-card-border);
}

.fito-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--fito-card-border);
  background-color: var(--fito-card-bg);
}

.btn-modal-action {
  height: 40px;
  padding: 0 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.btn-set-calculator {
  background-color: var(--fito-primary-light);
  border: 1px solid var(--fito-primary);
  color: var(--fito-primary);
}

.btn-set-calculator:hover {
  background-color: var(--fito-primary);
  color: #ffffff;
}

.btn-copy-fito {
  background-color: var(--fito-bg);
  border: 1px solid var(--fito-card-border);
  color: var(--fito-text-main);
}

.btn-copy-fito:hover {
  border-color: var(--fito-primary);
  color: var(--fito-primary);
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #14532d;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--fito-shadow-lg);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toast-in 0.2s ease-out;
}

/* Empty state */
.empty-state-card {
  background-color: var(--fito-card-bg);
  border: 1px dashed var(--fito-card-border);
  border-radius: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}

.empty-icon {
  color: var(--fito-text-muted);
  margin-bottom: 1rem;
}

.empty-title {
  font-family: var(--fito-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.empty-desc {
  font-size: 0.9375rem;
  color: var(--fito-text-muted);
  max-width: 500px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}

.btn-action-primary {
  height: 42px;
  padding: 0 1.5rem;
  background-color: var(--fito-primary);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .crops-selector-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .fito-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .calc-inputs-row {
    grid-template-columns: 1fr 1fr;
  }
  .btn-calc-action {
    grid-column: 1 / -1;
  }
  .product-actions-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tool-layout {
    margin-top: 1rem;
    padding: 0 0.75rem;
  }
  .crops-selector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .fito-filters-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .calc-inputs-row {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .dossier-grid-2col {
    grid-template-columns: 1fr;
  }
  .fito-modal-footer {
    flex-direction: column;
  }
  .btn-modal-action {
    width: 100%;
    justify-content: center;
  }
}

@media print {
  .app-header,
  .fijate-footer,
  .tool-ad-sidebar,
  .tools-ad-banner-section,
  .fito-selector-card,
  .harvest-calculator-card,
  .affiliate-section,
  .fito-guide-card,
  .btn-view-fito-dossier,
  .fito-modal-footer,
  .btn-close-modal,
  .toast-notice {
    display: none !important;
  }

  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }

  .fito-modal-backdrop {
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
  }

  .fito-modal-card {
    max-width: 100% !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}
