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

.field-label {
  font-size: var(--text-small);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.field-hint,
.field-error {
  font-size: var(--text-small);
  color: var(--text-secondary);
}

.field-error {
  color: var(--danger);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
  appearance: none;
}

.textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #cfcbbf;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--focus);
  outline: none;
}

.input.is-filled,
.textarea.is-filled {
  background: #fbfbf8;
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  opacity: 0.6;
  background: var(--surface-soft);
  cursor: not-allowed;
}

.field.is-error .input,
.field.is-error .select,
.field.is-error .textarea {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.field.is-success .input,
.field.is-success .select,
.field.is-success .textarea {
  border-color: var(--success);
  background: var(--success-soft);
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 3rem;
}

.input-action {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-secondary);
}

.input-action:hover {
  background: var(--surface-soft);
  color: var(--text-primary);
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235c6370' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.5rem;
}

.check,
.radio,
.switch {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  cursor: pointer;
}

.check input,
.radio input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #c4c0b6;
  background: var(--surface);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.check input {
  border-radius: 5px;
}

.radio input {
  border-radius: 50%;
}

.check input:checked,
.radio input:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.check input:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.radio input:checked::after {
  content: "";
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
}

.switch input {
  appearance: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d7d3c9;
  position: relative;
  flex-shrink: 0;
}

.switch input::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 180ms var(--ease);
}

.switch input:checked {
  background: var(--primary);
}

.switch input:checked::after {
  transform: translateX(18px);
}

.file-drop {
  position: relative;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
}

.file-drop:hover,
.file-drop.is-drag {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text-primary);
}

.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
