/* Shared form control styles (ERP Crackers) */

.erp-field {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  background-color: #fff;
  color: #0f172a;
}

.erp-field-lg {
  font-size: 1.125rem;
  padding: 0.5rem 0.75rem;
}

.erp-field:focus {
  outline: 2px solid #6366f1;
  outline-offset: 0;
  border-color: #6366f1;
}

.erp-field:disabled {
  background-color: #f1f5f9;
  color: #64748b;
}

.erp-field-readonly {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.75rem;
  font-size: 1.125rem;
  line-height: 1.5;
  background-color: #f8fafc;
  color: #475569;
  cursor: not-allowed;
  user-select: text;
}

input[type="file"].erp-field {
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
}

.erp-checkbox {
  height: 1.25rem;
  width: 1.25rem;
  flex-shrink: 0;
  border-radius: 0.25rem;
  border: 1px solid #cbd5e1;
  accent-color: #4f46e5;
}

.erp-form-field {
  margin-bottom: 1rem;
}

.erp-form-field:last-child {
  margin-bottom: 0;
}

.erp-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

.erp-label-inline {
  margin-bottom: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
}

.erp-form-field--checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.erp-field-errors {
  margin: 0.25rem 0 0.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: #b91c1c;
}

.erp-form-non-field-errors {
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #fecaca;
  background-color: #fef2f2;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #991b1b;
}

.erp-form-non-field-errors ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Horizontal scroll for wide tables on small screens */
.erp-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
