/* Forms */
.form {
  display: grid;
  grid-template-columns: 1fr; /* Crítico: sin esto, grid usa auto-columns y se encoge al contenido */
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* Mobile first: 1 columna siempre. Multi-columna solo en desktop ≥769px. */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

/* Tablet/laptop: 2 columnas explícitas (evita layouts feos con auto-fit) */
@media (min-width: 769px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop ancho: 4 columnas explícitas */
@media (min-width: 1200px) {
  .form-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Campo ancho — span 2 cols solo en desktop ancho. En tablet (2 cols) queda como 1 col normal. */
@media (min-width: 1200px) {
  .form-field-wide {
    grid-column: span 2;
  }
}

.form-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.1s, box-shadow 0.1s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-field textarea {
  resize: vertical;
  min-height: 60px;
}

.form-field .help {
  font-size: 11px;
  color: var(--text-muted);
}

.form-field .calc {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

